// PhBSDF.H: PhBSDF 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 _PhBSDF_H_
#define _PhBSDF_H_

#include "xrml.H"

// utility includes
#include "smodes.H"
#include "complex.H"
#include "spectrum.H"
#include "vector.H"
// end of utility includes

namespace xrml {
#define PhBSDFTypeId 	"PhBSDF"
extern bool IsPhBSDF(SFNode*);

class PhBSDF: public virtual SFNode {
public:
  //
  virtual int major_version(void), minor_version(void);
  virtual bool is_leaf_class(void);
  
  PhBSDF();
  
  //
  virtual void     	render(void);
  
  // utility members
  virtual Spectrum eval(const Vec3& inDir,
		const Vec3& outDir,
		const complex& indexIn,
		const complex& indexOut,
		int modes,
		float *pdf)
  {
    fprintf(stderr, "%s::eval(): not yet implemented.\n", typeId);
    if (pdf) *pdf = 0.;
    return Spectrum(0.);
  }

  virtual Vec3 sample(const Vec3& inDir,
	      const complex& indexIn,
	      const complex& indexOut,
	      float xi1, float xi2,
	      int modes)
  {
    fprintf(stderr, "%s::sample(): not yet implemented.\n", typeId);
    return Vec3(0.,0.,1.);
  }
  
  virtual Spectrum albedo(const Vec3& inDir,
		  const complex& indexIn,
		  const complex& indexOut,
		  int modes)
  {
    fprintf(stderr, "%s::albedo(): not yet implemented.\n", typeId);
    return Spectrum(0.);
  }
  


protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBSDF& src) { }
  inline void util_destruct(void) { }
};

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