OpenCOVER
|
#include <coAction.h>
Public Types | |
enum | Result { ACTION_DONE = 0x00, ACTION_CALL_ON_MISS = 0x01, ACTION_UNDEF = 0x02 } |
Public Member Functions | |
coAction () | |
Constructor. More... | |
virtual | ~coAction () |
Destructor. More... | |
virtual int | hit (vruiHit *hit)=0 |
virtual void | miss () |
void | setFrame (unsigned int frame) |
INTERNAL set the framecounter (used to produce the miss call) More... | |
unsigned int | getFrame () const |
INTERNAL get the framecounter (used to produce the miss call) More... | |
void | setNode (vruiNode *) |
INTERNAL set the node this action belongs to. More... | |
void | addChild (coAction *) |
INTERNAL add a child action. More... | |
virtual int | hitAll (vruiHit *hit) |
INTERNAL same as miss/hit, but do it for all children as well. More... | |
virtual void | missAll () |
INTERNAL same as miss/hit, but do it for all children as well. More... | |
Protected Attributes | |
std::string | actionName |
classes that are derived from coAction can be attached tho the scenegraph and will be called when user interacts with the object
vrui::coAction::coAction | ( | ) |
Constructor.
|
virtual |
Destructor.
void vrui::coAction::addChild | ( | coAction * | ) |
INTERNAL add a child action.
|
inline |
INTERNAL get the framecounter (used to produce the miss call)
|
pure virtual |
hit is called whenever the node, or any node underneath the node with this action is intersected return ACTION_CALL_ON_MISS if you want miss to be called otherwise return ACTION_DONE
Implemented in opencover::coVRIntersectionInteractor, vrui::coTexturedBackground, vrui::coTextureRectBackground, coPickSensor, vrui::coValuePoti, vrui::coMenu, vrui::coRowMenuHandle, vrui::coPopupHandle, vrui::coToolboxMenuHandle, vrui::coRowMenu, vrui::coButton, vrui::coCheckboxMenuItem, vrui::coSubMenuItem, vrui::coPotiToolboxItem, vrui::coRotButton, vrui::coSlider, vrui::coSubMenuToolboxItem, opencover::VruiPartnerMenuItem, vrui::coButtonMenuItem, vrui::coPotiMenuItem, vrui::coIconButtonToolboxItem, vrui::coIconToggleButtonToolboxItem, vrui::coPanel, vrui::coSliderToolboxItem, and vrui::coSliderMenuItem.
|
virtual |
INTERNAL same as miss/hit, but do it for all children as well.
|
virtual |
miss is called once after a hit, if the node is not intersected anymore
Reimplemented in opencover::coVRIntersectionInteractor, vrui::coRotPushButton, vrui::coTexturedBackground, vrui::coPushButton, vrui::coTextureRectBackground, vrui::coValuePoti, coPickSensor, vrui::coMenu, vrui::coRowMenuHandle, vrui::coPopupHandle, vrui::coToolboxMenuHandle, vrui::coRowMenu, vrui::coButton, vrui::coCheckboxMenuItem, vrui::coSlider, vrui::coSubMenuItem, vrui::coPotiToolboxItem, vrui::coRotButton, vrui::coSubMenuToolboxItem, opencover::VruiPartnerMenuItem, vrui::coButtonMenuItem, vrui::coPotiMenuItem, vrui::coPanel, vrui::coIconButtonToolboxItem, vrui::coIconToggleButtonToolboxItem, vrui::coSliderToolboxItem, and vrui::coSliderMenuItem.
|
virtual |
INTERNAL same as miss/hit, but do it for all children as well.
|
inline |
INTERNAL set the framecounter (used to produce the miss call)
void vrui::coAction::setNode | ( | vruiNode * | ) |
INTERNAL set the node this action belongs to.
|
protected |
name of this action this can be used to distinguish betwenn different types of actions like touch and intersection actions