Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoTrackerEvent.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Modified (MMM yyyy)
22**=======================================================================*/
23
24#ifndef _SO_TRACKER_EVENT_
25#define _SO_TRACKER_EVENT_
26
29
30
68class SoTrackerEvent : public SoEvent {
69
71
72 public:
77
78#ifndef HIDDEN_FROM_DOC
79 virtual ~SoTrackerEvent();
80#endif // HIDDEN_FROM_DOC
81
85 void setPosition3(const SbVec3f &p)
86 { m_trackerInfo.setPosition3( p ); }
87
91 const SbVec3f & getPosition3() const
92 { return m_trackerInfo.getPosition3(); }
93
98 void setOrientation( float x, float y, float z)
99 { m_trackerInfo.setOrientation( x, y, z ); }
100
104 void setOrientation( SbRotation orientation )
105 { m_trackerInfo.setOrientation( orientation ); }
106
110 void setOrientation(const SbVec3f &axis, float angle)
111 { m_trackerInfo.setOrientation( axis, angle ); }
112
118 { return m_trackerInfo.getOrientation(); }
119
123 const SbLine getRay() const
124 { return m_trackerInfo.getRay(); }
125
126
127 // Imports declaration from SoEvent.
129
136 virtual const SbTrackerInfo *getTrackerInfo() const
137 { return &m_trackerInfo; }
138
142 virtual const SbTrackerInfo & trackerInfo() const
143 { return m_trackerInfo; }
144
145 private:
146 static void initClass();
147 static void exitClass();
148
149 private:
150 SbTrackerInfo m_trackerInfo;
151
152};
153
154#endif /* _SO_TRACKER_EVENT_ */
155
156
#define SO_EVENT_HEADER()
Definition SoSubEvent.h:76
Directed line in 3D.
Definition SbLine.h:57
Class for representing a rotation.
Definition SbRotation.h:126
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for repres...
void setOrientation(float q0, float q1, float q2, float q3)
Set orientation value from 4 floats defining the rotation quaternion.
const SbVec3f & getPosition3() const
Get position of tracker in world coordinates.
void setPosition3(const SbVec3f &p)
Set position of tracker in world coordinates.
const SbLine getRay() const
Convenience function to get ray for picking/intersecting.
const SbRotation & getOrientation() const
Get orientation of tracker as a standard Open Inventor rotation (quaternion).
3D vector class.
Definition SbVec.h:932
Base class for all events.
Definition SoEvent.h:116
virtual const SbTrackerInfo * getTrackerInfo() const
Gets whether an event object has associated tracker information.
Definition SoEvent.h:255
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D tracker event...
const SbLine getRay() const
Get a ray for picking/intersecting.
SoTrackerEvent()
Constructor.
virtual const SbTrackerInfo & trackerInfo() const
Returns the SbTrackerInfo object.
const SbRotation & getOrientation() const
Get orientation of associated tracker as a standard Open Inventor rotation (quaternion).
void setOrientation(SbRotation orientation)
Set orientation value of associated tracker from an SbRotation.
void setOrientation(float x, float y, float z)
Set orientation value of associated tracker from Euler angles in radians (using the trackd convention...
virtual const SbTrackerInfo * getTrackerInfo() const
Returns the SbTrackerInfo object.
void setPosition3(const SbVec3f &p)
Set position of associated tracker in world coordinates.
void setOrientation(const SbVec3f &axis, float angle)
Set orientation value of associated tracker from axis and angle in radians.
const SbVec3f & getPosition3() const
Get position of associated tracker in world coordinates.