wiiremotej
Class PositionInfo

java.lang.Object
  extended by wiiremotej.PositionInfo

public class PositionInfo
extends java.lang.Object

Contains information about the WiiRemote's current position, including Y and Z position, pitch, and roll. It can also return either X position OR yaw, but not both. See isYawAllowed() for details. Here is a basic diagram explaining what each value means.

                              pitch (e.g., flip up so that the remote is vertical)
                               ^
                               |
                             |----| --> yaw (e.g., spin around so that the front is at the back)
                             |    |
                             |    |  /\
                             | A  | /  \ > roll (e.g., flip over to expose the B button)
      z (from top to bottom) |    |
           (not shown)       |    | |
                             |    | y (from front to back)
                             |    | |
                             |----|
                             --x--
                      (from left to right)

See Also:
WRIREvent, WRAccelerationEvent, isYawAllowed()

Method Summary
 boolean isYawAllowed()
          Returns true if the user can yaw the remote and false if the user can move it horizontally.
 double pitch()
          Returns pitch.
 double roll()
          Returns roll.
 double xPos()
          Returns xPos.
 double yaw()
          Returns yaw.
 double yPos()
          Returns yPos.
 double zPos()
          Returns zPos.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

xPos

public double xPos()
Returns xPos. This is the X position of the Wii remote. May not be determinable, depending on whether yaw is allowed or not.

Returns:
xPos.
See Also:
isYawAllowed()

yPos

public double yPos()
Returns yPos. This is the Y position of the Wii remote.

Returns:
yPos.

zPos

public double zPos()
Returns zPos. This is the Z position of the Wii remote.

Returns:
zPos.

pitch

public double pitch()
Returns pitch. This is the pitch of the Wii remote.

Returns:
pitch.

yaw

public double yaw()
Returns yaw. This is the yaw of the Wii remote. May not be determinable, depending on whether yaw is allowed or not.

Returns:
yaw.
See Also:
isYawAllowed()

roll

public double roll()
Returns roll. This is the roll of the Wii remote.

Returns:
roll.

isYawAllowed

public boolean isYawAllowed()
Returns true if the user can yaw the remote and false if the user can move it horizontally. These conditions are mutually exclusive. We are limited to five degrees of freedom, so we must assume that either yaw is 0 or x position is 0. If these assumptions are faulty (user error), the data is meaningless. Obviously, it would be impossible to make these values EXACTLY 0 without considerable effort. So long as they are close, it's fine.

Returns:
true if the user can yaw the remote and false if the user can move it horizontally. These conditions are mutually exclusive.