// PhBPerfectSpecularReflector.H: PhBPerfectSpecularReflector nodes.

// This file has been generated using nodegen 0.5a.
// Restrict manual editing to the sections delimited by
// . the comments "utility includes" and "end of utility includes"
// . the comments "utility members" and "end of utility members"

#ifndef _PhBPerfectSpecularReflector_H_
#define _PhBPerfectSpecularReflector_H_

#include "xrml.H"
#include "PhBScatterer.H"

// utility includes
// end of utility includes

namespace xrml {
#define PhBPerfectSpecularReflectorTypeId 	"PhBPerfectSpecularReflector"
extern bool IsPhBPerfectSpecularReflector(SFNode*);

class PhBPerfectSpecularReflector: public virtual SFNode, public PhBScatterer {
private:
  //
  void clone_here(const PhBPerfectSpecularReflector&);
  void destruct(void);
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBPerfectSpecularReflector();
  PhBPerfectSpecularReflector(const PhBPerfectSpecularReflector&);
  PhBPerfectSpecularReflector& operator=(const PhBPerfectSpecularReflector&);
  virtual ~PhBPerfectSpecularReflector();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // utility members
  float albedo(const Vec3& inDir,
	       const complex& IndexIn,
	       const complex& IndexOut,
	       int modes);
  Vec3 sample(const Vec3& inDir,
	      const complex& IndexIn,
	      const complex& IndexOut,
	      float xi1, float xi2,
	      int modes);
  float eval(const Vec3& inDir,
	     const Vec3& outDir,
	     const complex& IndexIn,
	     const complex& IndexOut,
	     int modes,
	     float *pdf);
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBPerfectSpecularReflector& src) { }
  inline void util_destruct(void) { }
};

// end of utility members
} // namespace xrml
#endif /*_PhBPerfectSpecularReflector_H_*/
