|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--jumbo.euclid.Status
|
+--jumbo.euclid.RealMatrix
|
+--jumbo.euclid.RealSquareMatrix
|
+--jumbo.euclid.Transform2
Transform2 - 2-D transformation matrix class
Transform2 represents a transformation matrix for 2-D objects. Its actual form may be implementation-dependent, but we have started with 3x3 matrices. The following transformations will be supported as the class is developed:
TRFORM2_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.
NOTE; this has been hacked in a hurry from Transform3. Many of the internal routines are grossly overcomplicated. I'll clean it up some time.
| Field Summary | |
static int |
ROT_ORIG
|
static int |
ROT_TRANS
|
static int |
ROT_TRANS_AXIAL_SCALE
|
static int |
ROT_TRANS_SCALE
|
static int |
ROT_TRANS_SCALE_PERSP
|
static int |
TRFORM3_ANY
|
static int |
TRFORM3_NULL
|
| Fields inherited from class jumbo.euclid.RealMatrix |
cols,
flmat,
rows |
| Constructor Summary | |
Transform2()
default is a unit matrix |
|
Transform2(Angle zrot)
rotation about z- axis |
|
Transform2(double[] array)
Formed by feeding in an existing array to a cols*cols matrix. |
|
Transform2(int t)
This gives a default unit matrix of type t (default ROT_ORIG). |
|
Transform2(Real2 v1,
Real2 v2)
from 2 vector components - NOT checked for validity |
|
Transform2(RealSquareMatrix m)
from a 2x2 or 3x3 matrix |
|
Transform2(RealSquareMatrix m,
Vector2 v)
from a 2x2 rotation matrix and a translation vector |
|
Transform2(Transform2 m)
copy constructors - assumed to be an OK matrix |
|
Transform2(Transform2 t,
Real2 p)
from rotation about a point, given a matrix NOT CHECKED |
|
Transform2(Vector2 v)
identity matrix with translation component |
|
Transform2(Vector2 v1,
Vector2 v2)
rotation of one vector onto another |
|
| Method Summary | |
int |
checkMatrix()
get new matrix type |
Transform2 |
clone(Transform2 m)
clone |
Transform2 |
concatenate(Transform2 m2)
concatenate |
boolean |
equals(Transform2 m)
|
static Transform2 |
flipAboutVector(Real2 r)
get Transformation to mirror ('flip') across an axis NOT YET CHECKED |
Angle |
getAngleOfRotation()
interpret current matrix as rotation about axis NOT YET CHECKED; only worsk for orthornormal matrices |
Point3 |
getCentreOfRotation()
get centre of rotation |
RealSquareMatrix |
getRotationMatrix()
get Unitary matrix (i.e. |
int |
getTransformationType()
get transformation type |
Real2 |
getTranslation()
get translation component only |
static void |
main(java.lang.String[] args)
tests Transform2 routines |
int |
setTransformationType(int option)
set transformation type |
java.lang.String |
toString()
output matrix - very crude... |
| Methods inherited from class jumbo.euclid.RealSquareMatrix |
copyLowerToUpper,
copyUpperToLower,
determinant,
diagonal,
diagonaliseAndReturnRank,
equals,
getInverse,
isImproperRotation,
isLowerTriangular,
isOrthogonal,
isOrthonormal,
isSymmetric,
isUnit,
isUnitary,
isUpperTriangular,
lowerTriangle,
multiply,
orthogonalise,
orthonormalise,
outerProduct,
plus,
shallowCopy,
subtract,
trace,
transpose |
| Methods inherited from class jumbo.euclid.Status |
NYI |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final int TRFORM3_NULL
public static final int ROT_ORIG
public static final int ROT_TRANS
public static final int ROT_TRANS_SCALE
public static final int ROT_TRANS_AXIAL_SCALE
public static final int ROT_TRANS_SCALE_PERSP
public static final int TRFORM3_ANY
| Constructor Detail |
public Transform2()
public Transform2(int t)
public Transform2(Vector2 v)
public Transform2(Angle zrot)
public Transform2(Transform2 t,
Real2 p)
public Transform2(Vector2 v1,
Vector2 v2)
throws ZeroVectorException
public Transform2(Real2 v1,
Real2 v2)
public Transform2(double[] array)
throws BadArgumentException
public Transform2(Transform2 m)
public Transform2(RealSquareMatrix m)
throws UnequalArraysException
public Transform2(RealSquareMatrix m,
Vector2 v)
throws UnequalArraysException
| Method Detail |
public Transform2 clone(Transform2 m)
public boolean equals(Transform2 m)
public Transform2 concatenate(Transform2 m2)
public int setTransformationType(int option)
public int getTransformationType()
public int checkMatrix()
public Angle getAngleOfRotation()
public static Transform2 flipAboutVector(Real2 r)
throws ZeroVectorException
public Real2 getTranslation()
public Point3 getCentreOfRotation()
throws UnimplementedException
public RealSquareMatrix getRotationMatrix()
public java.lang.String toString()
public static void main(java.lang.String[] args)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||