// PhBDiffuseRefractor.H: PhBDiffuseRefractor 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 _PhBDiffuseRefractor_H_
#define _PhBDiffuseRefractor_H_

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

// utility includes
// end of utility includes

namespace xrml {
#define PhBDiffuseRefractorTypeId 	"PhBDiffuseRefractor"
extern bool IsPhBDiffuseRefractor(SFNode*);

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

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