javax.media.j3d
Class PhysicalBody

java.lang.Object
  extended by javax.media.j3d.PhysicalBody

public class PhysicalBody
extends java.lang.Object

This object contains a specification of the user's head. Attributes of this object are defined in the head coordinate system. The orgin is defined to be halfway between the left and right eye in the plane of the face. The x-axis extends to the right (of the head looking out from the head). The y-axis extends up. The z-axis extends to the rear of the head.

See Also:
View

Field Summary
private static double EAR_X
           
private static double EAR_Y
           
private static double EAR_Z
           
private static double HALF_IPD
           
(package private)  Transform3D headToHeadTracker
           
(package private)  Point3d leftEarPosition
          The user's left ear's position in head coordinates.
(package private)  Point3d leftEyePosition
          The user's left eye's position in head coordinates.
(package private)  double nominalEyeHeightFromGround
          The user's nominal eye height as measured from the ground plane.
(package private)  double nominalEyeOffsetFromNominalScreen
          The amount to offset the system's viewpoint from the user's current eye-point.
(package private)  int pbDirtyMask
           
(package private)  Point3d rightEarPosition
          The user's right ear's position in head coordinates.
(package private)  Point3d rightEyePosition
          The user's right eye's position in head coordinates.
(package private)  java.util.ArrayList users
           
 
Constructor Summary
PhysicalBody()
          Constructs a PhysicalBody object with default parameters.
PhysicalBody(Point3d leftEyePosition, Point3d rightEyePosition)
          Constructs and initializes a PhysicalBody object from the specified parameters.
PhysicalBody(Point3d leftEyePosition, Point3d rightEyePosition, Point3d leftEarPosition, Point3d rightEarPosition)
          Constructs and initializes a PhysicalBody object from the specified parameters.
 
Method Summary
(package private)  void addUser(View view)
           
 void getHeadToHeadTracker(Transform3D t)
          Retrieves the head to head-tracker coordinate system transform.
 void getLeftEarPosition(Point3d position)
          Retrieves the user head object's left ear position and places that value in the specified object.
 void getLeftEyePosition(Point3d position)
          Retrieves the user head object's left eye position and places that value in the specified object.
 double getNominalEyeHeightFromGround()
          Retrieves the nominal eye height from the ground plane.
 double getNominalEyeOffsetFromNominalScreen()
          Retrieves the nominal eye offset from the display screen.
 void getRightEarPosition(Point3d position)
          Retrieves the user head object's right ear position and places that value in the specified object.
 void getRightEyePosition(Point3d position)
          Retrieves the user head object's right eye position and places that value in the specified object.
private  void initHeadToHeadTracker()
           
(package private)  void notifyUsers()
           
(package private)  void removeUser(View view)
           
 void setHeadToHeadTracker(Transform3D t)
          Sets the head to head-tracker coordinate system transform.
 void setLeftEarPosition(Point3d position)
          Sets the user head object's left ear position.
 void setLeftEyePosition(Point3d position)
          Sets the user head object's left eye position.
 void setNominalEyeHeightFromGround(double height)
          Sets the nominal eye height from the ground plane.
 void setNominalEyeOffsetFromNominalScreen(double offset)
          Sets the nominal eye offset from the display screen.
 void setRightEarPosition(Point3d position)
          Sets the user head object's right ear position.
 void setRightEyePosition(Point3d position)
          Sets the user head object's right eye position.
 java.lang.String toString()
          Returns a string representation of this PhysicalBody's values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HALF_IPD

private static final double HALF_IPD
See Also:
Constant Field Values

EAR_X

private static final double EAR_X
See Also:
Constant Field Values

EAR_Y

private static final double EAR_Y
See Also:
Constant Field Values

EAR_Z

private static final double EAR_Z
See Also:
Constant Field Values

leftEyePosition

Point3d leftEyePosition
The user's left eye's position in head coordinates.


rightEyePosition

Point3d rightEyePosition
The user's right eye's position in head coordinates.


leftEarPosition

Point3d leftEarPosition
The user's left ear's position in head coordinates.


rightEarPosition

Point3d rightEarPosition
The user's right ear's position in head coordinates.


nominalEyeHeightFromGround

double nominalEyeHeightFromGround
The user's nominal eye height as measured from the ground plane.


nominalEyeOffsetFromNominalScreen

double nominalEyeOffsetFromNominalScreen
The amount to offset the system's viewpoint from the user's current eye-point. This offset distance allows an "Over the shoulder" view of the scene as seen by the user. By default, we will use a Z value of 0.4572 meters (18 inches).


headToHeadTracker

Transform3D headToHeadTracker

users

java.util.ArrayList users

pbDirtyMask

int pbDirtyMask
Constructor Detail

PhysicalBody

public PhysicalBody()
Constructs a PhysicalBody object with default parameters. The default values are as follows:


PhysicalBody

public PhysicalBody(Point3d leftEyePosition,
                    Point3d rightEyePosition)
Constructs and initializes a PhysicalBody object from the specified parameters.

Parameters:
leftEyePosition - the user's left eye position
rightEyePosition - the user's right eye position

PhysicalBody

public PhysicalBody(Point3d leftEyePosition,
                    Point3d rightEyePosition,
                    Point3d leftEarPosition,
                    Point3d rightEarPosition)
Constructs and initializes a PhysicalBody object from the specified parameters.

Parameters:
leftEyePosition - the user's left eye position
rightEyePosition - the user's right eye position
leftEarPosition - the user's left ear position
rightEarPosition - the user's right ear position
Method Detail

removeUser

void removeUser(View view)

addUser

void addUser(View view)

notifyUsers

void notifyUsers()

toString

public java.lang.String toString()
Returns a string representation of this PhysicalBody's values.

Overrides:
toString in class java.lang.Object

getLeftEyePosition

public void getLeftEyePosition(Point3d position)
Retrieves the user head object's left eye position and places that value in the specified object.

Parameters:
position - the object that will receive the left-eye's position in head coordinates

setLeftEyePosition

public void setLeftEyePosition(Point3d position)
Sets the user head object's left eye position.

Parameters:
position - the left-eye's position in head coordinates

getRightEyePosition

public void getRightEyePosition(Point3d position)
Retrieves the user head object's right eye position and places that value in the specified object.

Parameters:
position - the object that will receive the right-eye's position in head coordinates

setRightEyePosition

public void setRightEyePosition(Point3d position)
Sets the user head object's right eye position.

Parameters:
position - the right-eye's position in head coordinates

getLeftEarPosition

public void getLeftEarPosition(Point3d position)
Retrieves the user head object's left ear position and places that value in the specified object.

Parameters:
position - the object that will receive the left-ear's position in head coordinates

setLeftEarPosition

public void setLeftEarPosition(Point3d position)
Sets the user head object's left ear position.

Parameters:
position - the left-ear's position in head coordinates

getRightEarPosition

public void getRightEarPosition(Point3d position)
Retrieves the user head object's right ear position and places that value in the specified object.

Parameters:
position - the object that will receive the right-ear's position in head coordinates

setRightEarPosition

public void setRightEarPosition(Point3d position)
Sets the user head object's right ear position.

Parameters:
position - the right-ear's position in head coordinates

setNominalEyeHeightFromGround

public void setNominalEyeHeightFromGround(double height)
Sets the nominal eye height from the ground plane. This parameter defines the distance from the origin of the user's head (the eyepoint) to the ground. It is used when the view attach policy is NOMINAL_FEET.

Parameters:
height - the nominal height of the eye above the ground plane

getNominalEyeHeightFromGround

public double getNominalEyeHeightFromGround()
Retrieves the nominal eye height from the ground plane.

Returns:
the current nominal eye height above the ground plane

setNominalEyeOffsetFromNominalScreen

public void setNominalEyeOffsetFromNominalScreen(double offset)
Sets the nominal eye offset from the display screen. This parameter defines the distance from the origin of the user's head (the eyepoint), in it's nominal position, to the screen. It is used when the view attach policy is NOMINAL_HEAD or NOMINAL_FEET. This value is overridden to be the actual eyepoint when the window eyepoint policy is RELATIVE_TO_FIELD_OF_VIEW.

Parameters:
offset - the nominal offset from the eye to the screen

getNominalEyeOffsetFromNominalScreen

public double getNominalEyeOffsetFromNominalScreen()
Retrieves the nominal eye offset from the display screen.

Returns:
the current nominal offset from the eye to the display screen

setHeadToHeadTracker

public void setHeadToHeadTracker(Transform3D t)
Sets the head to head-tracker coordinate system transform. If head tracking is enabled, this transform is a calibration constant. If head tracking is not enabled, this transform is not used. This is used in both SCREEN_VIEW and HMD_VIEW modes.

Parameters:
t - the new transform
Throws:
BadTransformException - if the transform is not rigid

getHeadToHeadTracker

public void getHeadToHeadTracker(Transform3D t)
Retrieves the head to head-tracker coordinate system transform.

Parameters:
t - the object that will receive the transform

initHeadToHeadTracker

private void initHeadToHeadTracker()


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.