Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

Viewpoint Class Reference

Inheritance diagram for Viewpoint:

AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

 Viewpoint (const NodeType &nodeType, const ScopePtr &scope)
 Constructor.

virtual ~Viewpoint () throw ()
 Destructor.

virtual Viewpoint * toViewpoint () const
 Viewpoint cast implementation.

virtual void accumulateTransform (Node *)
virtual NodegetParentTransform ()
 Get the parent Transform.

const SFFloatgetFieldOfView () const
 fieldOfView accessor.

const SFRotationgetOrientation () const
 orientation accessor.

const SFVec3fgetPosition () const
 position accessor.

const SFStringgetDescription () const
 description accessor.

const BVolumegetBVolume () const
 Get the bounding volume.

void getInverseMatrix (VrmlMatrix &M) const
 Get the inverse of the transform represented by the viewpoint's position and orientation fields.

void getFrustum (VrmlFrustum &frust) const

Private Methods

virtual void initializeImpl (double timestamp) throw ()
 Initialize.

void processSet_bind (const FieldValue &sfbool, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_bind eventIn handler.

void processSet_fieldOfView (const FieldValue &sffloat, double timestamp) throw (std::bad_cast)
 set_fieldOfView eventIn handler.

void processSet_jump (const FieldValue &sfbool, double timestamp) throw (std::bad_cast)
 set_jump eventIn handler.

void processSet_orientation (const FieldValue &sfrotation, double timestamp) throw (std::bad_cast)
 set_orientation eventIn handler.

void processSet_position (const FieldValue &sfvec3f, double timestamp) throw (std::bad_cast)
 set_position eventIn handler.


Private Attributes

SFFloat fieldOfView
 fieldOfView exposedField.

SFBool jump
 jump exposedField.

SFRotation orientation
 orientation exposedField.

SFVec3f position
 position exposedField.

SFString description
 description field.

SFBool bound
 isBound eventOut.

SFTime bindTime
 bindTime eventOut.

NodeparentTransform
 A pointer to the parent Transform for this node.


Friends

class ViewpointClass
 Class object for Viewpoint instances.


Detailed Description

Todo:
need copy constructor for d_parentTransform ...


Constructor & Destructor Documentation

Viewpoint const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

Parameters:
nodeType the NodeType associated with the instance.
scope the Scope that the new node will belong to.

~Viewpoint   throw () [virtual]
 

Destructor.


Member Function Documentation

void accumulateTransform Node   parent [virtual]
 

Cache a pointer to (one of the) parent transforms for proper rendering of bindables.

Reimplemented from Node.

const BVolume * getBVolume   const [virtual]
 

Get the bounding volume.

Returns:
the bounding volume associated with the node.

Reimplemented from Node.

const SFString & getDescription   const
 

description accessor.

Returns:
the description.

const SFFloat & getFieldOfView   const
 

fieldOfView accessor.

Returns:
the fieldOfView.

void getFrustum VrmlFrustum   frust const
 

Todo:
Implement me!

void getInverseMatrix VrmlMatrix   mat const
 

Get the inverse of the transform represented by the viewpoint's position and orientation fields.

Return the matrix in VrmlMatrix format (same as OGL). Note that this method deals only with the viewpoint node's transform, not with any ancestor transforms.

Parameters:
mat inverse of the position/orientation transform.

const SFRotation & getOrientation   const
 

orientation accessor.

Returns:
the orientation.

Node * getParentTransform   [virtual]
 

Get the parent Transform.

Since Viewpoint nodes should never be instanced, they should not have multiple parent Transform nodes.

Returns:
the most immediate parent Transform node.

Reimplemented from Node.

const SFVec3f & getPosition   const
 

position accessor.

Returns:
the position.

void initializeImpl double    timestamp throw () [private, virtual]
 

Initialize.

Parameters:
timestamp the current time.

Reimplemented from Node.

void processSet_bind const FieldValue   sfbool,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_bind eventIn handler.

Parameters:
sfbool an SFBool value.
timestamp the current time.
Exceptions:
std::bad_cast if sfbool is not an SFBool value.
std::bad_alloc if memory allocation fails.

void processSet_fieldOfView const FieldValue   sffloat,
double    timestamp
throw (std::bad_cast) [private]
 

set_fieldOfView eventIn handler.

Parameters:
sffloat an SFFloat value.
timestamp the current time.
Exceptions:
std::bad_cast if sffloat is not an SFFloat value.
std::bad_alloc if memory allocation fails.

void processSet_jump const FieldValue   sfbool,
double    timestamp
throw (std::bad_cast) [private]
 

set_jump eventIn handler.

Parameters:
sfbool an SFBool value.
timestamp the current time.
Exceptions:
std::bad_cast if sfbool is not an SFBool value.
std::bad_alloc if memory allocation fails.

void processSet_orientation const FieldValue   sfrotation,
double    timestamp
throw (std::bad_cast) [private]
 

set_orientation eventIn handler.

Parameters:
sfrotation an SFRotation value.
timestamp the current time.
Exceptions:
std::bad_cast if sfrotation is not an SFRotation value.
std::bad_alloc if memory allocation fails.

void processSet_position const FieldValue   sfvec3f,
double    timestamp
throw (std::bad_cast) [private]
 

set_position eventIn handler.

Parameters:
sfvec3f an SFVec3f value.
timestamp the current time.
Exceptions:
std::bad_cast if sfvec3f is not an SFVec3f value.
std::bad_alloc if memory allocation fails.

Viewpoint * toViewpoint   const [virtual]
 

Viewpoint cast implementation.

Returns:
a pointer to this Viewpoint.

Reimplemented from Node.


Friends And Related Function Documentation

ViewpointClass [friend]
 

Class object for Viewpoint instances.


Member Data Documentation

SFTime bindTime [private]
 

bindTime eventOut.

SFBool bound [private]
 

isBound eventOut.

SFString description [private]
 

description field.

SFFloat fieldOfView [private]
 

fieldOfView exposedField.

SFBool jump [private]
 

jump exposedField.

SFRotation orientation [private]
 

orientation exposedField.

Node * parentTransform [private]
 

A pointer to the parent Transform for this node.

SFVec3f position [private]
 

position exposedField.