| Home | Download | Screen shots | Discussion | Documentation |
|---|
Public Member Functions | |
| scene (openvrml::browser &browser, const std::vector< std::string > &url, scene *parent=0) throw (invalid_vrml, no_alternative_url, std::bad_alloc) | |
| Construct a scene from a URI. | |
| void | initialize (double timestamp) throw (std::bad_alloc) |
| Initialize the scene. | |
| const std::vector< node_ptr > & | nodes () const throw () |
| Root nodes for the scene. | |
| const std::string | url () const throw (std::bad_alloc) |
| Get the absolute URI for the scene. | |
| void | render (openvrml::viewer &viewer, rendering_context context) |
| Render the scene. | |
| void | load_url (const std::vector< std::string > &url, const std::vector< std::string > ¶meter) throw (std::bad_alloc) |
| Load a resource into browser. | |
| void | shutdown (double timestamp) throw () |
| Shut down the nodes in the scene. | |
Public Attributes | |
| openvrml::browser & | browser |
| A reference to the browser associated with the scene. | |
| scene *const | parent |
| A pointer to the parent scene. | |
Private Attributes | |
| std::vector< node_ptr > | nodes_ |
| The nodes for the scene. | |
| std::string | url_ |
| The URI for the scene. | |
| openvrml::scene::scene | ( | openvrml::browser & | browser, | |
| const std::vector< std::string > & | url, | |||
| scene * | parent = 0 | |||
| ) | throw (invalid_vrml, no_alternative_url, std::bad_alloc) |
| void openvrml::scene::initialize | ( | double | timestamp | ) | throw (std::bad_alloc) |
Initialize the scene.
| timestamp | the current time. |
| std::bad_alloc | if memory allocation fails. |
| const std::vector< node_ptr > & openvrml::scene::nodes | ( | ) | const throw () [inline] |
| const std::string openvrml::scene::url | ( | ) | const throw (std::bad_alloc) |
| void openvrml::scene::render | ( | openvrml::viewer & | viewer, | |
| rendering_context | context | |||
| ) |
| void openvrml::scene::load_url | ( | const std::vector< std::string > & | url, | |
| const std::vector< std::string > & | parameter | |||
| ) | throw (std::bad_alloc) |
Load a resource into browser.
This method simply resolves any relative references in uri and calls browser::load_url.
| url | an array of URIs. Per VRML97 convention, the first resource in the sequence that can be reached will be loaded into the browser. | |
| parameter | an array of parameters to be associated with the URIs in uri. |
| std::bad_alloc | if memory allocation fails. |
url is invalid. Should this throw invalid_url? | void openvrml::scene::shutdown | ( | double | timestamp | ) | throw () |
mfnode openvrml::scene::nodes_ [private] |
The nodes for the scene.
const std::string openvrml::scene::url_ [private] |
The URI for the scene.
uri may be a relative or an absolute reference.
| scene *const openvrml::scene::parent |