net.sourceforge.arbaro.transformation
Class Transformation

java.lang.Object
  extended by net.sourceforge.arbaro.transformation.Transformation

public final class Transformation
extends java.lang.Object

A transformation class - a matrix for rotations and a vector for translations

Author:
Wolfram Diestel

Field Summary
static int T
           
static int X
           
static int Y
           
static int Z
           
 
Constructor Summary
Transformation()
           
Transformation(Matrix m, Vector v)
           
 
Method Summary
 Vector apply(Vector v)
          Applies the transformation to a vector
 Vector getT()
          Returns the translation vector of the transformation.
 Vector getX()
          Returns the X-column of the rotation matrix.
 Vector getY()
          Returns the Y-column of the rotation matrix.
 Vector getZ()
          Returns the Z-column of the rotation matrix.
 Transformation inverse()
           
 Matrix matrix()
           
 Transformation prod(Transformation T1)
           
 Transformation rotaxis(double angle, Vector axis)
           
 Transformation rotaxisz(double delta, double rho)
           
 Transformation rotx(double angle)
           
 Transformation rotxz(double delta, double rho)
           
 Transformation roty(double angle)
           
 Transformation rotz(double angle)
           
 java.lang.String toString()
           
 Transformation translate(Vector v)
           
 Vector vector()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

X

public static final int X
See Also:
Constant Field Values

Y

public static final int Y
See Also:
Constant Field Values

Z

public static final int Z
See Also:
Constant Field Values

T

public static final int T
See Also:
Constant Field Values
Constructor Detail

Transformation

public Transformation()

Transformation

public Transformation(Matrix m,
                      Vector v)
Method Detail

matrix

public Matrix matrix()

vector

public Vector vector()

prod

public Transformation prod(Transformation T1)
Parameters:
T1 - the transformation to multiply with
Returns:
the product of two transformations, .i.e. the tranformation resulting of the two transformations applied one after the other

apply

public Vector apply(Vector v)
Applies the transformation to a vector

Parameters:
v -
Returns:
resulting vector

getX

public Vector getX()
Returns the X-column of the rotation matrix. This is the projection on to the x-axis

Returns:
X-column of the rotation matrix

getY

public Vector getY()
Returns the Y-column of the rotation matrix. This is the projection on to the y-axis

Returns:
Y-column of the rotation matrix

getZ

public Vector getZ()
Returns the Z-column of the rotation matrix. This is the projection on to the z-axis

Returns:
Z-column of the rotation matrix

getT

public Vector getT()
Returns the translation vector of the transformation. (for convenience, same as vector())

Returns:
translation vector of the transformation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

rotz

public Transformation rotz(double angle)

roty

public Transformation roty(double angle)

rotx

public Transformation rotx(double angle)

rotxz

public Transformation rotxz(double delta,
                            double rho)

rotaxisz

public Transformation rotaxisz(double delta,
                               double rho)

translate

public Transformation translate(Vector v)

rotaxis

public Transformation rotaxis(double angle,
                              Vector axis)

inverse

public Transformation inverse()