net.sf.j3d.threeD.raytracer.surfaceUI
Class TransformMatrixUI

java.lang.Object
  extended by net.sf.j3d.threeD.raytracer.util.TransformMatrix
      extended by net.sf.j3d.threeD.raytracer.surfaceUI.TransformMatrixUI

public class TransformMatrixUI
extends TransformMatrix

A TransformMatrixUI object stores extra data about a TransformMatrix object such as its type for use in an application with a user interface.


Field Summary
static int rotateXTransformation
          Code for a rotate-X transformation.
static int rotateYTransformation
          Code for a rotate-Y transformation.
static int rotateZTransformation
          Code for a rotate-Z transformation.
static int scaleTransformation
          Code for a scale transformation.
static int translationTransformation
          Code for a translation transformation.
 
Fields inherited from class net.sf.j3d.threeD.raytracer.util.TransformMatrix
identity, TRANSFORM_AS_LOCATION, TRANSFORM_AS_NORMAL, TRANSFORM_AS_OFFSET
 
Constructor Summary
TransformMatrixUI()
          Constructs a new TransformMatrixUI object with no type.
TransformMatrixUI(int type, double value)
          Constructs a new TransformMatrixUI object of the specified type.
TransformMatrixUI(int type, double x, double y, double z)
          Constructs a new TransformMatrixUI object of the specified type.
 
Method Summary
 int getType()
          Returns the type of this TransformMatrixUI object.
 double getX()
          Returns the X coefficient of translation, scaling, or rotation depending the type of this TransformMatrixUI object.
 double getY()
          Returns the Y coefficient of translation, scaling, or rotation depending the type of this TransformMatrixUI object.
 double getZ()
          Returns the Z coefficient of translation, scaling, or rotation depending the type of this TransformMatrixUI object.
 void setType(int type)
          Sets the type of this TransformMatrixUI object to the type represented by the specified integer code.
 void setX(double x)
          Sets the X coefficient of translation, scaling, or rotation depending on the type of this TransformMatrixUI object.
 void setY(double y)
          Sets the Y coefficient of translation, scaling, or rotation depending on the type of this TransformMatrixUI object.
 void setZ(double z)
          Sets the Z coefficient of translation, scaling, or rotation depending on the type of this TransformMatrixUI object.
 String toString()
          Returns a String representation of this TransformMatrixUI object.
 
Methods inherited from class net.sf.j3d.threeD.raytracer.util.TransformMatrix
adjoint, calculateInverse, createRotateXMatrix, createRotateYMatrix, createRotateZMatrix, createScaleMatrix, createTranslationMatrix, determinant, getInverse, getInverseTransposeMatrix, getMatrix, multiply, multiply, setMatrix, toUpperTriangle, transform, transform, transformAsLocation, transformAsNormal, transformAsOffset, transpose
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

translationTransformation

public static final int translationTransformation
Code for a translation transformation.

See Also:
Constant Field Values

scaleTransformation

public static final int scaleTransformation
Code for a scale transformation.

See Also:
Constant Field Values

rotateXTransformation

public static final int rotateXTransformation
Code for a rotate-X transformation.

See Also:
Constant Field Values

rotateYTransformation

public static final int rotateYTransformation
Code for a rotate-Y transformation.

See Also:
Constant Field Values

rotateZTransformation

public static final int rotateZTransformation
Code for a rotate-Z transformation.

See Also:
Constant Field Values
Constructor Detail

TransformMatrixUI

public TransformMatrixUI()
Constructs a new TransformMatrixUI object with no type.


TransformMatrixUI

public TransformMatrixUI(int type,
                         double value)
Constructs a new TransformMatrixUI object of the specified type. If this type is translationTransformation or scaleTransformation, the specified value is used for all 3 coefficients. If the type is rotateXTransformation, rotateYTransformation, or rotateZTransformation the specified value is used as the rotation coefficient (in radians).


TransformMatrixUI

public TransformMatrixUI(int type,
                         double x,
                         double y,
                         double z)
Constructs a new TransformMatrixUI object of the specified type. If this type is translationTransformation or scaleTransformation, the specified values are used as the 3 coefficients. If the type is rotateXTransformation, rotateYTransformation, or rotateZTransformation the value coresponding in name to the axis of rotation is used as the rotation coefficient (in radians) and the other values are ignored.

Method Detail

setX

public void setX(double x)
Sets the X coefficient of translation, scaling, or rotation depending on the type of this TransformMatrixUI object. Calling this method will cause this TransformMatrixUI object to be initialized again.


setY

public void setY(double y)
Sets the Y coefficient of translation, scaling, or rotation depending on the type of this TransformMatrixUI object. Calling this method will cause this TransformMatrixUI object to be initialized again.


setZ

public void setZ(double z)
Sets the Z coefficient of translation, scaling, or rotation depending on the type of this TransformMatrixUI object. Calling this method will cause this TransformMatrixUI object to be initialized again.


getX

public double getX()
Returns the X coefficient of translation, scaling, or rotation depending the type of this TransformMatrixUI object.


getY

public double getY()
Returns the Y coefficient of translation, scaling, or rotation depending the type of this TransformMatrixUI object.


getZ

public double getZ()
Returns the Z coefficient of translation, scaling, or rotation depending the type of this TransformMatrixUI object.


setType

public void setType(int type)
Sets the type of this TransformMatrixUI object to the type represented by the specified integer code. Calling this method will cause this TransformMatrixUI object to be initialized again.


getType

public int getType()
Returns the type of this TransformMatrixUI object.


toString

public String toString()
Returns a String representation of this TransformMatrixUI object.

Overrides:
toString in class TransformMatrix
Returns:
A String representation of the data stored by this TransformMatrix object.