ij3d.geom
Class GeomTransform3D

java.lang.Object
  extended by ij3d.geom.GeomTransform3D

public class GeomTransform3D
extends java.lang.Object

Description of the Class

Author:
cedric

Constructor Summary
GeomTransform3D()
          Constructor for the Transform3D object create an identity transform
GeomTransform3D(double[][] transfmatrix)
          Constructor for the Transform3D object create an identity transform
GeomTransform3D(double tx, double ty, double tz, double rx, double ry, double rz)
          Constructor for the GeomTranform3D object
GeomTransform3D(TabUtil transform)
          Constructor for the GeomTransform3D object
 
Method Summary
 GeomTransform3D addTransform(GeomTransform3D transfo)
          Adds a feature to the Transform attribute of the GeomTransform3D object
 GeomTransform3D addTransform(TabUtil transfo)
          Adds a feature to the Transform attribute of the GeomTransform3D object
static int GaussElim(double[] a, double[] x)
          Taken from VolumeJ Gaussian elimination method with backward substitution to solve a system of linear equations.
 double[][] getMatrix()
          Gets the matrix attribute of the GeomTransform3D object
 double getValue(int row, int column)
          Gets the value of the matrix of the Transform3D object at position [row][column]
 Vector3D getVectorTransformed(Vector3D P, Vector3D C)
          Apply the transform to a point described by a vector
 GeomTransform3D invert()
          Description of the Method
 boolean isIdentity()
          Gets the identity attribute of the GeomTransform3D object
 GeomTransform3D reset()
          Description of the Method
 GeomTransform3D setRotation(double angleRadianXAxis, double angleRadianYAxis, double angleRadianZAxis)
          Sets the rotation attribute of the Transform3D object
 GeomTransform3D setRotation(Vector3D axis, double angle)
           
 GeomTransform3D setRotationDegrees(double angleDegreesXAxis, double angleDegreesYAxis, double angleDegreesZAxis)
          Sets the rotation attribute of the Transform3D object
 GeomTransform3D setRotationXAxis(double angleRadian)
          Sets the rotation on the X Axis for the Transform
 GeomTransform3D setRotationYAxis(double angleRadian)
          Sets the rotation on the Y Axis for the Transform
 GeomTransform3D setRotationZAxis(double angleRadian)
          Sets the rotationZAxis attribute of the Transform3D object
 GeomTransform3D setTransform(double tx, double ty, double tz, double rx, double ry, double rz)
          Sets the transform attribute of the GeomTransform3D object
 GeomTransform3D setTranslation(double x, double y, double z)
          Sets the translation attribute of the Transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeomTransform3D

public GeomTransform3D()
Constructor for the Transform3D object create an identity transform


GeomTransform3D

public GeomTransform3D(double[][] transfmatrix)
Constructor for the Transform3D object create an identity transform

Parameters:
transfmatrix - Description of the Parameter

GeomTransform3D

public GeomTransform3D(TabUtil transform)
Constructor for the GeomTransform3D object

Parameters:
transform - Description of the Parameter

GeomTransform3D

public GeomTransform3D(double tx,
                       double ty,
                       double tz,
                       double rx,
                       double ry,
                       double rz)
Constructor for the GeomTranform3D object

Parameters:
tx - Description of the Parameter
ty - Description of the Parameter
tz - Description of the Parameter
rx - Description of the Parameter
ry - Description of the Parameter
rz - Description of the Parameter
Method Detail

reset

public GeomTransform3D reset()
Description of the Method

Returns:
Description of the Return Value

setTransform

public GeomTransform3D setTransform(double tx,
                                    double ty,
                                    double tz,
                                    double rx,
                                    double ry,
                                    double rz)
Sets the transform attribute of the GeomTransform3D object

Parameters:
tx - The new transform value
ty - The new transform value
tz - The new transform value
rx - The new transform value
ry - The new transform value
rz - The new transform value
Returns:
Description of the Return Value

setTranslation

public GeomTransform3D setTranslation(double x,
                                      double y,
                                      double z)
Sets the translation attribute of the Transform

Parameters:
x - The new translation value on x axis
y - The new translation value on y axis
z - The new translation value on z axis
Returns:
Description of the Return Value

setRotationXAxis

public GeomTransform3D setRotationXAxis(double angleRadian)
Sets the rotation on the X Axis for the Transform

Parameters:
angleRadian - The angle of rotation in radian
Returns:
Description of the Return Value

setRotationYAxis

public GeomTransform3D setRotationYAxis(double angleRadian)
Sets the rotation on the Y Axis for the Transform

Parameters:
angleRadian - The angle of rotation in radian
Returns:
Description of the Return Value

setRotationZAxis

public GeomTransform3D setRotationZAxis(double angleRadian)
Sets the rotationZAxis attribute of the Transform3D object

Parameters:
angleRadian - The angle of rotation in radian
Returns:
Description of the Return Value

setRotation

public GeomTransform3D setRotation(double angleRadianXAxis,
                                   double angleRadianYAxis,
                                   double angleRadianZAxis)
Sets the rotation attribute of the Transform3D object

Parameters:
angleRadianXAxis - The angle of rotation in radian on the X axis
angleRadianYAxis - The angle of rotation in radian on the Y axis
angleRadianZAxis - The angle of rotation in radian on the Z axis
Returns:
Description of the Return Value

setRotation

public GeomTransform3D setRotation(Vector3D axis,
                                   double angle)
Parameters:
axis -
angle -
Returns:

setRotationDegrees

public GeomTransform3D setRotationDegrees(double angleDegreesXAxis,
                                          double angleDegreesYAxis,
                                          double angleDegreesZAxis)
Sets the rotation attribute of the Transform3D object

Parameters:
angleDegreesXAxis - The new rotationDegrees value
angleDegreesYAxis - The new rotationDegrees value
angleDegreesZAxis - The new rotationDegrees value
Returns:
Description of the Return Value

addTransform

public GeomTransform3D addTransform(GeomTransform3D transfo)
Adds a feature to the Transform attribute of the GeomTransform3D object

Parameters:
transfo - The feature to be added to the Transform attribute
Returns:
Description of the Return Value

addTransform

public GeomTransform3D addTransform(TabUtil transfo)
Adds a feature to the Transform attribute of the GeomTransform3D object

Parameters:
transfo - The feature to be added to the Transform attribute
Returns:
Description of the Return Value

getValue

public double getValue(int row,
                       int column)
Gets the value of the matrix of the Transform3D object at position [row][column]

Parameters:
row - row number of the matrix
column - column number of the matrix
Returns:
The value in the matrix

getMatrix

public double[][] getMatrix()
Gets the matrix attribute of the GeomTransform3D object

Returns:
The matrix value

invert

public GeomTransform3D invert()
Description of the Method

Returns:
Description of the Return Value

isIdentity

public boolean isIdentity()
Gets the identity attribute of the GeomTransform3D object

Returns:
The identity value

getVectorTransformed

public Vector3D getVectorTransformed(Vector3D P,
                                     Vector3D C)
Apply the transform to a point described by a vector

Parameters:
P - Original point
C - Center for rotation
Returns:
The transformed point by the transform, described by a vector

GaussElim

public static int GaussElim(double[] a,
                            double[] x)
Taken from VolumeJ Gaussian elimination method with backward substitution to solve a system of linear equations. E1: a11 x1 + a12 x2 + ... a1n xn = a1,n+1 E2: a21 x1 + a22 x2 + ... a2n xn = a2,n+1 . . . En: an1 x1 + an2 x2 + ... ann xn = an,n+1

Parameters:
a - Description of the Parameter
x - Description of the Parameter
Returns:
Description of the Return Value