3D tracker event. More...
#include <Inventor/events/SoTrackerEvent.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
Returns the type identifier for this specific instance. | |
SoTrackerEvent () | |
Constructor. | |
void | setPosition3 (const SbVec3f &p) |
Set position of associated tracker in world coordinates. | |
const SbVec3f & | getPosition3 () const |
Get position of associated tracker in world coordinates. | |
void | setOrientation (float x, float y, float z) |
Set orientation value of associated tracker from Euler angles in radians (using the trackd convention Z*X*Y). | |
void | setOrientation (SbRotation orientation) |
Set orientation value of associated tracker from an SbRotation. | |
void | setOrientation (const SbVec3f &axis, float angle) |
Set orientation value of associated tracker from axis and angle in radians. | |
const SbRotation & | getOrientation () const |
Get orientation of associated tracker as a standard Open Inventor rotation (quaternion). | |
const SbLine | getRay () const |
Get a ray for picking/intersecting. | |
virtual const SbTrackerInfo * | getTrackerInfo () const |
Returns the SbTrackerInfo object. | |
virtual const SbTrackerInfo & | trackerInfo () const |
Returns the SbTrackerInfo object. | |
virtual const SbTrackerInfo * | getTrackerInfo () const |
Gets whether an event object has associated tracker information. | |
SbTrackerInfo * | getTrackerInfo () |
Gets whether an event object has associated tracker information. | |
Public Member Functions inherited from SoEvent | |
SoEvent () | |
Constructor. | |
virtual | ~SoEvent () |
Destructor. | |
virtual void | setTime (SbTime t) |
Sets the time at which the event occurred. | |
SbTime | getTime () const |
Gets the time at which the event occurred. | |
virtual void | setPosition (const SbVec2s &p) |
Sets the window pixel location of the cursor when the event occurred. | |
virtual void | setPosition (const SbVec2f &p) |
Float version of setPosition(const SbVec2s &p). | |
const SbVec2s & | getPosition () const |
Returns the window pixel location of the cursor when the event occurred as integer values. | |
const SbVec2f & | getPositionFloat () const |
Returns the window pixel location of the cursor when the event occurred as float values. | |
const SbVec2s & | getPosition (const SbViewportRegion &vpRgn) const |
Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values. | |
const SbVec2f & | getPositionFloat (const SbViewportRegion &vpRgn) const |
Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values. | |
const SbVec2f & | getNormalizedPosition (const SbViewportRegion &vpRgn) const |
Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region. | |
void | setShiftDown (SbBool isDown) |
Sets whether the shift key was down when the event occurred. | |
void | setCtrlDown (SbBool isDown) |
Sets whether the CTRL key was down when the event occurred. | |
void | setAltDown (SbBool isDown) |
Sets whether the ALT key was down when the event occurred. | |
void | setButton1Down (SbBool isDown) |
Sets whether mouse Button 1 was down when the event occurred. | |
SbBool | wasShiftDown () const |
Returns true if the shift key was down when the event occurred. | |
SbBool | wasCtrlDown () const |
Returns true if the CTRL key was down when the event occurred. | |
SbBool | wasAltDown () const |
Returns true if the ALT key was down when the event occurred. | |
SbBool | wasButton1Down () const |
Returns true if mouse button 1 was down when the event occurred. | |
SbTrackerInfo * | getTrackerInfo () |
Gets whether an event object has associated tracker information. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Static Public Member Functions inherited from SoEvent | |
static SoType | getClassTypeId () |
Returns the type id for the SoEvent class. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
SoTrackerEvent represents 3D position and orientation events in the Open Inventor event model.
A "tracker" is any device whose position and orientation are dynamically tracked in 3D, typically for immersive VR applications. For example: a head tracker. A "controller" is an input device which typically has buttons and/or valuators (e.g. a joystick). Many controllers have an associated tracker. For example, the commonly used "wand" input device has three buttons, a two-axis joystick (two valuators), and an associated tracker.
The virtual method SoEvent::getTrackerInfo() can be used to determine if an event object has associated tracker information. Traditional 2D events like SoMouseButtonEvent and SoLocation2Event return NULL. 3D events like SoTrackerEvent and SoControllerButtonEvent return their associated tracker information (SbTrackerInfo).
Many tracker devices generate a continuous stream of position and orientation reports, so strictly speaking there are no "events." Generally Open Inventor classes that recognize the SoTrackerEvent interpret it as notification of a "significant" change in the tracker position and/or orientation. Processing of SoTrackerEvents may be relatively expensive. For example, a pick operation will usually be done automatically. The application (or other software above Open Inventor) is responsible for deciding when to actually create an SoTrackerEvent.
SoControllerButtonEvent, SoEvent, SbTrackerInfo
Definition at line 68 of file SoTrackerEvent.h.
SoTrackerEvent::SoTrackerEvent | ( | ) |
Constructor.
|
static |
Returns the type identifier for this class.
|
inline |
Get orientation of associated tracker as a standard Open Inventor rotation (quaternion).
Definition at line 117 of file SoTrackerEvent.h.
|
inline |
Get position of associated tracker in world coordinates.
Definition at line 91 of file SoTrackerEvent.h.
|
inline |
Get a ray for picking/intersecting.
This is a convenience function.
Definition at line 123 of file SoTrackerEvent.h.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Returns the SbTrackerInfo object.
Can be used as a quick check if an event has tracker info associated with it.
Reimplemented from SoEvent.
Definition at line 136 of file SoTrackerEvent.h.
|
virtual |
Returns the type identifier for this specific instance.
Reimplemented from SoEvent.
|
inline |
Set orientation value of associated tracker from axis and angle in radians.
Definition at line 110 of file SoTrackerEvent.h.
|
inline |
Set orientation value of associated tracker from Euler angles in radians (using the trackd convention Z*X*Y).
Definition at line 98 of file SoTrackerEvent.h.
|
inline |
Set orientation value of associated tracker from an SbRotation.
Definition at line 104 of file SoTrackerEvent.h.
|
inline |
Set position of associated tracker in world coordinates.
Definition at line 85 of file SoTrackerEvent.h.
|
inlinevirtual |
Returns the SbTrackerInfo object.
Definition at line 142 of file SoTrackerEvent.h.