// Viewpoint.H: Viewpoint 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 _Viewpoint_H_
#define _Viewpoint_H_

#include "xrml.H"
#include "Bindable.H"
#include "Children.H"

// utility includes
// end of utility includes

namespace xrml {
#define ViewpointTypeId 	"Viewpoint"
extern bool IsViewpoint(SFNode*);

class Viewpoint: public virtual SFNode, public Bindable, public Children {
private:
  //
  void clone_here(const Viewpoint&);
  void destruct(void);
  
  // field/eventOut update status bits
  // Use xxx_is_updated() and xxx_clear_update() to inspect/reset.
  enum status_bits {
    fieldOfView_updated = 0x1,
    jump_updated = 0x2,
    orientation_updated = 0x4,
    position_updated = 0x8,
    description_updated = 0x10,
    bindTime_updated = 0x20,
    isBound_updated = 0x40 
  };
  
protected:
  // raw eventOut posting:
  void post_bindTime(void);
  void post_isBound(void);

public:
  //
  int major_version(void), minor_version(void);
  bool is_leaf_class(void);
  
  Viewpoint();
  Viewpoint(const Viewpoint&);
  Viewpoint& operator=(const Viewpoint&);
  virtual ~Viewpoint();
  
  //
  SFNode*          	instantiate(Proto * =0);
  void             	render(void);
  
  // state values:
  // Do not assign directly unless you know very well what you are doing.
  SFFloat          	fieldOfView;
  SFBool           	jump;
  SFRotation       	orientation;
  SFVec3f          	position;
  SFString         	description;
  
  // eventIns:
  void             	set_bind(const SFBool&);
  
  // set_<exposedField> eventIns: with forwarding and eventOut generation
  void             	set_fieldOfView(const SFFloat&);
  void             	set_jump(const SFBool&);
  void             	set_orientation(const SFRotation&);
  void             	set_position(const SFVec3f&);
  
  // field assignement: no forwarding or eventOut generation!
  bool             	assign_fieldOfView(const SFFloat&);
  bool             	assign_jump(const SFBool&);
  bool             	assign_orientation(const SFRotation&);
  bool             	assign_position(const SFVec3f&);
  bool             	assign_description(const SFString&);
  
  // eventOuts:
  SFTime            	bindTime;
  void             	post_bindTime(const SFTime& val);
  //  SFBool            	isBound;
  void             	post_isBound(const SFBool& val);
  
  // update status
  inline bool      	fieldOfView_is_updated(void) { return (status & fieldOfView_updated); }
  inline void      	fieldOfView_clear_update(void) { status &= ~fieldOfView_updated; }
  inline bool      	jump_is_updated(void) { return (status & jump_updated); }
  inline void      	jump_clear_update(void) { status &= ~jump_updated; }
  inline bool      	orientation_is_updated(void) { return (status & orientation_updated); }
  inline void      	orientation_clear_update(void) { status &= ~orientation_updated; }
  inline bool      	position_is_updated(void) { return (status & position_updated); }
  inline void      	position_clear_update(void) { status &= ~position_updated; }
  inline bool      	description_is_updated(void) { return (status & description_updated); }
  inline void      	description_clear_update(void) { status &= ~description_updated; }
  inline bool      	bindTime_is_updated(void) { return (status & bindTime_updated); }
  inline void      	bindTime_clear_update(void) { status &= ~bindTime_updated; }
  inline bool      	isBound_is_updated(void) { return (status & isBound_updated); }
  inline void      	isBound_clear_update(void) { status &= ~isBound_updated; }
  
  // utility members
  
protected:
  inline void util_init(void) { }
  inline void util_clone(const Viewpoint& src) { }
  inline void util_destruct(void) { }
};

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