OpenCOVER
coVR1DTransInteractor.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef _CO_VR_1D_TRANS_INTERACTOR_H
9#define _CO_VR_1D_TRANS_INTERACTOR_H
10
12#include "coPlane.h"
13#include <osg/Vec3>
14#include <osg/MatrixTransform>
15
16namespace opencover
17{
18// selectable cylinder which can be positioned on a plane
19// cylinder and plane are positioned in object coordinates
20
22{
23
24private:
25 osg::Vec3 _diff;
26 osg::Vec3 _normal;
27 osg::Matrix _oldHandMat;
28 void createGeometry();
29
30public:
31 // position and normal on object coordinates
32 // size in world coordinates (mm)
33 coVR1DTransInteractor(osg::Vec3 pos, osg::Vec3 normal, float size, coInteraction::InteractionType type, const char *iconName, const char *interactorName, enum coInteraction::InteractionPriority priority);
34
36
37 virtual void startInteraction();
38
39 virtual void doInteraction();
40
41 // stop the interaction
42 // implemented in base class void stopInteraction();
43
44 // set a new position,normal
45 virtual void updateTransform(osg::Vec3 pos);
46
47 virtual osg::Vec3 getPosition()
48 {
49 return moveTransform->getMatrix().getTrans();
50 };
51 virtual osg::MatrixTransform *getNode()
52 {
53 return moveTransform;
54 };
55};
56}
57
58#endif
Definition: ARToolKit.h:33
Definition: coVRIntersectionInteractor.h:56
Definition: coVR1DTransInteractor.h:22
virtual osg::MatrixTransform * getNode()
Definition: coVR1DTransInteractor.h:51
virtual osg::Vec3 getPosition()
Definition: coVR1DTransInteractor.h:47
virtual void updateTransform(osg::Vec3 pos)
coVR1DTransInteractor(osg::Vec3 pos, osg::Vec3 normal, float size, coInteraction::InteractionType type, const char *iconName, const char *interactorName, enum coInteraction::InteractionPriority priority)