Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

openvrml::vrml97_node::viewpoint_node Class Reference

Viewpoint node instance. More...

Inheritance diagram for openvrml::vrml97_node::viewpoint_node:

Inheritance graph
[legend]
Collaboration diagram for openvrml::vrml97_node::viewpoint_node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 viewpoint_node (const node_type &type, const scope_ptr &scope)
 Construct.

virtual ~viewpoint_node () throw ()
 Destroy.

virtual const mat4ftransformation () const throw ()
 Get the transformation of the viewpoint_node in the global coordinate system.

virtual const mat4fuser_view_transform () const throw ()
 Get the transformation of the user view relative to the viewpoint_node.

virtual void user_view_transform (const mat4f &transform) throw ()
 Set the transformation of the user view relative to the viewpoint_node.

virtual const std::string & description () const throw ()
 description accessor.

virtual float field_of_view () const throw ()
 Get the field of view.

const sfrotationorientation () const
 orientation accessor.

const sfvec3fposition () const
 position accessor.


Private Member Functions

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

virtual void do_relocate () throw (std::bad_alloc)
 Relocate.

virtual void do_shutdown (double timestamp) throw ()
 Shut down.

void process_set_bind (const field_value &value, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_bind eventIn handler.

void process_set_fieldOfView (const field_value &value, double timestamp) throw (std::bad_cast)
 set_fieldOfView eventIn handler.

void process_set_jump (const field_value &value, double timestamp) throw (std::bad_cast)
 set_jump eventIn handler.

void process_set_orientation (const field_value &value, double timestamp) throw (std::bad_cast)
 set_orientation eventIn handler.

void process_set_position (const field_value &value, double timestamp) throw (std::bad_cast)
 set_position eventIn handler.

void update_final_transformation () const throw ()
 Update final_transformation.


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.

mat4f parent_transform
 The accumulated transformation applied by any parent nodes.

mat4f final_transformation
 The product of parent_transform and any transformation applied by the Viewpoint node.

bool final_transformation_dirty
 Flag that indicates if final_transformation needs to be updated.

mat4f user_view_transform_
 The transformation applied to the user view.


Friends

class viewpoint_class
 Class object for Viewpoint instances.


Detailed Description

Viewpoint node instance.


Constructor & Destructor Documentation

openvrml::vrml97_node::viewpoint_node::viewpoint_node const node_type type,
const scope_ptr scope
 

Construct.

Parameters:
type the node_type associated with the instance.
scope the scope that the new node will belong to.

Reimplemented from openvrml::viewpoint_node.


Member Function Documentation

const std::string & openvrml::vrml97_node::viewpoint_node::description  )  const throw () [virtual]
 

description accessor.

Returns:
the description.

Implements openvrml::viewpoint_node.

void openvrml::vrml97_node::viewpoint_node::do_initialize double  timestamp  )  throw () [private, virtual]
 

Initialize.

Parameters:
timestamp the current time.

Reimplemented from openvrml::node.

void openvrml::vrml97_node::viewpoint_node::do_relocate  )  throw (std::bad_alloc) [private, virtual]
 

Relocate.

Exceptions:
std::bad_alloc if memory allocation fails.

Reimplemented from openvrml::node.

void openvrml::vrml97_node::viewpoint_node::do_shutdown double  timestamp  )  throw () [private, virtual]
 

Shut down.

Parameters:
timestamp the current time.

Reimplemented from openvrml::node.

float openvrml::vrml97_node::viewpoint_node::field_of_view  )  const throw () [virtual]
 

Get the field of view.

Returns:
the field of view in radians.

Implements openvrml::viewpoint_node.

const sfrotation & openvrml::vrml97_node::viewpoint_node::orientation  )  const
 

orientation accessor.

Returns:
the orientation.

const sfvec3f & openvrml::vrml97_node::viewpoint_node::position  )  const
 

position accessor.

Returns:
the position.

void openvrml::vrml97_node::viewpoint_node::process_set_bind const field_value value,
double  timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_bind eventIn handler.

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

void openvrml::vrml97_node::viewpoint_node::process_set_fieldOfView const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_fieldOfView eventIn handler.

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

void openvrml::vrml97_node::viewpoint_node::process_set_jump const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_jump eventIn handler.

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

void openvrml::vrml97_node::viewpoint_node::process_set_orientation const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_orientation eventIn handler.

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

void openvrml::vrml97_node::viewpoint_node::process_set_position const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_position eventIn handler.

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

const mat4f & openvrml::vrml97_node::viewpoint_node::transformation  )  const throw () [virtual]
 

Get the transformation of the viewpoint_node in the global coordinate system.

Returns:
the transformation of the viewpoint_node in the global coordinate system.

Implements openvrml::viewpoint_node.

void openvrml::vrml97_node::viewpoint_node::update_final_transformation  )  const throw () [private]
 

Update final_transformation.

If final_transformation_dirty is true, update final_transformation and sets final_transformation_dirty to false; otherwise, do nothing.

void openvrml::vrml97_node::viewpoint_node::user_view_transform const mat4f transform  )  throw () [virtual]
 

Set the transformation of the user view relative to the viewpoint_node.

Parameters:
transform the new transformation.

Implements openvrml::viewpoint_node.

const mat4f & openvrml::vrml97_node::viewpoint_node::user_view_transform  )  const throw () [virtual]
 

Get the transformation of the user view relative to the viewpoint_node.

Returns:
the transformation of the user view relative to the viewpoint_node.

Implements openvrml::viewpoint_node.


Member Data Documentation

mat4f openvrml::vrml97_node::viewpoint_node::user_view_transform_ [private]
 

The transformation applied to the user view.

Generally the result of any user navigation.