H3D::X3DBindableNode Class Reference
[Abstract nodes.]

X3DBindableNode is the abstract base type for all bindable children nodes, including Background, TextureBackground, Fog, NavigationInfo, Viewpoint and DeviceInfo. More...

#include <H3D/X3DBindableNode.h>

Inheritance diagram for H3D::X3DBindableNode:

Inheritance graph

List of all members.

Classes

struct  SFSetBind
 The SFSetBind field calls toStackTop() and removeFromStack() on the X3DBindableNode it is in depending on the value that it is set to. More...

Public Member Functions

 X3DBindableNode (const string &_bindable_stack_name, Inst< SFSetBind > _set_bind=0, Inst< SFNode > _metadata=0, Inst< SFTime > _bindTime=0, Inst< SFBool > _isBound=0)
 Constructor.
virtual ~X3DBindableNode ()
 Destructor.
virtual void toStackTop ()
 Move this instance to the stack top.
virtual void removeFromStack ()
 Remove the bindable node from the stack.
bool isStackTop ()
 Is this node at the top of the stack.

Static Public Member Functions

static X3DBindableNodegetActive (const string &bindable_stack_name)
 Returns the active bindable instance, i.e.
static const StackType & getStack (const string &bindable_stack_name)
 Get the stack for a given name.

Public Attributes

auto_ptr< SFSetBindset_bind
 Input field to bind or unbind the node.
auto_ptr< SFTimebindTime
 The bindTime field is the time at which the Viewpoint node is bound or unbound.
auto_ptr< SFBoolisBound
 Output field telling if this node is bound or not.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodedatabase for this node.

Static Protected Attributes

static StackMapType stack
 The bindable stack.


Detailed Description

X3DBindableNode is the abstract base type for all bindable children nodes, including Background, TextureBackground, Fog, NavigationInfo, Viewpoint and DeviceInfo.

These nodes have the unique behaviour that only one of each type can be bound (i.e., affect the user's experience) at any instant in time. The browser shall maintain an independent, separate stack for each type of bindable node. Each of these nodes includes a set_bind inputOnly field and an isBound outputOnly field. The set_bind inputOnly field is used to move a given node to and from its respective top of stack. A TRUE value sent to the set_bind inputOnly field moves the node to the top of the stack; sending a FALSE value removes it from the stack. The isBound event is output when a given node is:

That is, isBound events are sent when a given node becomes, or ceases to be, the active node. The node at the top of the stack (the most recently bound node) is the active node for its type and is used by the browser to set the world state. If the stack is empty (i.e., either the X3D file has no bindable nodes for a given type or the stack has been popped until empty), the default field values for that node type are used to set world state. The results are undefined if a multiply instanced (DEF/USE) bindable node is bound.

The following rules describe the behaviour of the binding stack for a node of type X3DBindableNode:

The results are undefined if a bindable node is bound and is the child of an LOD, Switch, or any node or prototype that disables its children.

Member Function Documentation

static X3DBindableNode* H3D::X3DBindableNode::getActive ( const string &  bindable_stack_name  )  [inline, static]


Member Data Documentation

The bindTime field is the time at which the Viewpoint node is bound or unbound.

Access type: outputOnly

Referenced by removeFromStack(), and toStackTop().

Output field telling if this node is bound or not.

Access type: outputOnly

Referenced by removeFromStack(), and toStackTop().

Input field to bind or unbind the node.

Access type: inputOnly
Valid range: TRUE or FALSE

Referenced by H3D::Scene::replaceWorld().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:23 2008 for H3D API by  doxygen 1.5.7