> Date:         Fri, 23 Nov 2001 09:42:35 -0500
> From: Alejandro Terrazas <[EMAIL PROTECTED]>
>
> I am finally getting good values out my head tracker using the
> JavaComm API to read the serial port--
>
> However, I am not sure what form the data must be in in order
> to use setHeadIndex() --from previous emails you will note
> that this is the correct way to use head tracking with the
> view model.
>
> What is the correct format for a 6DOF sensor to encapsulate
> the data?

For head tracking the sensor read must be encapsulated in a Transform3D which
transforms points from the sensor's local coordinate system to tracker base
coordinates.  From there Java 3D can transform the points into the virtual
world and to the image plates of the available display devices.  Remember to
set the HeadToHeadTracker matrix of PhysicalBody as well, in order to transform
the positions of your eyes within your head into the sensor's local coordinate
system.

It's easiest to use an implementation of the Java 3D InputDevice interface to
handle the data coming across the serial port from your tracker if you aren't
doing so already.  Several InputDevice implementations are available at j3d.org
and possibly other repositories; if your device isn't supported or doesn't work
correctly with the ones publically available then you might need to implement
your own.

However, I don't see a reason why things shouldn't work OK as long as you have
a Sensor instance that returns the current head position and orientation
properly encapsulated in a Transform3D whenever Java 3D calls its getRead()
method.  You just need to implement some sort of mechanism to update the
Sensor's reads with its setNextSensorRead() method at appropriate intervals.
This is also pretty much what is needed to implement InputDevice itself.

-- Mark Hood

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to