OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
HandleArrow.h
Go to the documentation of this file.
1#pragma once
2
3#include "HandlerBase.h"
4
5#include <osg/Geode>
6
7class HandleArrow : public HandlerBase
8{
9public:
10 HandleArrow() = delete;
11 HandleArrow(osg::Vec3d point, osg::Vec3d dir, double color[4], double length, double radius);
12 virtual ~HandleArrow();
13
14 virtual osg::Node *getNode(void) override;
15
16 virtual void mouseOver(bool flag) override;
17 virtual void setInteraction(int intersectionIndex, double intersectionRatio) override;
18 virtual void setInteractionReference(int intersectionIndex, double intersectionRatio) override;
19
20 void setPosition(osg::Vec3d pos);
21 osg::Vec3d getPosition(void) { return position; }
22
23private:
24 void createArrow(osg::Geode * _geode, double color[4], double length, double radius);
25 void updateTransform(void);
26
27 osg::ref_ptr<osg::MatrixTransform> osgNode;
28 osg::ref_ptr<osg::Switch> osgSwitchNode;
29 osg::ref_ptr<osg::Geode> arrowNode;
30 osg::ref_ptr<osg::Geode> arrowNodeSelected;
31
32 osg::Vec3d position;
33 osg::Vec3d direction;
34
35 double intersectionLineLength;
36 double referenceOffset;
37};
38
@ point
Definition MonitorSettings.h:19
Definition HandleArrow.h:8
osg::Vec3d getPosition(void)
Definition HandleArrow.h:21
virtual void setInteractionReference(int intersectionIndex, double intersectionRatio) override
Definition HandleArrow.cpp:148
virtual void setInteraction(int intersectionIndex, double intersectionRatio) override
Definition HandleArrow.cpp:156
virtual ~HandleArrow()
Definition HandleArrow.cpp:46
virtual void mouseOver(bool flag) override
Definition HandleArrow.cpp:142
void setPosition(osg::Vec3d pos)
Definition HandleArrow.cpp:136
HandleArrow()=delete
virtual osg::Node * getNode(void) override
Definition HandleArrow.cpp:51
Definition HandlerBase.h:29