BenQ Mobile

javax.microedition.m3g
Class Transform

java.lang.Object
  extended byjavax.microedition.m3g.Transform

public class Transform
extends java.lang.Object

A generic 4x4 floating point matrix, representing a transformation. By default, all methods dealing with Transform objects operate on arbitrary 4x4 matrices. Any exceptions to this rule are documented explicitly at the method level.


Constructor Summary
Transform()
          Constructs a new Transform object and initializes it to the 4x4 identity matrix.
Transform(Transform transform)
          Constructs a new Transform object and initializes it by copying in the contents of the given Transform.
 
Method Summary
 void get(float[] matrix)
          Retrieves the contents of this transformation as a 16-element float array.
 void invert()
          Inverts this matrix, if possible.
 void postMultiply(Transform transform)
          Multiplies this transformation from the right by the given transformation.
 void postRotate(float angle, float x, float y, float z)
          Multiplies this transformation from the right by the given rotation matrix, specified in axis-angle form.
 void postRotateQuat(float x, float y, float z, float w)
          Multiplies this transformation from the right by the given rotation matrix, specified in quaternion form.
 void postScale(float sx, float sy, float sz)
          Multiplies this transformation from the right by the given scale matrix
 void postTranslate(float tx, float ty, float tz)
          Multiplies this transformation from the right by the given translation matrix.
 void set(float[] matrix)
          Sets this transformation by copying from the given 16-element float array.
 void set(Transform transform)
          Sets this transformation by copying the contents of the given Transform
 void setIdentity()
          Replaces this transformation with the 4x4 identity matrix.
 void transform(float[] vectors)
          Multiplies the given array of 4D vectors with this matrix.
 void transform(VertexArray in, float[] out, boolean W)
          Multiplies the elements of the given VertexArray with this matrix, storing the transformed values in a float array.
 void transpose()
          Transposes this matrix.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transform

public Transform()
Constructs a new Transform object and initializes it to the 4x4 identity matrix.


Transform

public Transform(Transform transform)
Constructs a new Transform object and initializes it by copying in the contents of the given Transform.

Method Detail

setIdentity

public void setIdentity()
Replaces this transformation with the 4x4 identity matrix.


set

public void set(Transform transform)
Sets this transformation by copying the contents of the given Transform


set

public void set(float[] matrix)
Sets this transformation by copying from the given 16-element float array.


get

public void get(float[] matrix)
Retrieves the contents of this transformation as a 16-element float array.


invert

public void invert()
Inverts this matrix, if possible.


transpose

public void transpose()
Transposes this matrix.


postMultiply

public void postMultiply(Transform transform)
Multiplies this transformation from the right by the given transformation.


postScale

public void postScale(float sx,
                      float sy,
                      float sz)
Multiplies this transformation from the right by the given scale matrix


postRotate

public void postRotate(float angle,
                       float x,
                       float y,
                       float z)
Multiplies this transformation from the right by the given rotation matrix, specified in axis-angle form.


postRotateQuat

public void postRotateQuat(float x,
                           float y,
                           float z,
                           float w)
Multiplies this transformation from the right by the given rotation matrix, specified in quaternion form.


postTranslate

public void postTranslate(float tx,
                          float ty,
                          float tz)
Multiplies this transformation from the right by the given translation matrix.


transform

public void transform(VertexArray in,
                      float[] out,
                      boolean W)
Multiplies the elements of the given VertexArray with this matrix, storing the transformed values in a float array.


transform

public void transform(float[] vectors)
Multiplies the given array of 4D vectors with this matrix.


BenQ Mobile

Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner.
All Rights Reserved.
BenQ Corp. is a trademark licensee of Siemens AG.


For further information about Mobility Toolkit (MTK) visit our Developer Portal.