// PhBPerfectSpecularRefractor.H: PhBPerfectSpecularRefractor 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 _PhBPerfectSpecularRefractor_H_
#define _PhBPerfectSpecularRefractor_H_

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

// utility includes
// end of utility includes

namespace xrml {
#define PhBPerfectSpecularRefractorTypeId 	"PhBPerfectSpecularRefractor"
extern bool IsPhBPerfectSpecularRefractor(SFNode*);

class PhBPerfectSpecularRefractor: public virtual SFNode, public PhBScatterer {
private:
  //
  void clone_here(const PhBPerfectSpecularRefractor&);
  void destruct(void);
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBPerfectSpecularRefractor();
  PhBPerfectSpecularRefractor(const PhBPerfectSpecularRefractor&);
  PhBPerfectSpecularRefractor& operator=(const PhBPerfectSpecularRefractor&);
  virtual ~PhBPerfectSpecularRefractor();
  
  //
  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 PhBPerfectSpecularRefractor& src) { }
  inline void util_destruct(void) { }
};

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