com.vodafone.v10.graphics.j3d
Class AffineTrans

java.lang.Object
  |
  +--com.vodafone.v10.graphics.j3d.AffineTrans

public class AffineTrans
extends java.lang.Object

The affine transform class.


Field Summary
 int m00
          The first element of the first row.
 int m01
          The second element of the first row.
 int m02
          The third element of the first row.
 int m03
          The fourth element of the first row.
 int m10
          The first element of the second row.
 int m11
          The second element of the second row.
 int m12
          The third element of the second row.
 int m13
          The fourth element of the second row.
 int m20
          The first element of the third row.
 int m21
          The second element of the third row.
 int m22
          The third element of the third row.
 int m23
          The fourth element of the third row.
 
Constructor Summary
AffineTrans()
          AffineTrans constructor
AffineTrans(int[][] m)
          AffineTrans constructor
 
Method Summary
 void multiply(AffineTrans t)
          Performs multiplication Multiplies this by t and sets the result in itself.
 void multiply(AffineTrans t1, AffineTrans t2)
          Perform multiplication Multiplies t1 by t2 and sets the result in itself.
 void rotationV(Vector3D vec, int a)
          Rotates on an axis.
 void rotationX(int a)
          Rotates on X-axis from Y-axis toward Z-axis.
 void rotationY(int a)
          Rotates on Y-axis from Z-axis toward X-axis.
 void rotationZ(int a)
          Rotates on Z-axis from X-axis toward Y-axis.
 void set(int[][] m)
          Sets new array data.
 void setViewTrans(Vector3D position, Vector3D look, Vector3D up)
          Sets the transform to view coordinates.
 Vector3D transPoint(Vector3D src)
          Transforms a point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m00

public int m00
The first element of the first row.

m01

public int m01
The second element of the first row.

m02

public int m02
The third element of the first row.

m03

public int m03
The fourth element of the first row.

m10

public int m10
The first element of the second row.

m11

public int m11
The second element of the second row.

m12

public int m12
The third element of the second row.

m13

public int m13
The fourth element of the second row.

m20

public int m20
The first element of the third row.

m21

public int m21
The second element of the third row.

m22

public int m22
The third element of the third row.

m23

public int m23
The fourth element of the third row.
Constructor Detail

AffineTrans

public AffineTrans()
AffineTrans constructor

AffineTrans

public AffineTrans(int[][] m)
AffineTrans constructor
Parameters:
m - A 3-row, 4-column array
Throws:
IllegalArgumentException - if not a 3-row, 4-column array.
NullPointerException - if the designated array is null.
Method Detail

set

public void set(int[][] m)
Sets new array data.
Parameters:
m - A 3-row, 4-column array
Throws:
IllegalArgumentException - if not a 3-row, 4-column array.
NullPointerException - if the designated array is null.

transPoint

public Vector3D transPoint(Vector3D src)
Transforms a point.
Parameters:
src - The original data
Returns:
Vector3D - The result
Throws:
NullPointerException - if src is null.
IllegalStateException - if called during sprite execution.

multiply

public void multiply(AffineTrans t)
Performs multiplication Multiplies this by t and sets the result in itself.
Parameters:
t - Multiplicand
Throws:
NullPointerException - if t is null.
IllegalStateException - if called during sprite execution.

multiply

public void multiply(AffineTrans t1,
                     AffineTrans t2)
Perform multiplication Multiplies t1 by t2 and sets the result in itself.
Parameters:
t1 - Multiplicand
t2 - Multiplicand
Throws:
NullPointerException - if t1 or t2 is null.
IllegalStateException - if called during sprite execution.

rotationX

public void rotationX(int a)
Rotates on X-axis from Y-axis toward Z-axis.
Parameters:
a - Angle (4096 segments)
Throws:
IllegalStateException - if called during sprite execution.

rotationY

public void rotationY(int a)
Rotates on Y-axis from Z-axis toward X-axis.
Parameters:
a - Angle (4096 segments)
Throws:
IllegalStateException - if called during sprite execution.

rotationZ

public void rotationZ(int a)
Rotates on Z-axis from X-axis toward Y-axis.
Parameters:
a - Angle (4096 segments)
Throws:
IllegalStateException - if called during sprite execution.

rotationV

public void rotationV(Vector3D vec,
                      int a)
Rotates on an axis. Assuming rotation is on the Z-axis, rotates from X-axis toward Y-axis.
Parameters:
vec - Rotational axis
a - Angle (4096 segments)
Throws:
IllegalStateException - if called during sprite execution.
NullPointerException - if vec is null.

setViewTrans

public void setViewTrans(Vector3D position,
                         Vector3D look,
                         Vector3D up)
Sets the transform to view coordinates.
Parameters:
position - View position
look - View direction
up - Upward direction
Throws:
NullPointerException - if any of position, look, or up is null.
IllegalArgumentException - if look or up is 0 vector, or if look and up are parallel to each other
IllegalStateException - if called during sprite execution.


Copyright 2002,2003 Aplix Corporation. All rights reserved. Aplix Confidential and Restricted.