// PhBConeTextureProjection.H: PhBConeTextureProjection 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 _PhBConeTextureProjection_H_
#define _PhBConeTextureProjection_H_

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

// utility includes
// end of utility includes

namespace xrml {
#define PhBConeTextureProjectionTypeId 	"PhBConeTextureProjection"
extern bool IsPhBConeTextureProjection(SFNode*);

class PhBConeTextureProjection: public virtual SFNode, public PhBTextureProjection {
private:
  //
  void clone_here(const PhBConeTextureProjection&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    bottomRadius_updated = 0x1,
    height_updated = 0x2,
    side_updated = 0x4,
    bottom_updated = 0x8 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  PhBConeTextureProjection();
  PhBConeTextureProjection(const PhBConeTextureProjection&);
  PhBConeTextureProjection& operator=(const PhBConeTextureProjection&);
  virtual ~PhBConeTextureProjection();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  SFFloat          	bottomRadius;
  SFFloat          	height;
  SFBool           	side;
  SFBool           	bottom;
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_bottomRadius(const SFFloat&);
  void             	set_height(const SFFloat&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_bottomRadius(const SFFloat&);
  bool             	assign_height(const SFFloat&);
  bool             	assign_side(const SFBool&);
  bool             	assign_bottom(const SFBool&);
  
  // update status
  inline bool      	bottomRadius_is_updated(void) { return (status & bottomRadius_updated); }
  inline void      	bottomRadius_clear_update(void) { status &= ~bottomRadius_updated; }
  inline bool      	height_is_updated(void) { return (status & height_updated); }
  inline void      	height_clear_update(void) { status &= ~height_updated; }
  inline bool      	side_is_updated(void) { return (status & side_updated); }
  inline void      	side_clear_update(void) { status &= ~side_updated; }
  inline bool      	bottom_is_updated(void) { return (status & bottom_updated); }
  inline void      	bottom_clear_update(void) { status &= ~bottom_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 PhBConeTextureProjection& src) { }
  inline void util_destruct(void) { }
};

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