|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.GroupNode
org.xith3d.scenegraph.Group
org.xith3d.scenegraph.TransformGroup
org.xith3d.scenegraph.Transform
public class Transform
The Transform class can be used to quickly transform any object, reducing the
number of lines needed (Transform3D construction, etc..) and improving
readability of your code.
However, you can live without ^^
| Field Summary | |
|---|---|
static Transform |
IDENTITY_TRANSFORM
The identity transform (no transformation at all) |
static int |
ROTATION
|
static int |
SCALE
|
static int |
TRANSLATION
|
| Fields inherited from class org.xith3d.scenegraph.GroupNode |
|---|
children, hostGroup, numChildren, totalNumChildren, totalNumShapes |
| Fields inherited from class org.xith3d.scenegraph.Node |
|---|
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, transformGroup, untransformedBounds |
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
Transform()
Creates an empty identity transform. |
|
Transform(int mode,
org.openmali.vecmath2.Tuple3f transform,
Node node)
|
|
Transform(Node node)
|
|
| Method Summary | |
|---|---|
Transform |
add(Node n)
Adds node n to this transform and returns n. |
Transform |
add(Transform t)
Adds transform t to this transform and returns t. |
Transform |
addAxisRotation(org.openmali.vecmath2.Tuple3f rotationAxis,
float angle)
Adds rotation about an axis. |
Transform |
addAxisTranslation(org.openmali.vecmath2.Tuple3f translationAxis,
float length)
Sets translation about an axis with a specified length. |
Transform |
addRotation(float x,
float y,
float z)
Adds a rotation to the current transformation. |
Transform |
addRotation(org.openmali.vecmath2.Matrix3f rotationMatrix)
Adds a rotation to the current transformation. |
Transform |
addRotation(org.openmali.vecmath2.Tuple3f rotate)
Adds a rotation to the current transformation. |
Transform |
addRotationX(float angle)
Adds a rotation to the current transformation. |
Transform |
addRotationY(float angle)
Adds a rotation to the current transformation. |
Transform |
addRotationZ(float angle)
Adds a rotation to the current transformation. |
Transform |
addScale(float scale)
Adds a scale transformation to the current transform. |
Transform |
addTranslation(float x,
float y,
float z)
Adds a translation to the current transformation. |
Transform |
addTranslation(org.openmali.vecmath2.Tuple3f translate)
Adds a translation to the current transformation. |
Transform |
clear()
Clears all transformations (Set the identity matrix). |
static Transform |
get(Node node)
|
void |
set(Transform trans)
Sets this transform to be equal to another one. |
Transform |
setAxisRotation(org.openmali.vecmath2.Tuple3f rotationAxis,
float angle)
Sets rotation about an axis. |
Transform |
setAxisTranslation(org.openmali.vecmath2.Tuple3f translationAxis,
float length)
Sets translation about an axis with a specified length. |
Transform |
setMatrix(org.openmali.vecmath2.Matrix4f matrix)
Sets this transform to a transformation corresponding to the matrix argument. |
Transform |
setRotation(float x,
float y,
float z)
Applies a rotation. |
Transform |
setRotation(org.openmali.vecmath2.Matrix3f rotationMatrix)
Sets a rotation to the current transformation. |
Transform |
setRotation(org.openmali.vecmath2.Tuple3f rotate)
Applies a rotation. |
Transform |
setRotationX(float angle)
Applies a rotation. |
Transform |
setRotationY(float angle)
Applies a rotation. |
Transform |
setRotationZ(float angle)
Applies a rotation. |
Transform |
setScale(float scale)
Applies a scale. |
Transform |
setScale(float x,
float y,
float z)
Applies a scale. |
Transform |
setScale(org.openmali.vecmath2.Tuple3f scale)
Applies a scale. |
Transform |
setScaleX(float scale)
Applies a scale. |
Transform |
setScaleY(float scale)
Applies a scale. |
Transform |
setScaleZ(float scale)
Applies a scale. |
Transform |
setTransform(int mode,
float x,
float y,
float z)
Sets a transformation. |
Transform |
setTransform(int mode,
org.openmali.vecmath2.Tuple3f transform)
Sets a transformation. |
Transform |
setTranslation(float x,
float y,
float z)
Applies a translation. |
Transform |
setTranslation(org.openmali.vecmath2.Tuple3f translate)
Applies a translation. |
Transform |
setTranslationX(float value)
Sets a translation. |
Transform |
setTranslationY(float value)
Sets a translation. |
Transform |
setTranslationZ(float value)
Sets a translation. |
void |
transform(org.openmali.vecmath2.Point3f input)
Applies this transform to a Point3f. |
void |
transform(org.openmali.vecmath2.Vector3f input)
Applies this transform to a Vector3f. |
| Methods inherited from class org.xith3d.scenegraph.TransformGroup |
|---|
getLocalTransform, getLocalTransform, getPosition, getPosition, getTransform, getTransform, getWorldTransform, newInstance, onTransformChanged, setLocalTransform, setPosition, setPosition, setTransform, traverse, updateTransform |
| Methods inherited from class org.xith3d.scenegraph.Group |
|---|
moveTo |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
getName, getUserData, getUserData, getUserDataMap, isLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xith3d.scenegraph.Transformable |
|---|
getName, setName |
| Field Detail |
|---|
public static final Transform IDENTITY_TRANSFORM
public static final int ROTATION
public static final int TRANSLATION
public static final int SCALE
| Constructor Detail |
|---|
public Transform(Node node)
node - The node to transform
public Transform(int mode,
org.openmali.vecmath2.Tuple3f transform,
Node node)
mode - Transform.ROTATION, Transform.TRANSLATION, or Transform.SCALEtransform - If rotation, euler angles (in radians), if translation or
scale relevant valuenode - The node to transformpublic Transform()
| Method Detail |
|---|
public Transform setTransform(int mode,
float x,
float y,
float z)
mode - Transform.ROTATION, Transform.TRANSLATION, or Transform.SCALEx - X valuey - Y valuez - Z value
public Transform setTransform(int mode,
org.openmali.vecmath2.Tuple3f transform)
mode - Transform.ROTATION, Transform.TRANSLATION, or Transform.SCALEtransform - If rotation, euler angles (in radians), if translation or
scale relevant value
public Transform setTranslationX(float value)
value - Translation
public Transform setTranslationY(float value)
value - Translation
public Transform setTranslationZ(float value)
value -
public Transform addTranslation(float x,
float y,
float z)
x - X valuey - Y valuez - Z value
public Transform setTranslation(float x,
float y,
float z)
x - X valuey - Y valuez - Z value
public Transform addTranslation(org.openmali.vecmath2.Tuple3f translate)
translate - Translation
public Transform setTranslation(org.openmali.vecmath2.Tuple3f translate)
translate - Translation
public Transform setRotation(org.openmali.vecmath2.Tuple3f rotate)
rotate - Euler angles, in radians
public Transform setRotation(float x,
float y,
float z)
x - X angle, in radiansy - Y angle, in radiansz - Z angle, in radians
public Transform addRotation(org.openmali.vecmath2.Tuple3f rotate)
rotate - Euler angles, in radians
public Transform setRotation(org.openmali.vecmath2.Matrix3f rotationMatrix)
rotationMatrix - public Transform addRotation(org.openmali.vecmath2.Matrix3f rotationMatrix)
rotationMatrix -
public Transform addRotation(float x,
float y,
float z)
x - X angle, in radiansy - Y angle, in radiansz - Z angle, in radians
public Transform setRotationX(float angle)
angle - Euler angle, in radians
public Transform addRotationX(float angle)
angle - Euler angle, in radians
public Transform setRotationY(float angle)
angle - Euler angle, in radians
public Transform addRotationY(float angle)
angle - Euler angle, in radians
public Transform setRotationZ(float angle)
angle - Euler angle, in radians
public Transform addRotationZ(float angle)
angle - Euler angle, in radians
public Transform setScale(org.openmali.vecmath2.Tuple3f scale)
scale - X, Y, Z scale
public Transform setScale(float x,
float y,
float z)
x - X scaley - Y scalez - Z scale
public Transform setScaleX(float scale)
scale - X scale
public Transform setScaleY(float scale)
scale - Y scale
public Transform setScaleZ(float scale)
scale - Z scale
public Transform setScale(float scale)
scale - X, Y and Z scale
public Transform addScale(float scale)
scale - Scale factor
public Transform add(Node n)
n - The node to add
public Transform add(Transform t)
t - The transform to add
public Transform clear()
public Transform setAxisRotation(org.openmali.vecmath2.Tuple3f rotationAxis,
float angle)
rotationAxis - The axis to rotate aboutangle - The angle to rotate of, in radians
public Transform addAxisRotation(org.openmali.vecmath2.Tuple3f rotationAxis,
float angle)
rotationAxis - The axis to rotate aboutangle - The angle to rotate of, in radians
public Transform setAxisTranslation(org.openmali.vecmath2.Tuple3f translationAxis,
float length)
translationAxis - length -
public Transform addAxisTranslation(org.openmali.vecmath2.Tuple3f translationAxis,
float length)
translationAxis - length -
public Transform setMatrix(org.openmali.vecmath2.Matrix4f matrix)
matrix - The transformation matrix to set this transform to
public static Transform get(Node node)
node -
public void transform(org.openmali.vecmath2.Point3f input)
input - the Tuple3f to be applied the Transformpublic void transform(org.openmali.vecmath2.Vector3f input)
input - the Tuple3f to be applied the Transformpublic void set(Transform trans)
trans -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||