Polhemus Driver for C++
This package is a development library for C++ to use Polhemus Fastrak or Isotrak2 on IRIX and WIN32 platforms. Please chceck the download site
on SourceForge.net to get the package and the samples.
To use the package, you have to make a library from following four source files at first.
polhemus.h, polhemus.cpp, serial.h, serial.cpp
Use the following compiler flags to create the library.
| COMPILER FLAG
|| Support for Windows9x//NT platform.
|| Support for IRIX.
|| Support for ISOTRAK2. If you don't use the flag, the library supports Fastrak.
class CPolhemus : public CSerial
CPolhemus(char *device, int speed);
void GetPosition(int nReciver, Point3d p3Pos);
void GetOrientation(int nReciver, Euler eOri);
CPolhemus(char *device, int speed)
|| Specifies a string of the serial port. You can use the platform independent defines SERIAL1 or SERIAL2 that are defined in "serial.h"
|| Specifies the baud rate that is a communication speed with a Polhemuse device.
The constructor creates an instance that is used to communicate with a Polhemus device.
The method returns a number of active receivers.
void GetPosition(int nReceiver, Point3d p3Pos)
The method retrieves a current position of a specified active receiver. Point3d is typedefed as an array of 3 floats. The valid range of the nReciver is from 1 to the value returned by GetActiveReciverN().
void GetOrientation(int nReceiver, Euler eOri)
The method retrieves current euler angles of a specified active receiver. Euler is typedefed as an array of 3 floats. The valid range of the nReciver is from 1 to the value returned by GetActiveReciverN().
This library is provided "AS IS". Licenser disclaims all warranties, including but not limited to, all express or implied warranties of merchant ability and fitness for a particular purpose. Everyone can use the library for commerce or personal purposes free.