// PhBBrushMap.H: PhBBrushMap 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 _PhBBrushMap_H_
#define _PhBBrushMap_H_

#include "xrml.H"
#include "PhBSurfaceDistortion.H"
#include "PhBTexture.H"
#include "Transform.H"

// utility includes
// end of utility includes

namespace xrml {
#define PhBBrushMapTypeId 	"PhBBrushMap"
extern bool IsPhBBrushMap(SFNode*);

class PhBBrushMap: public virtual SFNode, public PhBSurfaceDistortion {
private:
  //
  void clone_here(const PhBBrushMap&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    texture_updated = 0x1,
    transform_updated = 0x2 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBBrushMap();
  PhBBrushMap(const PhBBrushMap&);
  PhBBrushMap& operator=(const PhBBrushMap&);
  virtual ~PhBBrushMap();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  //  PhBTexture*      	texture;
  //  Transform*       	transform;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_texture(SFNode*);
  void             	set_transform(SFNode*);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_texture(SFNode*);
  bool             	assign_transform(SFNode*);
  
  // update status
  inline bool      	texture_is_updated(void) { return (status & texture_updated); }
  inline void      	texture_clear_update(void) { status &= ~texture_updated; }
  inline bool      	transform_is_updated(void) { return (status & transform_updated); }
  inline void      	transform_clear_update(void) { status &= ~transform_updated; }
  
  // utility members
  Mat3 distort(const Vec3 point);
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBBrushMap& src) { }
  inline void util_destruct(void) { }
};

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