|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.croftsoft.core.media.j3d.Transform3DLib
public class Transform3DLib
Static method library to manipulate Transform3D data. Primarily focuses on transforming a view through the 6 degrees of freedom.
Reference:
Foley, et al., Computer Graphics: Principles and Practice. Provides the mathematics for the 3D rotation matrices.
| Field Summary | |
|---|---|
static int |
X
Relative X axis |
static int |
Y
Relative Y axis |
static int |
Z
Relative Z axis |
| Method Summary | |
|---|---|
static boolean |
viewKeyPressed(javax.media.j3d.Transform3D transform3D,
KeyEvent keyEvent,
double deltaRotation,
double deltaTranslation)
Transforms the view based upon a user keyboard input. |
static void |
viewPitch(javax.media.j3d.Transform3D transform3D,
double radians)
Pitches the view by a given number of radians. |
static void |
viewRoll(javax.media.j3d.Transform3D transform3D,
double radians)
Rolls the view by a given number of radians. |
static void |
viewRotate(javax.media.j3d.Transform3D transform3D,
javax.vecmath.Matrix3d rotation)
Rotates the view by the given rotation matrix. |
static void |
viewTranslate(javax.media.j3d.Transform3D transform3D,
int dimension,
double distance)
Translates the view by a given distance along a relative axis. |
static void |
viewYaw(javax.media.j3d.Transform3D transform3D,
double radians)
Yaws the view by a given number of radians. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int X
public static final int Y
public static final int Z
| Method Detail |
|---|
public static void viewRotate(javax.media.j3d.Transform3D transform3D,
javax.vecmath.Matrix3d rotation)
transform3D - The transform containing the current rotation matrix.rotation - The rotation matrix to be muliplied.
public static void viewPitch(javax.media.j3d.Transform3D transform3D,
double radians)
transform3D - The transform containing the current rotation matrix.radians - The angle to rotate the transform about its relative X axis.
public static void viewYaw(javax.media.j3d.Transform3D transform3D,
double radians)
transform3D - The transform containing the current rotation matrix.radians - The angle to rotate the transform about its relative Y axis.
public static void viewRoll(javax.media.j3d.Transform3D transform3D,
double radians)
transform3D - The transform containing the current rotation matrix.radians - The angle to rotate the transform about its relative Z axis.
public static void viewTranslate(javax.media.j3d.Transform3D transform3D,
int dimension,
double distance)
transform3D - The transform containing the current rotation and translation
matrix.dimension - The relative axis to translate along.
Use the public constants X, Y, and Z provided by this class.
public static boolean viewKeyPressed(javax.media.j3d.Transform3D transform3D,
KeyEvent keyEvent,
double deltaRotation,
double deltaTranslation)
transform3D - The transform containing the current rotation and translation
matrices, usually the user's view transform.keyEvent - Arrow keys in combination with no other key, the Shift key, or
the Alt key will rotate or translate the transform about the
relative X, Y, and Z axes respectively for 6 degrees of freedom.deltaRotation - The number of radians to rotate the view upon a keyboard input.deltaTranslation - The distance to translate the view upon a keyboard input.
|
CroftSoft Javadoc | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||