// PhB3DNoiseTexture.H: PhB3DNoiseTexture 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 _PhB3DNoiseTexture_H_
#define _PhB3DNoiseTexture_H_

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

// utility includes
#include "PerlinNoise.H"
// end of utility includes

namespace xrml {
#define PhB3DNoiseTextureTypeId 	"PhB3DNoiseTexture"
extern bool IsPhB3DNoiseTexture(SFNode*);

class PhB3DNoiseTexture: public virtual SFNode, public PhB3DTexture {
private:
  //
  void clone_here(const PhB3DNoiseTexture&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    k_updated = 0x1 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhB3DNoiseTexture();
  PhB3DNoiseTexture(const PhB3DNoiseTexture&);
  PhB3DNoiseTexture& operator=(const PhB3DNoiseTexture&);
  virtual ~PhB3DNoiseTexture();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  SFFloat          	k;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_k(const SFFloat&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_k(const SFFloat&);
  
  // update status
  inline bool      	k_is_updated(void) { return (status & k_updated); }
  inline void      	k_clear_update(void) { status &= ~k_updated; }
  
  // utility members
  PerlinNoise           noise;
  bool                  noiseInit;
  float                 value[2];       // let value point to tis float anytime, but change value (2nd value = 1 - 1st value)

  float *values(const Vec3& point, int *nrChannels);
  
protected:
  inline void util_init(void) { noiseInit = false; }
  inline void util_clone(const PhB3DNoiseTexture& src) { util_init(); }
  inline void util_destruct(void) { }
};

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