Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

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

# openvrml::vrml97_node::viewpoint_node Class Reference

Inheritance diagram for openvrml::vrml97_node::viewpoint_node:

[legend]
List of all members.

## Detailed Description

Viewpoint node instance.

## Public Member Functions

| viewpoint_node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope)
| Construct.
virtual | ~viewpoint_node () throw ()
| Destroy.
virtual const mat4f & | transformation () const throw ()
| Get the transformation of the viewpoint_node in the global coordinate system.
virtual const mat4f & | user_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 sfrotation & | orientation () const
| orientation accessor.
const sfvec3f & | position () 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 | update_final_transformation () const throw ()
| Update final_transformation.

## Private Attributes

set_bind_listener | set_bind_listener_
| set_bind eventIn handler.
exposedfield< sffloat > | field_of_view_
| fieldOfView exposedField.
exposedfield< sfbool > | jump_
| jump exposedField.
orientation_exposedfield | orientation_
| orientation exposedField.
position_exposedfield | position_
| position exposedField.
sfstring | description_
| description field.
sfbool | is_bound_
| isBound eventOut value.
sfbool_emitter | is_bound_emitter_
| isBound eventOut emitter.
sftime | bind_time_
| bindTime eventOut value.
sftime_emitter | bind_time_emitter_
| bindTime eventOut emitter.
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 nodes.

## Classes

class | set_bind_listener
| set_bind eventIn listener. More...
class | orientation_exposedfield
| orientation exposedField implementation. More...
class | position_exposedfield
| position exposedField implementation. More...

## Constructor & Destructor Documentation

openvrml::vrml97_node::viewpoint_node::viewpoint_node | ( | const node_type & | type,
|  | const boost::shared_ptr< openvrml::scope > & | 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.

openvrml::vrml97_node::viewpoint_node::~viewpoint_node | ( |  | ) | throw ()`[virtual]`

| Destroy. Implements openvrml::viewpoint_node.

## Member Function Documentation

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.

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.

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 std::string & openvrml::vrml97_node::viewpoint_node::description | ( |  | ) | const throw ()`[virtual]`

description accessor.

Returns:
  the description.

Implements openvrml::viewpoint_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::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::child_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.

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.

## Friends And Related Function Documentation

class openvrml::vrml97_node::viewpoint_node::viewpoint_class`[friend]`

| Class object for Viewpoint nodes.

## Member Data Documentation

viewpoint_node::set_bind_listener openvrml::vrml97_node::viewpoint_node::set_bind_listener_ `[private]`

| set_bind eventIn handler.

exposedfield< sffloat > openvrml::vrml97_node::viewpoint_node::field_of_view_ `[private]`

| fieldOfView exposedField.

exposedfield< sfbool > openvrml::vrml97_node::viewpoint_node::jump_ `[private]`

| jump exposedField.

viewpoint_node::orientation_exposedfield openvrml::vrml97_node::viewpoint_node::orientation_ `[private]`

| orientation exposedField.

viewpoint_node::position_exposedfield openvrml::vrml97_node::viewpoint_node::position_ `[private]`

| position exposedField.

sfstring openvrml::vrml97_node::viewpoint_node::description_ `[private]`

| description field.

sfbool openvrml::vrml97_node::viewpoint_node::is_bound_ `[private]`

| isBound eventOut value.

sfbool_emitter openvrml::vrml97_node::viewpoint_node::is_bound_emitter_ `[private]`

| isBound eventOut emitter.

sftime openvrml::vrml97_node::viewpoint_node::bind_time_ `[private]`

| bindTime eventOut value.

sftime_emitter openvrml::vrml97_node::viewpoint_node::bind_time_emitter_ `[private]`

| bindTime eventOut emitter.

mat4f openvrml::vrml97_node::viewpoint_node::parent_transform `[private]`

| The accumulated transformation applied by any parent nodes.

mat4f openvrml::vrml97_node::viewpoint_node::final_transformation `[mutable, private]`

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

bool openvrml::vrml97_node::viewpoint_node::final_transformation_dirty `[mutable, private]`

| Flag that indicates if final_transformation needs to be updated.

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

| The transformation applied to the user view. Generally the result of any user navigation.