SoControllerReader Class Reference
[Interaction]

ScaleViz Interface to trackdAPI (buttons, valuators). More...

#include <ScaleViz/interaction/SoControllerReader.h>

List of all members.

Public Member Functions

 SoControllerReader (int)
virtual ~SoControllerReader ()
int getNumberOfValuators ()
int getNumberOfButtons ()
float getValuator (int id)
int getButton (int id)
int buttonChange (int id)
SbBool isLoadSuccess ()
SbBool isInitSuccess ()

Detailed Description

ScaleViz Interface to trackdAPI (buttons, valuators).

SoControllerReader is a class that interfaces to trackdAPI. It provides access functions to the states of buttons and valuators of VR input devices, e.g., the buttons and joystick of a wand. SoTrackerReader is instantiated by the SbConfig class, if the configuration file specifies the use of a tracking system (by providing shared memory keys). See SbConfig::getControllerReader.

NOTE: trackd from VRCO (www.vrco.com) is not included with Open Inventor. If trackd exists on the system, Open Inventor will dynamically load it at run time. See trackd documentation for information about the values returned.


Constructor & Destructor Documentation

SoControllerReader::SoControllerReader ( int   ) 

Constructor.

The argument passed to the constructor is the shared memory key used by trackd. The constructor dynamically loads trackdAPI into memory, and gets the necessary function addresses.

virtual SoControllerReader::~SoControllerReader (  )  [virtual]

Destructor.


Member Function Documentation

int SoControllerReader::buttonChange ( int  id  ) 

Returns information about changes of the state of the button identified by id.

The function returns 0 if the state of the button hasn't changed, returns -1, if the button was released, returns 1, if the button was pressed.

int SoControllerReader::getButton ( int  id  ) 

Returns the value of button identified by id from the tracker daemon.

int SoControllerReader::getNumberOfButtons (  ) 

Returns the number of buttons the tracker daemon is storing.

int SoControllerReader::getNumberOfValuators (  ) 

Returns the number of valuators the tracker daemon is storing.

float SoControllerReader::getValuator ( int  id  ) 

Returns value of the valuator identified by id from the tracker daemon.

SbBool SoControllerReader::isInitSuccess (  )  [inline]

Returns TRUE if Inventor was able to retrieve all the trackdAPI functions.

SbBool SoControllerReader::isLoadSuccess (  )  [inline]

Returns TRUE if libtrackd.so was loaded successfully.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/