Quote:
My question here is how would I add the .h files for the HapticMaster? Would this be via the "Project -> Properties" way or hard coded into "MyExtension.cpp"? I'm guessing so long as the cpp file finds the HapticMaster commands it doesn't matter.
|
The easiest way would be to simply place the .h file in the same directory as the Visual Studio project for your extension.
Quote:
I take it that overwriting getPosition, getOrientation etc would be coded in MyExtension.cpp? The getPosition part will be easy I would use the code I used in my Ogre app, however I have a ADL Gimball attached to the HapticMaster which allows the arm to be controlled www.youtube.com/watch?v=RvXGnFky3c which uses 3 pot sensors to gather additional values. I take it that the code from the HapticMaster API to get these 3 values should be stored into getOrientation?
|
No, getPosition/getOrientation are methods of the VizExtensionSensor class, so you would override them in the MySensor class. The orientation data should be specified as a quaternion, so you will need to perform an appropriate conversion from the values provided by the HapticMaster.
Quote:
Connection to the HapticMaster needed to obtain these values via a network connection. I take it just like my Ogre app I define this connection along with any other variables at the top of MyExtension.cpp just like any program?
|
I'm not familiar with the HapticMaster API, but if they have a function for connecting and disconnecting, then the most appropriate place for calling these functions would probably be within the constructor/destructor of the MyExtension class.
Is the HapticMaster API publicly available?