Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SbTrackerInfo.h
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 _SB_TRACKER_INFO_
25#define _SB_TRACKER_INFO_
26
27#include <Inventor/SbLinear.h>
28
74
75 public:
76
85
89 void setPosition3(const SbVec3f &p) { m_position3 = p; }
90
94 const SbVec3f & getPosition3() const { return m_position3; }
95
100 const SbRotation &getOrientation() const { return m_orientation; }
101
106 void getOrientation(SbVec3f &axis, float &angle) const
107 { m_orientation.getValue(axis, angle); }
108
112 void setOrientation(float q0, float q1, float q2, float q3)
113 { m_orientation.setValue( q0, q1, q2, q3 ); }
114
118 void setOrientation(const float q[4])
119 { m_orientation.setValue( q ); }
120
124 void setOrientation(const SbVec3f &axis, float angle)
125 { m_orientation.setValue( axis, angle ); }
126
130 void setOrientation( SbRotation orientation )
131 { m_orientation = orientation; }
132
137 void setOrientation( float xangle, float yangle, float zangle );
138
142 const SbLine getRay() const;
143
147 void setData( void *appData ) { m_data = appData; }
148
152 const void *getData() const { return m_data; }
153
154 private:
155
156 // Essential tracker info
157 SbVec3f m_position3;
158 SbRotation m_orientation;
159
160 void *m_data;
161
162};
163
164#endif /* _SB_TRACKER_INFO_ */
165
Directed line in 3D.
Definition SbLine.h:57
Class for representing a rotation.
Definition SbRotation.h:126
SbRotation & setValue(const float q[4])
Sets value of rotation from array of 4 components of a quaternion.
const float * getValue() const
Returns pointer to array of 4 components defining quaternion.
Definition SbRotation.h:184
<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.
SbTrackerInfo()
Constructor.
void setOrientation(const SbVec3f &axis, float angle)
Set orientation value from axis and angle in radians.
~SbTrackerInfo()
Destructor.
void setOrientation(SbRotation orientation)
Set orientation value from an SbRotation.
const SbVec3f & getPosition3() const
Get position of tracker in world coordinates.
void setOrientation(const float q[4])
Set orientation value from array of 4 floats defining the rotation quaternion.
void setPosition3(const SbVec3f &p)
Set position of tracker in world coordinates.
const void * getData() const
Get application data.
void setOrientation(float xangle, float yangle, float zangle)
Set orientation value from Euler angles in radians (using the trackd convention Z*X*Y).
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).
void setData(void *appData)
Set application data.
void getOrientation(SbVec3f &axis, float &angle) const
Get orientation of tracker.
3D vector class.
Definition SbVec.h:932