// PhBProcedural3DTexture.H: PhBProcedural3DTexture 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 _PhBProcedural3DTexture_H_
#define _PhBProcedural3DTexture_H_

#include "xrml.H"
#include "PhB3DTexture.H"

// utility includes
// end of utility includes

namespace xrml {
#define PhBProcedural3DTextureTypeId 	"PhBProcedural3DTexture"
extern bool IsPhBProcedural3DTexture(SFNode*);

class PhBProcedural3DTexture: public virtual SFNode, public PhB3DTexture {
private:
  //
  void clone_here(const PhBProcedural3DTexture&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    url_updated = 0x1 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBProcedural3DTexture();
  PhBProcedural3DTexture(const PhBProcedural3DTexture&);
  PhBProcedural3DTexture& operator=(const PhBProcedural3DTexture&);
  virtual ~PhBProcedural3DTexture();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  MFString         	url;
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_url(const MFString&);
  
  // update status
  inline bool      	url_is_updated(void) { return (status & url_updated); }
  inline void      	url_clear_update(void) { status &= ~url_updated; }
  
  // utility members
    float *values(const Vec3& point, int *nrChannels);

protected:
  // returns the array of floating point values of the texture 
  // at the given point. The number of channels is returned in
  // 'numchannels'.
  float *(*get_values)(const Vec3& point, int *numchannels);

  inline void util_init(void) { }
  inline void util_clone(const PhBProcedural3DTexture& src) { }
  inline void util_destruct(void) { }
};

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