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

Variable Index

 o ROT_ORIG
 o ROT_TRANS
 o ROT_TRANS_AXIAL_SCALE
 o ROT_TRANS_SCALE
 o ROT_TRANS_SCALE_PERSP
 o TRFORM3_ANY
 o TRFORM3_NULL

Constructor Index

 o Transform3()
default is a unit matrix
 o Transform3(Angle, Angle, Angle)
from rotation about the three orthogonal axes (X then Y then Z)
 o Transform3(Choice3, Angle)
from rotation about an axis (use (Choice3.X), etc.
 o Transform3(double[])
Formed by feeding in an existing array to a cols*cols matrix.
 o Transform3(int)
This gives a default unit matrix of type t (default ROT_ORIG).
 o Transform3(Line3, Angle)
Rotation about a line
 o Transform3(RealSquareMatrix)
from a 3x3 or 4x4 matrix
 o Transform3(RealSquareMatrix, Vector3)
from a 3x3 rotation matrix and a translation vector
 o Transform3(Transform3)
copy constructors - assumed to be an OK matrix
 o Transform3(Transform3, Point3)
from rotation about a point, given a matrix
 o Transform3(Vector3)
identity matrix with translation component
 o Transform3(Vector3, Angle)
from rotation about a vector
 o Transform3(Vector3, Vector3)
rotation of one vector onto another
 o Transform3(Vector3, Vector3, Vector3)
from 3 vector components - NOT checked

Method Index

 o checkMatrix()
get new matrix type
 o clone(Transform3)
clone
 o concatenate(Transform3)
concatenate
 o equals(Transform3)
 o getAxisAndAngle(Vector3, Angle)
returns chirality
 o getCentreOfRotation()
get centre of rotation
 o getRotationMatrix()
get Unitary matrix (i.e.
 o getTransformationType()
get transformation type
 o getTranslation()
get translation component only
 o main(String[])
tests Transform3 routines
 o setTransformationType(int)
set transformation type

Variables

 o TRFORM3_NULL
  public final static int TRFORM3_NULL
 o ROT_ORIG
  public final static int ROT_ORIG
 o ROT_TRANS
  public final static int ROT_TRANS
 o ROT_TRANS_SCALE
  public final static int ROT_TRANS_SCALE
 o ROT_TRANS_AXIAL_SCALE
  public final static int ROT_TRANS_AXIAL_SCALE
 o ROT_TRANS_SCALE_PERSP
  public final static int ROT_TRANS_SCALE_PERSP
 o TRFORM3_ANY
  public final static int TRFORM3_ANY

Constructors

 o Transform3
  public Transform3()
default is a unit matrix
 o Transform3
  public Transform3(int t)
This gives a default unit matrix of type t (default ROT_ORIG).
 o Transform3
  public Transform3(Vector3 v)
identity matrix with translation component
 o Transform3
  public Transform3(Choice3 axis,
                    Angle rot)
from rotation about an axis (use (Choice3.X), etc.
 o Transform3
  public Transform3(Angle xrot,
                    Angle yrot,
                    Angle zrot)
from rotation about the three orthogonal axes (X then Y then Z)
 o Transform3
  public Transform3(Transform3 t,
                    Point3 p)
from rotation about a point, given a matrix
 o Transform3
  public Transform3(Vector3 v,
                    Angle a)
from rotation about a vector
 o Transform3
  public Transform3(Line3 l,
                    Angle a)
Rotation about a line
 o Transform3
  public Transform3(Vector3 v1,
                    Vector3 v2) throws ZeroLengthVectorException
rotation of one vector onto another
Throws: ZeroLengthVectorException
v1 or v2 is zero length
 o Transform3
  public Transform3(Vector3 v1,
                    Vector3 v2,
                    Vector3 v3)
from 3 vector components - NOT checked
 o 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
 o Transform3
  public Transform3(Transform3 m)
copy constructors - assumed to be an OK matrix
 o Transform3
  public Transform3(RealSquareMatrix m) throws UnequalLengthArraysException
from a 3x3 or 4x4 matrix
Throws: UnequalLengthArraysException
m must be 3*3 or 4*4
 o 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

Methods

 o clone
  public Transform3 clone(Transform3 m)
clone
 o equals
  public boolean equals(Transform3 m)
 o concatenate
  public Transform3 concatenate(Transform3 m2)
concatenate
 o setTransformationType
  public int setTransformationType(int option)
set transformation type
 o getTransformationType
  public int getTransformationType()
get transformation type
 o checkMatrix
  public int checkMatrix()
get new matrix type
 o getAxisAndAngle
  public int getAxisAndAngle(Vector3 axis,
                             Angle ang)
returns chirality
 o getTranslation
  public Vector3 getTranslation()
get translation component only
 o getCentreOfRotation
  public Point3 getCentreOfRotation()
get centre of rotation
 o getRotationMatrix
  public RealSquareMatrix getRotationMatrix()
get Unitary matrix (i.e. eliminate scales and translation)
 o main
  public static void main(String args[])
tests Transform3 routines

All Packages  Class Hierarchy  This Package  Previous  Next  Index