00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Modified (MMM yyyy) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_TRACKER_EVENT_ 00025 #define _SO_TRACKER_EVENT_ 00026 00027 #include <Inventor/events/SoSubEvent.h> 00028 #include <Inventor/events/SbTrackerInfo.h> 00029 00030 00069 class SoTrackerEvent : public SoEvent { 00070 00071 SO_EVENT_HEADER(); 00072 00073 public: 00077 SoTrackerEvent(); 00078 00079 #ifndef HIDDEN_FROM_DOC 00080 virtual ~SoTrackerEvent(); 00081 #endif // HIDDEN_FROM_DOC 00082 00086 void setPosition3(const SbVec3f &p) 00087 { m_trackerInfo.setPosition3( p ); } 00088 00092 const SbVec3f & getPosition3() const 00093 { return m_trackerInfo.getPosition3(); } 00094 00099 void setOrientation( float x, float y, float z) 00100 { m_trackerInfo.setOrientation( x, y, z ); } 00101 00105 void setOrientation( SbRotation orientation ) 00106 { m_trackerInfo.setOrientation( orientation ); } 00107 00111 void setOrientation(const SbVec3f &axis, float angle) 00112 { m_trackerInfo.setOrientation( axis, angle ); } 00113 00118 const SbRotation & getOrientation() const 00119 { return m_trackerInfo.getOrientation(); } 00120 00124 const SbLine getRay() const 00125 { return m_trackerInfo.getRay(); } 00126 00127 00128 // Imports declaration from SoEvent. 00129 using SoEvent::getTrackerInfo; 00130 00137 virtual const SbTrackerInfo *getTrackerInfo() const 00138 { return &m_trackerInfo; } 00139 00143 virtual const SbTrackerInfo & trackerInfo() const 00144 { return m_trackerInfo; } 00145 00146 private: 00147 static void initClass(); 00148 static void exitClass(); 00149 00150 private: 00151 SbTrackerInfo m_trackerInfo; 00152 00153 }; 00154 00155 #endif /* _SO_TRACKER_EVENT_ */ 00156 00157 00158