net.rim.device.api.math
Class Transform3D

java.lang.Object
  extended by net.rim.device.api.math.Transform3D
All Implemented Interfaces:
Animatable

public class Transform3D
extends Object
implements Animatable

Defines a 3-dimensional transformation.

Note: When using the scale, rotate, and translate methods, only the transform's corresponding scale, rotation, or translation component is updated (it is not as if the scale, rotate, or translate is applied to the transform's matrix).

For example, if the user calls t.rotateX(angle), this updates t's internal rotation component by rotating it by angle radians about the x-axis. The following code demonstrates this more clearly:

   // Create a non-identity transform and get a copy of its matrix.
   Transform3D t1 = new Transform3D(new Vector3f(1.2f, 1.7f, 0.5f), new Quaternion4f(), new Vector3f(10.0f, -2.0f, 0.0f));
   Matrix4f t2 = new Matrix4f(t1.getMatrix());

   // Rotate the transform's rotation component by 35 degrees about the X axis and get the new matrix.
   t1.rotateX((float)Math.toRadians(35.0f));
   Matrix4f t1Matrix = t1.getMatrix();
   
   // Multiply t1's original matrix by a matrix representing the same rotation as above.
   Matrix4f rotateX = new Matrix4f();
   Matrix4f.createRotationX((float)Math.toRadians(35.0f), rotateX);
   t2.multiply(rotateX);
   
   // At this point, t1Matrix is not equal to t2!
   if (t1Matrix.equals(t2))
       throw new RuntimeException();
  

Note: To construct a Transform3D from a transformation matrix stored as a Matrix4f, first decompose the Matrix4f into its separate translation, scale, and rotation components using Matrix4f.decompose(Vector3f, Quaternion4f, Vector3f) and then pass those arguments to the appropriate constructor or set methods of Transform3D.

See Also:
Matrix4f.decompose(Vector3f, Quaternion4f, Vector3f)
Since:
BlackBerry API 6.0.0

Field Summary
static int ANIMATION_PROPERTY_ROTATE
          Used to animate the rotation component(as quaternion).
static int ANIMATION_PROPERTY_SCALE
          Used to animate the scale component.
static int ANIMATION_PROPERTY_TRANSFORM
          Used to animate the all transformation components translation, rotation(as quaternion) and scale.
static int ANIMATION_PROPERTY_TRANSLATE
          Used to animate the translation component.
static int ANIMATION_PROPERTY_TRANSLATE_ROTATE
          Used to animate the translation-rotation component.
 
Constructor Summary
Transform3D()
          Constructs the identity transform.
Transform3D(Transform3D transform)
          Constructs a new transform from the given transform.
Transform3D(Vector3f scale, Matrix4f rotation, Vector3f translation)
          Constructs a new transform from the specified values.
Transform3D(Vector3f scale, Quaternion4f rotation, Vector3f translation)
          Constructs a new transform from the specified values.
 
Method Summary
 boolean equals(Object obj)
          Determines if the specified object is of type Transform3D and all of its elements are equal to the elements of this transform.
 boolean equals(Transform3D transform)
          Returns true if all elements of the specified transform are equal to the elements of this transform.
 int getAnimationPropertyComponentCount(int property)
           Gets the number of components of the specified property.
 void getAnimationValue(int property, AnimationValue value)
           Gets the value or values of the specified property.
 Matrix4f getMatrix()
          Gets the matrix corresponding to this transform.
 void getMatrix(Matrix4f matrix)
          Gets the matrix corresponding to this transform in the specified matrix.
 void getRotation(Matrix4f rotation)
          Gets the rotation component of this transform in the specified matrix.
 void getRotation(Quaternion4f rotation)
          Gets the rotation component of this transform in the specified quaternion.
 float getRotationAsAxisAngle(Vector3f axis)
          Gets the axis of rotation, and stores the axis of rotation of this transform in the specified Vector3f
 void getScale(Vector3f scale)
          Gets the scale component of this transform in the specified vector.
 void getTranslation(Vector3f translation)
          Gets the translation component of this transform in the specified vector.
 int hashCode()
          Returns a hash code based on the elements of this transform.
 void rotate(Matrix4f rotation)
          Rotates this transform's rotation component by the given rotation.
 void rotate(Matrix4f rotation, Transform3D dst)
          Rotates this transform's rotation component by the given rotation and stores the result in the given destination transform.
 void rotate(Quaternion4f rotation)
          Rotates this transform's rotation component by the given rotation.
 void rotate(Quaternion4f rotation, Transform3D dst)
          Rotates this transform's rotation component by the given rotation and stores the result in the given destination transform.
 void rotate(Vector3f axis, float angle)
          Rotates this transform's rotation component by the given rotation (defined as an axis angle rotation).
 void rotate(Vector3f axis, float angle, Transform3D dst)
          Rotates this transform's rotation component by the given rotation (defined as an axis angle rotation) and stores the result in the given destination transform.
 void rotateX(float angle)
          Rotates this transform's rotation component by the given angle about the x-axis.
 void rotateX(float angle, Transform3D dst)
          Rotates this transform's rotation component by the given angle about the x-axis and stores the result in the given destination transform.
 void rotateY(float angle)
          Rotates this transform's rotation component by the given angle about the y-axis.
 void rotateY(float angle, Transform3D dst)
          Rotates this transform's rotation component by the given angle about the y-axis and stores the result in the given destination transform.
 void rotateZ(float angle)
          Rotates this transform's rotation component by the given angle about the z-axis.
 void rotateZ(float angle, Transform3D dst)
          Rotates this transform's rotation component by the given angle about the z-axis and stores the result in the given destination transform.
 void scale(float scale)
          Scales this transform's scale component by the given factor along all axes.
 void scale(float sx, float sy, float sz)
          Scales this transform's scale component by the given factors along each axis.
 void scale(float sx, float sy, float sz, Transform3D dst)
          Scales this transform's scale component by the given factors along each axis and stores the result in the given destination transform.
 void scale(float scale, Transform3D dst)
          Scales this transform's scale component by the given factor along all axes and stores the result in the given destination transform.
 void scale(Vector3f scale)
          Scales this transform's scale component by the given scale vector.
 void scale(Vector3f scale, Transform3D dst)
          Scales this transform's scale component by the given scale vector and stores the result in the given destination transform.
 void scaleX(float sx)
          Scales this transform's scale component by the given scale factor along the x axis.
 void scaleX(float sx, Transform3D dst)
          Scales this transform's scale component by the given scale factor along the x axis and stores the result in the given destination transform.
 void scaleY(float sy)
          Scales this transform's scale component by the given scale factor along the y axis.
 void scaleY(float sy, Transform3D dst)
          Scales this transform's scale component by the given scale factor along the y axis and stores the result in the given destination transform.
 void scaleZ(float sz)
          Scales this transform's scale component by the given scale factor along the z axis.
 void scaleZ(float sz, Transform3D dst)
          Scales this transform's scale component by the given scale factor along the z axis and stores the result in the given destination transform.
 void set(Transform3D transform)
          Sets this transform to the specified transform.
 void set(Vector3f scale, Matrix4f rotation, Vector3f translation)
          Sets the transform to the specified values.
 void set(Vector3f scale, Quaternion4f rotation, Vector3f translation)
          Sets the transform to the specified values.
 void setAnimationValue(int property, AnimationValue value)
           Sets the value or values of the specified property.
 void setRotation(Matrix4f rotation)
          Sets the rotation component for this transform to the specified values.
 void setRotation(Quaternion4f rotation)
          Sets the rotation component for this transform to the specified values.
 void setScale(float scale)
          Sets the scale factor along all axes for this transform to the specified value.
 void setScale(float sx, float sy, float sz)
          Sets the scale component of this transform to the specified values.
 void setScale(Vector3f scale)
          Sets the scale component of this transform to the specified scale vector.
 void setTranslation(float tx, float ty, float tz)
          Sets the translation component for this transform to the specified values.
 void setTranslation(Vector3f translation)
          Sets the translation component for this transform to the specified translation vector.
 String toString()
          Returns a String representation of this transform.
 void transformBounds(Bounds bounds)
          Transforms the specified bounds and stores the result in the original bounding object.
 void transformBounds(Bounds bounds, Bounds dst)
          Transforms the specified bounds and stores the result in the specified destination bounding object.
 void transformNormal(Vector3f normal)
          Transforms the specified normal vector and stores the result in the original vector.
 void transformNormal(Vector3f normal, Vector3f dst)
          Transforms the specified normal vector and stores the result in the specified destination normal vector.
 void transformPlane(Plane plane)
          Transforms the specified plane and stores the result in the original plane.
 void transformPlane(Plane plane, Plane dst)
          Transforms the specified plane and stores the result in the specified destination plane.
 void transformPoint(Vector3f point)
          Transforms the specified point and stores the result in the original point.
 void transformPoint(Vector3f point, Vector3f dst)
          Transforms the specified point and stores the result in the specified destination point.
 void transformRay(Ray ray)
          Transforms the specified ray and stores the result in the original ray.
 void transformRay(Ray ray, Ray dst)
          Transforms the specified ray and stores the result in the specified destination ray.
 void transformVector(Vector3f vector)
          Transforms the specified vector and stores the result in the original vector.
 void transformVector(Vector3f vector, Vector3f dst)
          Transforms the specified vector and stores the result in the specified destination vector.
 void translate(float tx, float ty, float tz)
          Translates this transform's translation component by the given values along each axis.
 void translate(float tx, float ty, float tz, Transform3D dst)
          Translates this transform's translation component by the given values along each axis and stores the result in the given destination transform.
 void translate(Vector3f translation)
          Translates this transform's translation component by the given translation vector.
 void translate(Vector3f translation, Transform3D dst)
          Translates this transform's translation component by the given translation vector and stores the result in the given destination transform.
 void translateX(float tx)
          Translates this transform's translation component by the given value along the x axis.
 void translateX(float tx, Transform3D dst)
          Translates this transform's translation component by the given value along the x axis and stores the result in the given destination transform.
 void translateY(float ty)
          Translates this transform's translation component by the given value along the y axis.
 void translateY(float ty, Transform3D dst)
          Translates this transform's translation component by the given value along the y axis and stores the result in the given destination transform.
 void translateZ(float tz)
          Translates this transform's translation component by the given value along the z axis.
 void translateZ(float tz, Transform3D dst)
          Translates this transform's translation component by the given value along the z axis and stores the result in the given destination transform.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 



Field Detail

ANIMATION_PROPERTY_TRANSLATE

public static final int ANIMATION_PROPERTY_TRANSLATE
Used to animate the translation component.

Required AnimationKeyframeSequence data format:

  float[] data = 
  {
      translation.x,translation.y,translation.z
  }
  

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ANIMATION_PROPERTY_ROTATE

public static final int ANIMATION_PROPERTY_ROTATE
Used to animate the rotation component(as quaternion).

Required AnimationKeyframeSequence data format:

  float[] data = 
  {
      rotation.x, rotation.y, rotation.z, rotation.w
  }
 

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ANIMATION_PROPERTY_SCALE

public static final int ANIMATION_PROPERTY_SCALE
Used to animate the scale component.

Required AnimationKeyframeSequence data format:

  float[] data = 
  {
      scale.x, scale.y, scale.z
  }
 

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ANIMATION_PROPERTY_TRANSLATE_ROTATE

public static final int ANIMATION_PROPERTY_TRANSLATE_ROTATE
Used to animate the translation-rotation component.

Required AnimationKeyframeSequence data format:

  float[] data = 
  {
      translation.x, translation.y, translation.z,
      rotation.x, rotation.y, rotation.z, rotation.w
  }
  

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ANIMATION_PROPERTY_TRANSFORM

public static final int ANIMATION_PROPERTY_TRANSFORM
Used to animate the all transformation components translation, rotation(as quaternion) and scale.

  float[] data = 
  {
      translation.x, translation.y, translation.z,
      rotation.x, rotation.y, rotation.z, rotation.w,
      scale.x, scale.y, scale.z
  }
  

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0


Constructor Detail

Transform3D

public Transform3D()
Constructs the identity transform.

Since:
BlackBerry API 6.0.0

Transform3D

public Transform3D(Vector3f scale,
                   Quaternion4f rotation,
                   Vector3f translation)
Constructs a new transform from the specified values.

Parameters:
scale - The scale vector.
rotation - The rotation quaternion.
translation - The translation vector.
Throws:
NullPointerException - If scale, rotation, or translation is null.
Since:
BlackBerry API 6.0.0

Transform3D

public Transform3D(Vector3f scale,
                   Matrix4f rotation,
                   Vector3f translation)
Constructs a new transform from the specified values.

Parameters:
scale - The scale vector.
rotation - The rotation matrix.
translation - The translation vector.
Throws:
NullPointerException - If scale, rotation, or translation is null.
Since:
BlackBerry API 6.0.0

Transform3D

public Transform3D(Transform3D transform)
Constructs a new transform from the given transform.

Parameters:
transform - The transform to copy.
Throws:
NullPointerException - If transform is null.
Since:
BlackBerry API 6.0.0


Method Detail

getMatrix

public void getMatrix(Matrix4f matrix)
Gets the matrix corresponding to this transform in the specified matrix.

Parameters:
matrix - The matrix to store the transformation matrix in.
Throws:
NullPointerException - If matrix is null.
Since:
BlackBerry API 6.0.0

getMatrix

public Matrix4f getMatrix()
Gets the matrix corresponding to this transform.

Note: The matrix returned from this method is mathematically equivalent to this transform only as long as this transform is not changed (i.e. by calling set(), setScale(), translate(), rotateX(), etc.). Once the transform has been changed, the user must call getMatrix() again to get the updated matrix. Also note that changing the matrix returned from this method does not change this transform.

Returns:
The matrix of this transform.
Since:
BlackBerry API 6.0.0

getScale

public void getScale(Vector3f scale)
Gets the scale component of this transform in the specified vector.

Parameters:
scale - The vector to store the scale in.
Throws:
NullPointerException - If scale is null.
Since:
BlackBerry API 6.0.0

getRotation

public void getRotation(Matrix4f rotation)
Gets the rotation component of this transform in the specified matrix.

Parameters:
rotation - The matrix to store the rotation in.
Throws:
NullPointerException - If rotation is null.
Since:
BlackBerry API 6.0.0

getRotation

public void getRotation(Quaternion4f rotation)
Gets the rotation component of this transform in the specified quaternion.

Parameters:
rotation - The quaternion to store the rotation in.
Throws:
NullPointerException - If rotation is null.
Since:
BlackBerry API 6.0.0

getRotationAsAxisAngle

public float getRotationAsAxisAngle(Vector3f axis)
Gets the axis of rotation, and stores the axis of rotation of this transform in the specified Vector3f

Parameters:
axis - The Vector3f to store the axis of rotation.
Returns:
the angle of rotation.
Throws:
NullPointerException - If axis is null.
Since:
BlackBerry API 6.0.0

getTranslation

public void getTranslation(Vector3f translation)
Gets the translation component of this transform in the specified vector.

Parameters:
translation - The vector to store the translation in.
Throws:
NullPointerException - If translation is null.
Since:
BlackBerry API 6.0.0

rotate

public void rotate(Matrix4f rotation)
Rotates this transform's rotation component by the given rotation.

Parameters:
rotation - The rotation to rotate by (as a matrix).
Throws:
NullPointerException - If rotation is null.
Since:
BlackBerry API 6.0.0

rotate

public void rotate(Matrix4f rotation,
                   Transform3D dst)
Rotates this transform's rotation component by the given rotation and stores the result in the given destination transform.

Parameters:
rotation - The rotation to rotate by (as a matrix).
dst - The destination transform.
Throws:
NullPointerException - If rotation or dst is null.
Since:
BlackBerry API 6.0.0

rotate

public void rotate(Quaternion4f rotation)
Rotates this transform's rotation component by the given rotation.

Parameters:
rotation - The rotation to rotate by (as a quaternion).
Throws:
NullPointerException - If rotation is null.
Since:
BlackBerry API 6.0.0

rotate

public void rotate(Quaternion4f rotation,
                   Transform3D dst)
Rotates this transform's rotation component by the given rotation and stores the result in the given destination transform.

Parameters:
rotation - The rotation to rotate by (as a quaternion).
dst - The destination transform.
Throws:
NullPointerException - If rotation, dst is null.
Since:
BlackBerry API 6.0.0

rotate

public void rotate(Vector3f axis,
                   float angle)
Rotates this transform's rotation component by the given rotation (defined as an axis angle rotation).

Parameters:
axis - The axis to rotate about.
angle - The angle to rotate by.
Throws:
NullPointerException - If axis is null.
Since:
BlackBerry API 6.0.0

rotate

public void rotate(Vector3f axis,
                   float angle,
                   Transform3D dst)
Rotates this transform's rotation component by the given rotation (defined as an axis angle rotation) and stores the result in the given destination transform.

Parameters:
axis - The axis to rotate about.
angle - The angle to rotate by.
dst - The destination transform.
Throws:
NullPointerException - If axis, dst is null.
Since:
BlackBerry API 6.0.0

rotateX

public void rotateX(float angle)
Rotates this transform's rotation component by the given angle about the x-axis.

Parameters:
angle - The angle to rotate by about the x-axis.
Since:
BlackBerry API 6.0.0

rotateX

public void rotateX(float angle,
                    Transform3D dst)
Rotates this transform's rotation component by the given angle about the x-axis and stores the result in the given destination transform.

Parameters:
angle - The angle to rotate by about the x-axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

rotateY

public void rotateY(float angle)
Rotates this transform's rotation component by the given angle about the y-axis.

Parameters:
angle - The angle to rotate by about the y-axis.
Since:
BlackBerry API 6.0.0

rotateY

public void rotateY(float angle,
                    Transform3D dst)
Rotates this transform's rotation component by the given angle about the y-axis and stores the result in the given destination transform.

Parameters:
angle - The angle to rotate by about the y-axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

rotateZ

public void rotateZ(float angle)
Rotates this transform's rotation component by the given angle about the z-axis.

Parameters:
angle - The angle to rotate by about the z-axis.
Since:
BlackBerry API 6.0.0

rotateZ

public void rotateZ(float angle,
                    Transform3D dst)
Rotates this transform's rotation component by the given angle about the z-axis and stores the result in the given destination transform.

Parameters:
angle - The angle to rotate by about the z-axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

scale

public void scale(float scale)
Scales this transform's scale component by the given factor along all axes.

Parameters:
scale - The factor to scale by.
Since:
BlackBerry API 6.0.0

scale

public void scale(float scale,
                  Transform3D dst)
Scales this transform's scale component by the given factor along all axes and stores the result in the given destination transform.

Parameters:
scale - The factor to scale by.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

scale

public void scale(float sx,
                  float sy,
                  float sz)
Scales this transform's scale component by the given factors along each axis.

Parameters:
sx - The factor to scale by in the x direction.
sy - The factor to scale by in the y direction.
sz - The factor to scale by in the z direction.
Since:
BlackBerry API 6.0.0

scale

public void scale(float sx,
                  float sy,
                  float sz,
                  Transform3D dst)
Scales this transform's scale component by the given factors along each axis and stores the result in the given destination transform.

Parameters:
sx - The factor to scale by in the x direction.
sy - The factor to scale by in the y direction.
sz - The factor to scale by in the z direction.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

scale

public void scale(Vector3f scale)
Scales this transform's scale component by the given scale vector.

Parameters:
scale - The vector to scale by.
Throws:
NullPointerException - If scale is null.
Since:
BlackBerry API 6.0.0

scale

public void scale(Vector3f scale,
                  Transform3D dst)
Scales this transform's scale component by the given scale vector and stores the result in the given destination transform.

Parameters:
scale - The vector to scale by.
dst - The destination transform.
Throws:
NullPointerException - If scale or dst is null.
Since:
BlackBerry API 6.0.0

scaleX

public void scaleX(float sx)
Scales this transform's scale component by the given scale factor along the x axis.

Parameters:
sx - The scale factor along the x axis.
Since:
BlackBerry API 6.0.0

scaleX

public void scaleX(float sx,
                   Transform3D dst)
Scales this transform's scale component by the given scale factor along the x axis and stores the result in the given destination transform.

Parameters:
sx - The scale factor along the x axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

scaleY

public void scaleY(float sy)
Scales this transform's scale component by the given scale factor along the y axis.

Parameters:
sy - The scale factor along the y axis.
Since:
BlackBerry API 6.0.0

scaleY

public void scaleY(float sy,
                   Transform3D dst)
Scales this transform's scale component by the given scale factor along the y axis and stores the result in the given destination transform.

Parameters:
sy - The scale factor along the y axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

scaleZ

public void scaleZ(float sz)
Scales this transform's scale component by the given scale factor along the z axis.

Parameters:
sz - The scale factor along the z axis.
Since:
BlackBerry API 6.0.0

scaleZ

public void scaleZ(float sz,
                   Transform3D dst)
Scales this transform's scale component by the given scale factor along the z axis and stores the result in the given destination transform.

Parameters:
sz - The scale factor along the z axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

set

public void set(Vector3f scale,
                Matrix4f rotation,
                Vector3f translation)
Sets the transform to the specified values.

Parameters:
scale - The scale vector.
rotation - The rotation matrix.
translation - The translation vector.
Throws:
NullPointerException - If scale, rotation, or translation is null.
Since:
BlackBerry API 6.0.0

set

public void set(Vector3f scale,
                Quaternion4f rotation,
                Vector3f translation)
Sets the transform to the specified values.

Parameters:
scale - The scale vector.
rotation - The rotation quaternion.
translation - The translation vector.
Throws:
NullPointerException - If scale, rotation, or translation is null.
Since:
BlackBerry API 6.0.0

set

public void set(Transform3D transform)
Sets this transform to the specified transform.

Parameters:
transform - The transform to set this transform to.
Throws:
NullPointerException - If transform is null.
Since:
BlackBerry API 6.0.0

setScale

public void setScale(Vector3f scale)
Sets the scale component of this transform to the specified scale vector.

Parameters:
scale - The scale vector.
Throws:
NullPointerException - If scale is null.
Since:
BlackBerry API 6.0.0

setScale

public void setScale(float sx,
                     float sy,
                     float sz)
Sets the scale component of this transform to the specified values.

Parameters:
sx - The scale factor along the x axis.
sy - The scale factor along the y axis.
sz - The scale factor along the z axis.
Since:
BlackBerry API 6.0.0

setScale

public void setScale(float scale)
Sets the scale factor along all axes for this transform to the specified value.

Parameters:
scale - The scale factor along all axes.
Since:
BlackBerry API 6.0.0

setRotation

public void setRotation(Matrix4f rotation)
Sets the rotation component for this transform to the specified values.

Parameters:
rotation - The rotation as a matrix.
Throws:
NullPointerException - If rotation is null.
Since:
BlackBerry API 6.0.0

setRotation

public void setRotation(Quaternion4f rotation)
Sets the rotation component for this transform to the specified values.

Parameters:
rotation - The rotation as a quaternion.
Throws:
NullPointerException - If rotation is null.
Since:
BlackBerry API 6.0.0

setTranslation

public void setTranslation(Vector3f translation)
Sets the translation component for this transform to the specified translation vector.

Parameters:
translation - The translation vector.
Throws:
NullPointerException - If translation is null.
Since:
BlackBerry API 6.0.0

setTranslation

public void setTranslation(float tx,
                           float ty,
                           float tz)
Sets the translation component for this transform to the specified values.

Parameters:
tx - The translation amount in the x direction.
ty - The translation amount in the y direction.
tz - The translation amount in the z direction.
Since:
BlackBerry API 6.0.0

transformBounds

public void transformBounds(Bounds bounds)
Transforms the specified bounds and stores the result in the original bounding object.

Parameters:
bounds - The bounds to transform.
Throws:
NullPointerException - If bounds is null.
Since:
BlackBerry API 6.0.0

transformBounds

public void transformBounds(Bounds bounds,
                            Bounds dst)
Transforms the specified bounds and stores the result in the specified destination bounding object.

Parameters:
bounds - The bounds to transform.
dst - The bounding object to store the result in.
Throws:
IllegalArgumentException - If bounds is not the same type of bounding object as dst.
NullPointerException - If bounds or dst is null.
Since:
BlackBerry API 6.0.0

transformPoint

public void transformPoint(Vector3f point)
Transforms the specified point and stores the result in the original point.

Parameters:
point - The point to transform.
Throws:
NullPointerException - If point is null.
Since:
BlackBerry API 6.0.0

transformPoint

public void transformPoint(Vector3f point,
                           Vector3f dst)
Transforms the specified point and stores the result in the specified destination point.

Parameters:
point - The point to transform.
dst - The point to store the result in.
Throws:
NullPointerException - If point or dst is null.
Since:
BlackBerry API 6.0.0

transformVector

public void transformVector(Vector3f vector)
Transforms the specified vector and stores the result in the original vector.

Parameters:
vector - The vector to transform.
Throws:
NullPointerException - If vector is null.
Since:
BlackBerry API 6.0.0

transformVector

public void transformVector(Vector3f vector,
                            Vector3f dst)
Transforms the specified vector and stores the result in the specified destination vector.

Parameters:
vector - The vector to transform.
dst - The vector to store the result in.
Throws:
NullPointerException - If vector or dst is null.
Since:
BlackBerry API 6.0.0

transformNormal

public void transformNormal(Vector3f normal)
Transforms the specified normal vector and stores the result in the original vector.

Parameters:
normal - The normal vector to transform.
Throws:
NullPointerException - If normal is null.
Since:
BlackBerry API 6.0.0

transformNormal

public void transformNormal(Vector3f normal,
                            Vector3f dst)
Transforms the specified normal vector and stores the result in the specified destination normal vector.

Parameters:
normal - The normal vector to transform.
dst - The normal vector to store the result in.
Throws:
NullPointerException - If normal or dst is null.
Since:
BlackBerry API 6.0.0

transformPlane

public void transformPlane(Plane plane)
Transforms the specified plane and stores the result in the original plane.

Parameters:
plane - The plane to transform.
Throws:
NullPointerException - If plane is null.
Since:
BlackBerry API 6.0.0

transformPlane

public void transformPlane(Plane plane,
                           Plane dst)
Transforms the specified plane and stores the result in the specified destination plane.

Parameters:
plane - The plane to transform.
dst - The plane to store the result in.
Throws:
NullPointerException - If plane or dst is null.
Since:
BlackBerry API 6.0.0

transformRay

public void transformRay(Ray ray)
Transforms the specified ray and stores the result in the original ray.

Parameters:
ray - The ray to transform.
Throws:
NullPointerException - If ray is null.
Since:
BlackBerry API 6.0.0

transformRay

public void transformRay(Ray ray,
                         Ray dst)
Transforms the specified ray and stores the result in the specified destination ray.

Parameters:
ray - The ray to transform.
dst - The ray to store the result in.
Throws:
NullPointerException - If ray or dst is null.
Since:
BlackBerry API 6.0.0

translate

public void translate(float tx,
                      float ty,
                      float tz)
Translates this transform's translation component by the given values along each axis.

Parameters:
tx - The amount to translate along the x axis.
ty - The amount to translate along the y axis.
tz - The amount to translate along the z axis.
Since:
BlackBerry API 6.0.0

translate

public void translate(float tx,
                      float ty,
                      float tz,
                      Transform3D dst)
Translates this transform's translation component by the given values along each axis and stores the result in the given destination transform.

Parameters:
tx - The amount to translate along the x axis.
ty - The amount to translate along the y axis.
tz - The amount to translate along the z axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

translate

public void translate(Vector3f translation)
Translates this transform's translation component by the given translation vector.

Parameters:
translation - The amount to translate.
Throws:
NullPointerException - If translation is null.
Since:
BlackBerry API 6.0.0

translate

public void translate(Vector3f translation,
                      Transform3D dst)
Translates this transform's translation component by the given translation vector and stores the result in the given destination transform.

Parameters:
translation - The amount to translate.
dst - The destination transform.
Throws:
NullPointerException - If translation or dst is null.
Since:
BlackBerry API 6.0.0

translateX

public void translateX(float tx)
Translates this transform's translation component by the given value along the x axis.

Parameters:
tx - The amount to translate along the x axis.
Since:
BlackBerry API 6.0.0

translateX

public void translateX(float tx,
                       Transform3D dst)
Translates this transform's translation component by the given value along the x axis and stores the result in the given destination transform.

Parameters:
tx - The amount to translate along the x axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

translateY

public void translateY(float ty)
Translates this transform's translation component by the given value along the y axis.

Parameters:
ty - The amount to translate along the y axis.
Since:
BlackBerry API 6.0.0

translateY

public void translateY(float ty,
                       Transform3D dst)
Translates this transform's translation component by the given value along the y axis and stores the result in the given destination transform.

Parameters:
ty - The amount to translate along the y axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

translateZ

public void translateZ(float tz)
Translates this transform's translation component by the given value along the z axis.

Parameters:
tz - The amount to translate along the z axis.
Since:
BlackBerry API 6.0.0

translateZ

public void translateZ(float tz,
                       Transform3D dst)
Translates this transform's translation component by the given value along the z axis and stores the result in the given destination transform.

Parameters:
tz - The amount to translate along the z axis.
dst - The destination transform.
Throws:
NullPointerException - If dst is null.
Since:
BlackBerry API 6.0.0

equals

public boolean equals(Object obj)
Determines if the specified object is of type Transform3D and all of its elements are equal to the elements of this transform.

Overrides:
equals in class Object
Parameters:
obj - The object to compare.
Returns:
true if this transform is equal to obj; false otherwise.
Throws:
NullPointerException - If obj is null.
See Also:
Boolean.hashCode(), Hashtable
Since:
BlackBerry API 6.0.0

equals

public boolean equals(Transform3D transform)
Returns true if all elements of the specified transform are equal to the elements of this transform.

Parameters:
transform - The transform to compare.
Returns:
true if this transform is equal to transform; false otherwise.
Throws:
NullPointerException - If transform is null.
Since:
BlackBerry API 6.0.0

hashCode

public int hashCode()
Returns a hash code based on the elements of this transform.

Overrides:
hashCode in class Object
Returns:
The hash code for this transform.
See Also:
Object.equals(java.lang.Object), Hashtable
Since:
BlackBerry API 6.0.0

toString

public String toString()
Returns a String representation of this transform. The String representation has the format (scale, rotation, translation).

Overrides:
toString in class Object
Returns:
A String representation of this transform.
Since:
BlackBerry API 6.0.0

getAnimationValue

public void getAnimationValue(int property,
                              AnimationValue value)
Description copied from interface: Animatable

Gets the value or values of the specified property.

Used by the Animation framework to get the values of the specified property on the Animatable. The implementer must set the value of the specified target property in the AnimationValue parameter.

Specified by:
getAnimationValue in interface Animatable
Parameters:
property - The property to get the current value or values of.
value - An AnimationValue used to store the returned property values.
See Also:
Animatable.getAnimationValue(int,AnimationValue)
Since:
BlackBerry API 6.0.0

setAnimationValue

public void setAnimationValue(int property,
                              AnimationValue value)
Description copied from interface: Animatable

Sets the value or values of the specified property.

Used by the Animation framework to update the value or values of the specified target property on the Animatable with the currently calculated animation value. The implementer must update the current value or values of the given target property with the values in the AnimationValue parameter.

Specified by:
setAnimationValue in interface Animatable
Parameters:
property - The property to set the current value or values of.
value - The AnimationValue used to specify the value or values to set.
See Also:
Animatable.setAnimationValue(int,AnimationValue)
Since:
BlackBerry API 6.0.0

getAnimationPropertyComponentCount

public int getAnimationPropertyComponentCount(int property)
Description copied from interface: Animatable

Gets the number of components of the specified property.

The implementer must define the component size of every animatable property defined for the Animatable.

Specified by:
getAnimationPropertyComponentCount in interface Animatable
Parameters:
property - The property to retrieve the component count for.
Returns:
The number of components comprising the specified property.
See Also:
Animatable.getAnimationPropertyComponentCount(int)
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.