Aligning Optitrack data with a Java3d model
Aligning Optitrack data with a Java3d model
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.
Re: Aligning Optitrack data with a Java3d model
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.:
(OpenGL equivalent: glScaled(1, 1, -1))
Hope this helps.
Code: Select all
1 0 0 0
0 1 0 0
0 0 -1 0
0 0 0 1
Hope this helps.
Re: Aligning Optitrack data with a Java3d model
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.