javax.media.j3d

## Class PhysicalBody

- java.lang.Object
- - 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`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `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`

- - ### Constructor Detail

    - #### PhysicalBody

          public PhysicalBody()

      Constructs a PhysicalBody object with default parameters. The default values are as follows:
      left eye position : (-0.033, 0.0, 0.0)
      right eye position : (0.033, 0.0, 0.0)
      left ear position : (-0.080, -0.030, 0.095)
      right ear position : (0.080, -0.030, 0.095)
      nominal eye height from ground : 1.68
      nominal eye offset from nominal screen : 0.4572
      head to head tracker transform : identity

    - #### 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

    - #### 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

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