Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoTrackerEvent Class Reference

VSG extension 3D tracker event. More...

#include <Inventor/events/SoTrackerEvent.h>

+ Inheritance diagram for SoTrackerEvent:

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 SbVec3fgetPosition3 () 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 SbRotationgetOrientation () 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 SbTrackerInfogetTrackerInfo () const
 Returns the SbTrackerInfo object.
 
virtual const SbTrackerInfotrackerInfo () const
 Returns the SbTrackerInfo object.
 
virtual const SbTrackerInfogetTrackerInfo () const
 Gets whether an event object has associated tracker information.
 
SbTrackerInfogetTrackerInfo ()
 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 SbVec2sgetPosition () const
 Returns the window pixel location of the cursor when the event occurred as integer values.
 
const SbVec2fgetPositionFloat () const
 Returns the window pixel location of the cursor when the event occurred as float values.
 
const SbVec2sgetPosition (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 SbVec2fgetPositionFloat (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 SbVec2fgetNormalizedPosition (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.
 
SbTrackerInfogetTrackerInfo ()
 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.
 

Detailed Description

VSG extension 3D tracker event.

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.

SEE ALSO

SoControllerButtonEvent, SoEvent, SbTrackerInfo

Definition at line 68 of file SoTrackerEvent.h.

Constructor & Destructor Documentation

◆ SoTrackerEvent()

SoTrackerEvent::SoTrackerEvent ( )

Constructor.

Member Function Documentation

◆ getClassTypeId()

static SoType SoTrackerEvent::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getOrientation()

const SbRotation & SoTrackerEvent::getOrientation ( ) const
inline

Get orientation of associated tracker as a standard Open Inventor rotation (quaternion).

Definition at line 117 of file SoTrackerEvent.h.

◆ getPosition3()

const SbVec3f & SoTrackerEvent::getPosition3 ( ) const
inline

Get position of associated tracker in world coordinates.

Definition at line 91 of file SoTrackerEvent.h.

◆ getRay()

const SbLine SoTrackerEvent::getRay ( ) const
inline

Get a ray for picking/intersecting.

This is a convenience function.

Definition at line 123 of file SoTrackerEvent.h.

◆ getTrackerInfo() [1/3]

SbTrackerInfo * SoEvent::getTrackerInfo ( )
inline

Gets whether an event object has associated tracker information.

Definition at line 262 of file SoEvent.h.

◆ getTrackerInfo() [2/3]

virtual const SbTrackerInfo * SoEvent::getTrackerInfo ( ) const
inlinevirtual

Gets whether an event object has associated tracker information.

Reimplemented from SoEvent.

Definition at line 255 of file SoEvent.h.

◆ getTrackerInfo() [3/3]

virtual const SbTrackerInfo * SoTrackerEvent::getTrackerInfo ( ) const
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.

◆ getTypeId()

virtual SoType SoTrackerEvent::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoEvent.

◆ setOrientation() [1/3]

void SoTrackerEvent::setOrientation ( const SbVec3f axis,
float  angle 
)
inline

Set orientation value of associated tracker from axis and angle in radians.

Definition at line 110 of file SoTrackerEvent.h.

◆ setOrientation() [2/3]

void SoTrackerEvent::setOrientation ( float  x,
float  y,
float  z 
)
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.

◆ setOrientation() [3/3]

void SoTrackerEvent::setOrientation ( SbRotation  orientation)
inline

Set orientation value of associated tracker from an SbRotation.

Definition at line 104 of file SoTrackerEvent.h.

◆ setPosition3()

void SoTrackerEvent::setPosition3 ( const SbVec3f p)
inline

Set position of associated tracker in world coordinates.

Definition at line 85 of file SoTrackerEvent.h.

◆ trackerInfo()

virtual const SbTrackerInfo & SoTrackerEvent::trackerInfo ( ) const
inlinevirtual

Returns the SbTrackerInfo object.

Definition at line 142 of file SoTrackerEvent.h.


The documentation for this class was generated from the following file: