The Source for Java Technology Collaboration
User: Password:



Joerg Plewe

Joerg Plewe's Blog

Head banging...

Posted by herkules on September 30, 2007 at 10:58 AM | Comments (2)

TrackIR is a headtracking device that currently is quite popular amongst gamers, especially in the simulation community.
It consists of a small device to be placed on top of the monitor and a prepared base cap with three IR reflecting strips.
JTrackIR is my Java binding. Not a big thing, but maybe useful to somebody.


TrackIR4-laptop-TrackClip-hat.jpg

2inch-TRACKIR4-iso-ns.jpg

TrackIR shows an impressive resolution and supports all 6 axes (x,y,z,yaw,pitch,roll). So it not only detects the heads attitude but also the translational position and even the heads distance from the screen.

6DOFmovement.jpg

The device is not cheap but also not extraordinary expensive and definitely worth the money if you have a good use-case.

As with all parts of the Distributed RealTime Simulation project on SourceForge, the source is available from cvs.
The Java source code is free while I'm not allowed to opensource the C/C++ code accessing the TrackIR DLL because it is covered under an NDA. So you have to refer to the compiled binary located in the bin directory.

The API is stupid simple. For there can only be a single device, the API layout is completely static. Here are parts of it:


public static void setDeveloperID( int id );
public static void update();
public static boolean isOperational();
public static float getRoll();
public static float getPitch();
public static float getYaw();
public static float getX();
public static float getY();
public static float getZ();
...


The jar file in the bin folder there also contains a simple test UI that paints the values as it is delivered by the device.

.


jtrackir_screenshot.jpg


Currently, JTrackIR is not yet embodied to FlyingGuns. My own architecture placed the camera far away from the input system, so they are hard to connect :). But there is still some hope.

If you think controlling something with your head and you like to use your head not only for its mental power, JTrackIR allows you to do that easily and your application might proudly show a new logo:
trackir_logo50.jpg



Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • I don't think it is a good idea to have a static API.
    What if some day they allow more than one device at once?
    How about a singleton + factory instead?

    Posted by: ivan_memruk on October 01, 2007 at 05:51 AM

  • Awesome! Thanks for sharing this with us. - MissDanni

    Posted by: missdanni on November 22, 2007 at 03:14 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds