Observers

Callback registration functions for observed node events.

Functions


void VRAddCallbackActivate(HNode node,
EventTwoNodesUserFunc callback,
void * userData,
int flags
)

Event callbacks. Some already exist : VRAddCallbackUpdate for Event::TimeStep VRAddCallbackNodeCreation for Event::Create VRAddCallbackNodeDestruction for Event::Delete VRAddCallbackNodeRenamed for Event::Rename.

View select and View deselect are added despite they are missing in the Event list in vrscript.hpp, 57 Add callback for Activate event of a node and the other node deactivated

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackBreak(HNode node,
EventTwoNodesFunc callback,
void * userData,
int flags
)

Add Break callback (assembly has ceased colliding)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackClick(HNode node,
EventNodeFunc callback,
void * userData,
int flags
)

Add Click callback (button or similar node clicked)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackDoubleClick(HNode node,
EventNodeFunc callback,
void * userData,
int flags
)

Add Double click callback (button or similar node double-clicked)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackEnter(HNode node,
EventNodeFunc callback,
void * userData,
int flags
)

Add Enter callback (a generic state was entered)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackGesture(EventGestureFunc callback,
void * userData,
int flags
)

Add Gesture callback (a hand activated a gesture)

Parameters
callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackKeyPress(EventKeyFunc callback,
void * userData,
int flags
)

Add Key press callback (key was pressed)

Parameters
callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackKeyRelease(EventKeyFunc callback,
void * userData,
int flags
)

Add Key release callback (key was released)

Parameters
callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackLeave(HNode node,
EventNodeFunc callback,
void * userData,
int flags
)

Add Leave callback (a generic state was left)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackMove(HNode node,
EventNodeFunc callback,
void * userData,
int flags
)

Add Move callback. The ‘move’ event applies to sliders, scrollbars and markers in the GUI system in addition to assemblies. It’s not the same as observing the transform property because the move event is also triggered on all the descendant assemblies of the object that has moved.

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackNodeChildAdded(const char * metaName,
NodeChildAddedFunc callback,
void * userData
)

Registers a function to be called whenever a node has a child added to it.

Parameters
metaName

the name of the metanode (type of node) to observe

callback

the function to call on creation

userData

arbitrary data to pass to the callback


void VRAddCallbackNodeChildRemoved(const char * metaName,
NodeChildRemovedFunc callback,
void * userData
)

Registers a function to be called whenever a node has a child removed from it.

Parameters
metaName

the name of the metanode (type of node) to observe

callback

the function to call on creation

userData

arbitrary data to pass to the callback


void VRAddCallbackNodeCreation(const char * metaName,
NodeCreatedFunc callback,
void * userData
)

Registers a function to be called whenever a node is created.

Parameters
metaName

the name of the metanode (type of node) to observe

callback

the function to call on creation

userData

arbitrary data to pass to the callback


void VRAddCallbackNodeDestruction(const char * metaName,
NodeDestroyingFunc callback,
void * userData
)

Registers a function to be called whenever a node is deleted.

Parameters
metaName

the name of the metanode (type of node) to observe

callback

the function to call on deletion

userData

arbitrary data to pass to the callback


void VRAddCallbackNodeParentChanged(const char * metaName,
NodeParentChangedFunc callback,
void * userData
)

Registers a function to be called whenever a node is moved to a new parent.

Parameters
metaName

the name of the metanode (type of node) to observe

callback

the function to call on creation

userData

arbitrary data to pass to the callback


void VRAddCallbackNodeRenamed(const char * metaName,
NodeRenamedFunc callback,
void * userData
)

Registers a function to be called whenever a node is renamed.

Parameters
metaName

the name of the metanode (type of node) to observe

callback

the function to call on creation

userData

arbitrary data to pass to the callback


void VRAddCallbackNodeValuesChanged(const char * metaName,
NodeValuesChangedFunc callback,
void * userData
)

Registers a function to be called whenever a node is modified.

Parameters
metaName

the name of the metanode (type of node) to observe

callback

the function to call on creation

userData

arbitrary data to pass to the callback


void VRAddCallbackPoseEntered(EventKeyFunc callback,
void * userData,
int flags
)

Add Pose entered callback (a hand switched to a pose)

Parameters
callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackPoseLeft(EventKeyFunc callback,
void * userData,
int flags
)

Add Pose left callback (a hand left a pose)

Parameters
callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackPress(HNode node,
EventNodeFunc callback,
void * userData,
int flags
)

Add Press callback (button or similar node pressed)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackRelease(HNode node,
EventNodeFunc callback,
void * userData,
int flags
)

Add Release callback (button or similar node released)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackToggle(HNode node,
EventNodeFunc callback,
void * userData,
int flags
)

Add Toggle callback (button or similar node toggled)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackTouch(HNode node,
EventTwoNodesFunc callback,
void * userData,
int flags
)

Add Touch callback (assembly has collided)

Parameters
node

node handle

callback

the function to call

userData

arbitrary data to pass to the callback

flags

additional flags for future use (must be zero)


void VRAddCallbackUpdate(UpdateFunc callback,
void * userData
)

Registers a function to be called whenever VRTree updates (either by the host application or by a call to VRUpdate)

Parameters
metaName

the name of the metanode (type of node) to observe

callback

the function to call on creation

userData

arbitrary data to pass to the callback


Remove callback for Activate event of a node and the other node deactivated.

Parameters
node

node handle

callback

the previously added function to remove


Remove Break callback (assembly has ceased colliding)

Parameters
node

node handle

callback

the previously added function to remove


Remove Click callback (button or similar node clicked)

Parameters
node

node handle

callback

the previously added function to remove


Remove Double click callback (button or similar node double-clicked)

Parameters
node

node handle

callback

the previously added function to remove


Remove Enter callback (a generic state was entered)

Parameters
node

node handle

callback

the previously added function to remove


Remove Gesture callback (a hand activated a gesture)

Parameters
callback

the previously added function to remove


Remove Key press callback (key was pressed)

Parameters
callback

the previously added function to remove


Remove Key release callback (key was released)

Parameters
callback

the previously added function to remove


Remove Leave callback (a generic state was left)

Parameters
node

node handle

callback

the previously added function to remove


Remove Move callback (the transform property has changed)

Parameters
node

node handle

callback

the previously added function to remove


void VRRemoveCallbackNodeChildAdded(const char * metaName,
NodeChildAddedFunc callback
)

Unregisters a function called whenever a node has children added to it.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove


void VRRemoveCallbackNodeChildAddedEx(const char * metaName,
NodeChildAddedFunc callback,
void * userData
)

Unregisters a function called whenever a node has children added to it.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove

userData

arbitrary data to passed to the callback


void VRRemoveCallbackNodeChildRemoved(const char * metaName,
NodeChildRemovedFunc callback
)

Unregisters a function called whenever a node has children removed from it.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove


void VRRemoveCallbackNodeChildRemovedEx(const char * metaName,
NodeChildRemovedFunc callback,
void * userData
)

Unregisters a function called whenever a node has children removed from it.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove

userData

arbitrary data to passed to the callback


void VRRemoveCallbackNodeCreation(const char * metaName,
NodeCreatedFunc callback
)

Unregisters a function called whenever a node is created.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove


void VRRemoveCallbackNodeCreationEx(const char * metaName,
NodeCreatedFunc callback,
void * userData
)

Unregisters a function called whenever a node is created.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove

userData

arbitrary data to passed to the callback


void VRRemoveCallbackNodeDestruction(const char * metaName,
NodeDestroyingFunc callback
)

Unregisters a function called whenever a node is destroyed.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove


void VRRemoveCallbackNodeDestructionEx(const char * metaName,
NodeDestroyingFunc callback,
void * userData
)

Unregisters a function called whenever a node is destroyed.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove

userData

arbitrary data to passed to the callback


void VRRemoveCallbackNodeParentChanged(const char * metaName,
NodeParentChangedFunc callback
)

Unregisters a function called whenever a node is moved somewhere else in the tree.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove


void VRRemoveCallbackNodeParentChangedEx(const char * metaName,
NodeParentChangedFunc callback,
void * userData
)

Unregisters a function called whenever a node is moved somewhere else in the tree.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove

userData

arbitrary data to passed to the callback


void VRRemoveCallbackNodeRenamed(const char * metaName,
NodeRenamedFunc callback
)

Unregisters a function called whenever a node is renamed.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove


void VRRemoveCallbackNodeRenamedEx(const char * metaName,
NodeRenamedFunc callback,
void * userData
)

Unregisters a function called whenever a node is renamed.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove

userData

arbitrary data to passed to the callback


void VRRemoveCallbackNodeValuesChanged(const char * metaName,
NodeValuesChangedFunc callback
)

Unregisters a function called whenever a node is modified.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove


void VRRemoveCallbackNodeValuesChangedEx(const char * metaName,
NodeValuesChangedFunc callback,
void * userData
)

Unregisters a function called whenever a node is modified.

Parameters
metaName

the name of the metanode (type of node) to stop observing

callback

the previously added function to remove

userData

arbitrary data to passed to the callback


Remove Pose entered callback (a hand switched to a pose)

Parameters
callback

the previously added function to remove


Remove Pose left callback (a hand left a pose)

Parameters
callback

the previously added function to remove


Remove Press callback (button or similar node pressed)

Parameters
node

node handle

callback

the previously added function to remove


Remove Release callback (button or similar node released)

Parameters
node

node handle

callback

the previously added function to remove


Remove Toggle callback (button or similar node toggled)

Parameters
node

node handle

callback

the previously added function to remove


Remove Touch callback (assembly has collided)

Parameters
node

node handle

callback

the previously added function to remove


Unregisters an update function.

Parameters
callback

the previously added function to remove


void VRRemoveCallbackUpdateEx(UpdateFunc callback,
void * userData
)

Unregisters an update function.

Parameters
callback

the previously added function to remove

userData

arbitrary data to passed to the callback

No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtreevrtree_cppvtCoreCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesSettingsTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API