#include <X3DBindableNode.h>
Inheritance diagram for H3D::X3DBindableNode:

Public Types | |
| typedef std::deque< X3DBindableNode * > | StackType |
| typedef map< string, StackType > | StackMapType |
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 X3DBindableNode * | getActive (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< SFSetBind > | set_bind |
| Input field to bind or unbind the node. | |
| auto_ptr< SFTime > | bindTime |
| The bindTime field is the time at which the Viewpoint node is bound or unbound. | |
| auto_ptr< SFBool > | isBound |
| Output field telling if this node is bound or not. | |
Static Public Attributes | |
| static H3DNodeDatabase | database |
| The H3DNodedatabase for this node. | |
Protected Attributes | |
| string | bindable_stack_name |
Static Protected Attributes | |
| static StackMapType | stack |
| The bindable stack. | |
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... | |
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 <bindable node>="">:
|
|
Returns the active bindable instance, i.e. the instance on the top of the bindable stack. |
|
|
The bindTime field is the time at which the Viewpoint node is bound or unbound.
Access type: outputOnly |
|
|
Output field telling if this node is bound or not.
Access type: outputOnly |
|
|
Input field to bind or unbind the node.
Access type: inputOnly |
1.4.5