Class pmr.euclid.Transform3
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.euclid.Transform3
java.lang.Object
|
+----pmr.euclid.Status
|
+----pmr.euclid.RealMatrix
|
+----pmr.euclid.RealSquareMatrix
|
+----pmr.euclid.Transform3
- public class Transform3
- extends RealSquareMatrix
Transform3 - 3-D transformation matrix class
Transform3 represents a transformation matrix for 3-D objects.
Its actual form may be implementation-dependent, but we have started
with 4x4 matrices. The following transformations will be supported
as the class is developed:
TRFORM3_NULL no transformation allowed
ROT_ORIG rotation about the origin
ROT_TRANS rotation and translation
ROT_TRANS_SCALE rotation, translation and single scale factor
ROT_TRANS_AXIAL_SCALE rotation, translation + 3 axial scale factors
ROT_TRANS_SCALE_PERSP rotation, translation, scale, perspective
TRFORM3_ANY any matrix at all - user beware!
The basic stuff is all there - the user will do best to look at
examples.
- Author:
- (C) P. Murray-Rust, 1996
-
ROT_ORIG
-
-
ROT_TRANS
-
-
ROT_TRANS_AXIAL_SCALE
-
-
ROT_TRANS_SCALE
-
-
ROT_TRANS_SCALE_PERSP
-
-
TRFORM3_ANY
-
-
TRFORM3_NULL
-
-
Transform3()
- default is a unit matrix
-
Transform3(Angle, Angle, Angle)
- from rotation about the three orthogonal axes (X then Y then Z)
-
Transform3(Choice3, Angle)
- from rotation about an axis (use (Choice3.X), etc.
-
Transform3(double[])
- Formed by feeding in an existing array to a cols*cols matrix.
-
Transform3(int)
- This gives a default unit matrix of type t (default ROT_ORIG).
-
Transform3(Line3, Angle)
- Rotation about a line
-
Transform3(RealSquareMatrix)
- from a 3x3 or 4x4 matrix
-
Transform3(RealSquareMatrix, Vector3)
- from a 3x3 rotation matrix and a translation vector
-
Transform3(Transform3)
- copy constructors - assumed to be an OK matrix
-
Transform3(Transform3, Point3)
- from rotation about a point, given a matrix
-
Transform3(Vector3)
- identity matrix with translation component
-
Transform3(Vector3, Angle)
- from rotation about a vector
-
Transform3(Vector3, Vector3)
- rotation of one vector onto another
-
Transform3(Vector3, Vector3, Vector3)
- from 3 vector components - NOT checked
-
checkMatrix()
- get new matrix type
-
clone(Transform3)
- clone
-
concatenate(Transform3)
- concatenate
-
equals(Transform3)
-
-
getAxisAndAngle(Vector3, Angle)
- returns chirality
-
getCentreOfRotation()
- get centre of rotation
-
getRotationMatrix()
- get Unitary matrix (i.e.
-
getTransformationType()
- get transformation type
-
getTranslation()
- get translation component only
-
main(String[])
- tests Transform3 routines
-
setTransformationType(int)
- set transformation type
TRFORM3_NULL
public final static int TRFORM3_NULL
ROT_ORIG
public final static int ROT_ORIG
ROT_TRANS
public final static int ROT_TRANS
ROT_TRANS_SCALE
public final static int ROT_TRANS_SCALE
ROT_TRANS_AXIAL_SCALE
public final static int ROT_TRANS_AXIAL_SCALE
ROT_TRANS_SCALE_PERSP
public final static int ROT_TRANS_SCALE_PERSP
TRFORM3_ANY
public final static int TRFORM3_ANY
Transform3
public Transform3()
- default is a unit matrix
Transform3
public Transform3(int t)
- This gives a default unit matrix of type t (default ROT_ORIG).
Transform3
public Transform3(Vector3 v)
- identity matrix with translation component
Transform3
public Transform3(Choice3 axis,
Angle rot)
- from rotation about an axis (use (Choice3.X), etc.
Transform3
public Transform3(Angle xrot,
Angle yrot,
Angle zrot)
- from rotation about the three orthogonal axes (X then Y then Z)
Transform3
public Transform3(Transform3 t,
Point3 p)
- from rotation about a point, given a matrix
Transform3
public Transform3(Vector3 v,
Angle a)
- from rotation about a vector
Transform3
public Transform3(Line3 l,
Angle a)
- Rotation about a line
Transform3
public Transform3(Vector3 v1,
Vector3 v2) throws ZeroLengthVectorException
- rotation of one vector onto another
- Throws: ZeroLengthVectorException
- v1 or v2 is zero length
Transform3
public Transform3(Vector3 v1,
Vector3 v2,
Vector3 v3)
- from 3 vector components - NOT checked
Transform3
public Transform3(double array[]) throws InvalidArgumentException
- Formed by feeding in an existing array to a cols*cols matrix.
array is or type m00, m01, m02, m03, m13 ...
- Throws: InvalidArgumentException
- array must have 16 elements
Transform3
public Transform3(Transform3 m)
- copy constructors - assumed to be an OK matrix
Transform3
public Transform3(RealSquareMatrix m) throws UnequalLengthArraysException
- from a 3x3 or 4x4 matrix
- Throws: UnequalLengthArraysException
- m must be 3*3 or 4*4
Transform3
public Transform3(RealSquareMatrix m,
Vector3 v) throws UnequalLengthArraysException
- from a 3x3 rotation matrix and a translation vector
- Throws: UnequalLengthArraysException
- m must be 3*3
clone
public Transform3 clone(Transform3 m)
- clone
equals
public boolean equals(Transform3 m)
concatenate
public Transform3 concatenate(Transform3 m2)
- concatenate
setTransformationType
public int setTransformationType(int option)
- set transformation type
getTransformationType
public int getTransformationType()
- get transformation type
checkMatrix
public int checkMatrix()
- get new matrix type
getAxisAndAngle
public int getAxisAndAngle(Vector3 axis,
Angle ang)
- returns chirality
getTranslation
public Vector3 getTranslation()
- get translation component only
getCentreOfRotation
public Point3 getCentreOfRotation()
- get centre of rotation
getRotationMatrix
public RealSquareMatrix getRotationMatrix()
- get Unitary matrix (i.e. eliminate scales and translation)
main
public static void main(String args[])
- tests Transform3 routines
All Packages Class Hierarchy This Package Previous Next Index