wt.epm.structure
Class Transform

java.lang.Object
  extended by wt.epm.structure.Transform
All Implemented Interfaces:
Externalizable, Serializable, NetFactor, ObjectMappable

public class Transform
extends Object
implements ObjectMappable, Externalizable

Transform does not support any mathematical operations. Instead, it provides methods to convert back and forth to Matrix4d. Matrix4d is class is in the Java3D vecmath package that supports all kinds of mathematical operations. Interfacing is done through the standard Matrix4d methods such as getRotationScale and get ( forTranslation vector). This implies that any Matrix4d sent or gotten must be constructed in the proper format. The format is row-major, thus the translation vector is stored in the third column of the matrix. The units of the translation vector must be meters.

Use the newTransform static factory method(s), not the Transform constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
protected  void initialize(javax.vecmath.Matrix4d transform)
          Supports initialization, following construction of an instance.
protected  void initialize(Transform transform)
          Supports initialization, following construction of an instance.
static Transform newTransform(javax.vecmath.Matrix4d transform)
          Given a Java 3D matrix, creates a new Transform.
static Transform newTransform(Transform transform)
          Creates a copy of the given Transform.
 void setTransform(javax.vecmath.Matrix4d transform)
          Sets the Transform to the given Java3D matrix.
 javax.vecmath.Matrix4d toMatrix4d()
          Returns a Java 3D matrix for this Transform.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newTransform

public static Transform newTransform(javax.vecmath.Matrix4d transform)
                              throws WTException
Given a Java 3D matrix, creates a new Transform.

Supported API: true

Parameters:
transform -
Returns:
Transform
Throws:
WTException

initialize

protected void initialize(javax.vecmath.Matrix4d transform)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
transform -
Throws:
WTException

newTransform

public static Transform newTransform(Transform transform)
                              throws WTException
Creates a copy of the given Transform.

Supported API: true

Parameters:
transform -
Returns:
Transform
Throws:
WTException

initialize

protected void initialize(Transform transform)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
transform -
Throws:
WTException

toMatrix4d

public javax.vecmath.Matrix4d toMatrix4d()
Returns a Java 3D matrix for this Transform.

Supported API: true

Returns:
Matrix4d

setTransform

public void setTransform(javax.vecmath.Matrix4d transform)
Sets the Transform to the given Java3D matrix.

Supported API: true

Parameters:
transform -