// PhBCylinderTextureProjection.H: PhBCylinderTextureProjection 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 _PhBCylinderTextureProjection_H_
#define _PhBCylinderTextureProjection_H_

#include "xrml.H"
#include "PhBTextureProjection.H"

// utility includes
// end of utility includes

namespace xrml {
#define PhBCylinderTextureProjectionTypeId 	"PhBCylinderTextureProjection"
extern bool IsPhBCylinderTextureProjection(SFNode*);

class PhBCylinderTextureProjection: public virtual SFNode, public PhBTextureProjection {
private:
  //
  void clone_here(const PhBCylinderTextureProjection&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    height_updated = 0x1,
    radius_updated = 0x2,
    bottom_updated = 0x4,
    side_updated = 0x8,
    top_updated = 0x10 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBCylinderTextureProjection();
  PhBCylinderTextureProjection(const PhBCylinderTextureProjection&);
  PhBCylinderTextureProjection& operator=(const PhBCylinderTextureProjection&);
  virtual ~PhBCylinderTextureProjection();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  SFFloat          	height;
  SFFloat          	radius;
  SFBool           	bottom;
  SFBool           	side;
  SFBool           	top;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_height(const SFFloat&);
  void             	set_radius(const SFFloat&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_height(const SFFloat&);
  bool             	assign_radius(const SFFloat&);
  bool             	assign_bottom(const SFBool&);
  bool             	assign_side(const SFBool&);
  bool             	assign_top(const SFBool&);
  
  // update status
  inline bool      	height_is_updated(void) { return (status & height_updated); }
  inline void      	height_clear_update(void) { status &= ~height_updated; }
  inline bool      	radius_is_updated(void) { return (status & radius_updated); }
  inline void      	radius_clear_update(void) { status &= ~radius_updated; }
  inline bool      	bottom_is_updated(void) { return (status & bottom_updated); }
  inline void      	bottom_clear_update(void) { status &= ~bottom_updated; }
  inline bool      	side_is_updated(void) { return (status & side_updated); }
  inline void      	side_clear_update(void) { status &= ~side_updated; }
  inline bool      	top_is_updated(void) { return (status & top_updated); }
  inline void      	top_clear_update(void) { status &= ~top_updated; }
  
  // utility members
  Vec3 object2surface(const Vec3& objectCoord,
		      Vec3 *x,
		      Vec3 *y,
		      Vec3 *z);
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const PhBCylinderTextureProjection& src) { }
  inline void util_destruct(void) { }
};

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