8 #ifndef _CO_VR_INTERSECTION_INTERACTOR_H
9 #define _CO_VR_INTERSECTION_INTERACTOR_H
15 #include <osg/MatrixTransform>
25 class SharedStateBase;
58 osg::StateSet *loadDefaultGeostate();
59 bool constantInteractorSize_;
63 osg::Geode *findGeode(osg::Node *n);
83 osg::ref_ptr<osg::StateSet>
_selectedHl, _intersectedHl, _oldHl;
86 bool m_isInitializedThroughSharedState =
false;
91 virtual void createGeometry() = 0;
94 virtual void keepSize();
95 float getScale()
const;
97 osg::Vec3 restrictToVisibleScene(osg::Vec3);
99 const osg::Matrix &getPointerMat()
const;
102 virtual void updateSharedState();
111 coVRIntersectionInteractor(
float size, coInteraction::InteractionType buttonId,
const char *iconName,
const char *interactorName,
enum coInteraction::InteractionPriority priority);
117 void enableIntersection();
123 void disableIntersection();
132 virtual void startInteraction();
136 virtual void doInteraction();
139 virtual void stopInteraction();
148 bool isInitializedThroughSharedState();
150 virtual void setShared(
bool state);
153 virtual bool isShared()
const;
155 virtual void addIcon();
157 virtual void removeIcon();
159 virtual void resetState();
179 osg::Node *getHitNode();
182 virtual void preFrame();
187 return _interactorName;
203 return moveTransform->getMatrix();
206 void setCaseTransform(osg::MatrixTransform *);
vrui::OSGVruiNode * vNode
Definition: coVRIntersectionInteractor.h:81
char * getInteractorName()
class methods for traversing children
Definition: coVRIntersectionInteractor.h:185
std::unique_ptr< vrb::SharedStateBase > m_sharedState
Definition: coVRIntersectionInteractor.h:89
osg::Vec3 _hitPos
Definition: coVRIntersectionInteractor.h:80
bool _intersectionEnabled
Definition: coVRIntersectionInteractor.h:75
osg::ref_ptr< osg::StateSet > _selectedHl
Definition: coVRIntersectionInteractor.h:83
char * _interactorName
Definition: coVRIntersectionInteractor.h:71
OpenVRUI interface to (object-pointing device) intersections.
Definition: coAction.h:25
osg::ref_ptr< osg::MatrixTransform > moveTransform
Definition: coVRIntersectionInteractor.h:67
bool _hit
Definition: coVRIntersectionInteractor.h:74
coVRLabel * label_
Definition: coVRIntersectionInteractor.h:85
Definition: coVRIntersectionInteractor.h:55
char * labelStr_
Definition: coVRIntersectionInteractor.h:72
osg::ref_ptr< osg::MatrixTransform > interactorCaseTransform
Definition: coVRIntersectionInteractor.h:69
Definition: coCombinedButtonInteraction.h:20
osg::Matrix getMatrix()
Definition: coVRIntersectionInteractor.h:201
bool wasHit()
Definition: coVRIntersectionInteractor.h:168
osg::MatrixTransform * parent
Definition: coVRIntersectionInteractor.h:70
Definition: OSGVruiNode.h:20
osg::ref_ptr< osg::Node > geometryNode
Geometry node.
Definition: coVRIntersectionInteractor.h:66
bool _justHit
Definition: coVRIntersectionInteractor.h:76
Definition: coVRIntersectionInteractor.h:27
bool _wasHit
Definition: coVRIntersectionInteractor.h:77
osg::Vec3 getHitPos()
Definition: coVRIntersectionInteractor.h:174
Definition: coVRLabel.h:51
osg::ref_ptr< osg::Node > _hitNode
Definition: coVRIntersectionInteractor.h:79
osg::ref_ptr< osg::MatrixTransform > scaleTransform
Definition: coVRIntersectionInteractor.h:68
int isIntersected()
Definition: coVRIntersectionInteractor.h:162
float _interSize
Definition: coVRIntersectionInteractor.h:87
bool _standardHL
Definition: coVRIntersectionInteractor.h:78