// Cylinder.H: Cylinder 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 _Cylinder_H_
#define _Cylinder_H_

#include "xrml.H"
#include "Geometry.H"

// utility includes
// end of utility includes

namespace xrml {
#define CylinderTypeId 	"Cylinder"
extern bool IsCylinder(SFNode*);

class Cylinder: public virtual SFNode, public Geometry {
private:
  //
  void clone_here(const Cylinder&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    bottom_updated = 0x1,
    height_updated = 0x2,
    radius_updated = 0x4,
    side_updated = 0x8,
    top_updated = 0x10 
  };
  
public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  Cylinder();
  Cylinder(const Cylinder&);
  Cylinder& operator=(const Cylinder&);
  virtual ~Cylinder();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  SFBool           	bottom;
  SFFloat          	height;
  SFFloat          	radius;
  SFBool           	side;
  SFBool           	top;
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_bottom(const SFBool&);
  bool             	assign_height(const SFFloat&);
  bool             	assign_radius(const SFFloat&);
  bool             	assign_side(const SFBool&);
  bool             	assign_top(const SFBool&);
  
  // update status
  inline bool      	bottom_is_updated(void) { return (status & bottom_updated); }
  inline void      	bottom_clear_update(void) { status &= ~bottom_updated; }
  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      	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
  void discretize(void);
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const Cylinder& src) { }
  inline void util_destruct(void) { }
};

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