TDx.TDxInput vs RawInput

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
KMeissner
Posts: 6
Joined: Wed Feb 08, 2012 1:49 pm

TDx.TDxInput vs RawInput

Post by KMeissner »

I am trying to add support for 3DxConnection in our 3D app.

We have a version of the COM based TDxInput working in our C++ application.

We are having a lot of issues adding support to the C#.net version of the application. I tried adding the code from csMonitor on the ftp server that makes a new TDx.TDxInput.Device(). Its does not seem reliable. When I build in debug I get events. When I build in release, I connect to the devices successfully and register my handlers. But I never receive events. There does not seem to be any log messages or errors...


I saw an old note on forum that TDx.TDXInput had been deprecated in favor of using RawInput. Why was is deprecated interface was on the ftp server, it blew a day for me....

Anyway I am currently blocked on using RawInput. Out application was developed against the COM TDxInput. The COM interface hands back sensor events as doubles. The RawInput are shorts and scaled differently.
How do I convert them?

There does not seem to be any SDK documentation anywhere and there is no dedicated Windows download.

Also I am not getting any replies when I email the support address listed on the web site.

over all this is pretty frustrating..


Karl - MetaVR
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

My apologies Karl. We have been discussing this internally.

The numbers from the device, through any API are completely unitless.

There is nothing special about the scaling of the numbers in TDxInput. They are in completely arbitrary units, as are the numbers directly from the device. To use TDxInput or any other API, you have to scale the numbers to the coordinate space of your application. That code probably looks something like this:

my.Tx = _3Dx.Tx * someArbitraryConstant_T;
my.Ty = _3Dx.Ty * someArbitraryConstant_T;
my.Tz = _3Dx.Tz * someArbitraryConstant_Scale;

my.Rx = _3Dx.Rx * someArbitraryConstant_R;
my.Ry = _3Dx.Ry * someArbitraryConstant_R;
my.Rz = _3Dx.Rz * someArbitraryConstant_R;

// Use my.Tx,Ty,Tz to modify my camera location
...
// Use my.Rx,Ry,Rz to change my camera orientation
...

For the 3DxWare SDK, Raw Input, DirectInput or HID those constants will probably be very similar. For TDxInput, they will be quite different. It doesn't matter. You have to find some scale factors that work for your coordinate system. The only way to do that is to experiment until the values provide a good level of control. The SDK provides suggested rates of motion.

3Dx Software Development
Post Reply