Aligning Optitrack data with a Java3d model

Post Reply
iipiTony
Posts: 1
Joined: Thu Mar 13, 2008 6:05 am

Aligning Optitrack data with a Java3d model

Post by iipiTony »

What is the best way to get the data from the rigid body toolkit which is being sent via vrpn to correspond to a java 3d model. I want the position and orientation of the rigid body to correspond to the position and orientation of the camera (viewing platform) in the 3d model. There is an issue with the physical coordinate system being left handed and the model coordinate system being right handed. Are there built in mechanisms in Java3d that can be used to do this for me? Configuration files, Sensor, and InputDevices? Any information regarding this would be greatly appreciated.
hpcv
Posts: 58
Joined: Tue Oct 23, 2007 2:09 pm

Re: Aligning Optitrack data with a Java3d model

Post by hpcv »

I don't know Java3D, but if it is anything like a normal 3D API, you can correct for left-/right-handed coordinate issues by multiplying the entire thing with a scaling matrix that mirrors one of the axes, e.g.:

Code: Select all

 1  0  0  0
 0  1  0  0
 0  0 -1  0
 0  0  0  1
(OpenGL equivalent: glScaled(1, 1, -1))

Hope this helps.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Aligning Optitrack data with a Java3d model

Post by beckdo »

I think your biggest issue is going to be getting the values into Java. But referring to the VRPN web site, it does look like they have Java support somewhere in there.
Post Reply