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-2014 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 00068 class SoTrackerEvent : public SoEvent { 00069 00070 SO_EVENT_HEADER(); 00071 00072 public: 00076 SoTrackerEvent(); 00077 00078 #ifndef HIDDEN_FROM_DOC 00079 virtual ~SoTrackerEvent(); 00080 #endif // HIDDEN_FROM_DOC 00081 00085 void setPosition3(const SbVec3f &p) 00086 { m_trackerInfo.setPosition3( p ); } 00087 00091 const SbVec3f & getPosition3() const 00092 { return m_trackerInfo.getPosition3(); } 00093 00098 void setOrientation( float x, float y, float z) 00099 { m_trackerInfo.setOrientation( x, y, z ); } 00100 00104 void setOrientation( SbRotation orientation ) 00105 { m_trackerInfo.setOrientation( orientation ); } 00106 00110 void setOrientation(const SbVec3f &axis, float angle) 00111 { m_trackerInfo.setOrientation( axis, angle ); } 00112 00117 const SbRotation & getOrientation() const 00118 { return m_trackerInfo.getOrientation(); } 00119 00123 const SbLine getRay() const 00124 { return m_trackerInfo.getRay(); } 00125 00126 00127 // Imports declaration from SoEvent. 00128 using SoEvent::getTrackerInfo; 00129 00136 virtual const SbTrackerInfo *getTrackerInfo() const 00137 { return &m_trackerInfo; } 00138 00142 virtual const SbTrackerInfo & trackerInfo() const 00143 { return m_trackerInfo; } 00144 00145 private: 00146 static void initClass(); 00147 static void exitClass(); 00148 00149 private: 00150 SbTrackerInfo m_trackerInfo; 00151 00152 }; 00153 00154 #endif /* _SO_TRACKER_EVENT_ */ 00155 00156 00157