// PhBPhaseFunction.H: PhBPhaseFunction 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 _PhBPhaseFunction_H_
#define _PhBPhaseFunction_H_

#include "xrml.H"

// utility includes
#include "vector.H"
#include "stdio.h"
// end of utility includes

namespace xrml {
#define PhBPhaseFunctionTypeId 	"PhBPhaseFunction"
extern bool IsPhBPhaseFunction(SFNode*);

class PhBPhaseFunction: public virtual SFNode {
public:
  //
  virtual int major_version(void), minor_version(void);
  virtual bool is_leaf_class(void);
  
  PhBPhaseFunction();
  
  //
  virtual void     	render(void);
  
  // utility members
  virtual float albedo(const Vec3& inDir,
		       int modes)
  {
    fprintf(stderr, "%s::albedo(): not yet implemented.\n", typeId);
    return 0.;
  }

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

  virtual float eval(const Vec3& inDir,
		     const Vec3& outDir,
		     int modes, 
		     float *pdf)
  {
    fprintf(stderr, "%s::eval(): not yet implemented.\n", typeId);
    if (pdf) *pdf = 0.;
    return 0.;
  }
  
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBPhaseFunction& src) { }
  inline void util_destruct(void) { }
};

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