Home | Download | Screen shots | Discussion | Documentation |
---|
Public Member Functions | |
viewpoint_class (openvrml::browser &browser) | |
Construct. | |
virtual | ~viewpoint_class () throw () |
Destroy. | |
void | set_first (viewpoint_node &viewpoint) throw () |
Set the first Viewpoint node in the world. | |
bool | has_first () const throw () |
Check to see if the first node has been set. | |
void | bind (viewpoint_node &viewpoint, double timestamp) throw (std::bad_alloc) |
Push a Viewpoint on the top of the bound node stack. | |
void | unbind (viewpoint_node &viewpoint, double timestamp) throw () |
Remove a Viewpoint from the bound node stack. | |
virtual void | do_initialize (openvrml::viewpoint_node *initial_viewpoint, double timestamp) throw () |
node_class-specific initialization. | |
Private Types | |
typedef std::vector < viewpoint_node * > | bound_nodes_t |
A stack of bound Viewpoint nodes. | |
Private Member Functions | |
virtual const node_type_ptr | do_create_type (const std::string &id, const node_interface_set &interfaces) const throw (unsupported_interface, std::bad_alloc) |
Create a node_type. | |
Private Attributes | |
viewpoint_node * | first |
The first Viewpoint node in the initial scene graph. | |
bound_nodes_t | bound_nodes |
The stack of bound Viewpoint nodes. |
A stack of bound Viewpoint nodes.
openvrml::vrml97_node::viewpoint_class::viewpoint_class | ( | openvrml::browser & | browser | ) | [explicit] |
openvrml::vrml97_node::viewpoint_class::~viewpoint_class | ( | ) | throw () [virtual] |
Destroy.
void openvrml::vrml97_node::viewpoint_class::set_first | ( | viewpoint_node & | viewpoint | ) | throw () |
Set the first Viewpoint node in the world.
The first Viewpoint node in the world is used as the initial viewpoint. This method is used by viewpoint_node::do_initialize.
viewpoint | a Viewpoint node. |
bool openvrml::vrml97_node::viewpoint_class::has_first | ( | ) | const throw () |
Check to see if the first node has been set.
This method is used by viewpoint_node::do_initialize.
true
if the first node has already been set; false
otherwise. void openvrml::vrml97_node::viewpoint_class::bind | ( | viewpoint_node & | viewpoint, | |
double | timestamp | |||
) | throw (std::bad_alloc) |
void openvrml::vrml97_node::viewpoint_class::unbind | ( | viewpoint_node & | viewpoint, | |
double | timestamp | |||
) | throw () |
void openvrml::vrml97_node::viewpoint_class::do_initialize | ( | openvrml::viewpoint_node * | initial_viewpoint, | |
double | timestamp | |||
) | throw () [virtual] |
node_class-specific initialization.
initial_viewpoint | the viewpoint_node that should be bound initially. | |
timestamp | the current time. |
Reimplemented from openvrml::node_class.
const node_type_ptr openvrml::vrml97_node::viewpoint_class::do_create_type | ( | const std::string & | id, | |
const node_interface_set & | interfaces | |||
) | const throw (unsupported_interface, std::bad_alloc) [private, virtual] |
Create a node_type.
unsupported_interface | if interfaces includes an interface not supported by viewpoint_class. | |
std::bad_alloc | if memory allocation fails. |
Implements openvrml::node_class.
The stack of bound Viewpoint nodes.