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

openvrml::vrml97_node::inline_node Class Reference

Represents Inline node instances. More...

Inheritance diagram for openvrml::vrml97_node::inline_node:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

virtual ~inline_node () throw ()
 Destroy.

virtual void render (openvrml::viewer &viewer, rendering_context context)
 Render the node.

virtual inline_nodeto_inline () const
 Cast to an inline_node.

virtual const std::vector<
node_ptr > & 
children () const throw ()
 Get the children in the scene graph.

virtual void activate (double timestamp, bool over, bool active, double *p)

Private Member Functions

void load ()
 Load the children from the URL.

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


Private Attributes

sfvec3f bboxCenter
 bboxCenter field.

sfvec3f bboxSize
 bboxSize field.

mfstring url
 url exposedField.

openvrml::sceneinlineScene
 The contained scene.

bool hasLoaded
 Flag to indicate whether the scene has been loaded.


Friends

class inline_class
 Class object for Inline nodes.


Detailed Description

Represents Inline node instances.


Constructor & Destructor Documentation

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

Construct.

Parameters:
type the node_type associated with this node.
scope the scope to which the node belongs.

Member Function Documentation

void openvrml::vrml97_node::inline_node::activate double  time,
bool  isOver,
bool  isActive,
double *  p
[virtual]
 

Pass on to enabled touchsensor child.

Implements openvrml::grouping_node.

const std::vector< node_ptr > & openvrml::vrml97_node::inline_node::children  )  const throw () [virtual]
 

Get the children in the scene graph.

Returns:
the child nodes in the scene graph.

Implements openvrml::grouping_node.

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

set_url eventIn handler.

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

Todo:
Currently this only changes the field value; it does not load a new Scene.

void openvrml::vrml97_node::inline_node::render openvrml::viewer viewer,
rendering_context  context
[virtual]
 

Render the node.

Render each of the children.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::node.

inline_node * openvrml::vrml97_node::inline_node::to_inline  )  const [virtual]
 

Cast to an inline_node.

Returns:
a pointer to the inline_node.