|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthep.wired.util.Matrix2D
public class Matrix2D
A 2x3 matrix for projection of 2D space to 2D space.
Field Summary |
---|
Fields inherited from interface hep.wired.util.XYZindices |
---|
X, Y, Z |
Fields inherited from interface hep.wired.util.UVWindices |
---|
U, V, W |
Constructor Summary | |
---|---|
Matrix2D()
Creates an identity matrix. |
|
Matrix2D(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
Creates a matrix with given parameters. |
Method Summary | |
---|---|
Object |
clone()
|
void |
concatenate(Matrix2D m)
Concatenates this matrix with m, such that M' = M * m. |
Matrix2D |
createInverse()
|
boolean |
equals(Object obj)
|
double |
getDeterminant()
|
double |
getScaleX()
|
double |
getScaleY()
|
double |
getShearX()
|
double |
getShearY()
|
double |
getTranslateX()
|
double |
getTranslateY()
|
int |
hashCode()
|
void |
modelTranslate(double tx,
double ty)
Model-Translates by tx and ty. |
void |
preConcatenate(Matrix2D m)
Pre-concatenates this matrix with m, such that M' = m * M. |
void |
restore(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl)
|
void |
rotate(double theta)
Rotates theta radians. |
void |
save(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl)
|
void |
scale(double sx,
double sy)
Scales by sx and sy. |
void |
shear(double shx,
double shy)
Shears by shx and shy. |
String |
toString()
|
double[][] |
transform(double[][] xyz,
int n,
boolean delta)
Transforms xyz by this matrix for n points, using translation if delta is false. |
double[] |
transform(double[] xyz,
boolean delta)
Transforms xyz by this matrix, using translation if delta is false. |
void |
translate(double tx,
double ty)
Translates by tx and ty. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Matrix2D()
public Matrix2D(double m00, double m10, double m01, double m11, double m02, double m12)
m00
- matrix param 00m10
- matrix param 10m01
- matrix param 01m11
- matrix param 11m02
- matrix param 02m12
- matrix param 12Method Detail |
---|
public Object clone()
clone
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public double getScaleX()
public double getScaleY()
public double getShearX()
public double getShearY()
public double getTranslateX()
public double getTranslateY()
public double getDeterminant()
public Matrix2D createInverse() throws NoninvertibleTransformException
NoninvertibleTransformException
- if matrix cannot be invertedpublic void concatenate(Matrix2D m)
m
- post matrixpublic void preConcatenate(Matrix2D m)
m
- pre matrixpublic void rotate(double theta)
[ cos(theta) -sin(theta) 0 ] [ sin(theta) cos(theta) 0 ] [ 0 0 1 ]
theta
- anglepublic void scale(double sx, double sy)
[ sx 0 0 ] [ 0 sy 0 ] [ 0 0 1 ]
sx
- scale factor in xsy
- scale factor in ypublic void shear(double shx, double shy)
[ 1 shx 0 ] [ shy 1 0 ] [ 0 0 1 ]
shx
- shear factor in xshy
- shear factor in ypublic void translate(double tx, double ty)
[ 1 0 tx ] [ 0 1 ty ] [ 0 0 1 ]
tx
- translation in xty
- translation in ypublic void modelTranslate(double tx, double ty)
[ 1 0 tx ] [ 0 1 ty ] [ 0 0 1 ]
tx
- translation in xty
- translation in ypublic double[] transform(double[] xyz, boolean delta)
xyz
- input xyzdelta
- use translation
public double[][] transform(double[][] xyz, int n, boolean delta)
xyz
- input xyzn
- number of pointsdelta
- use translation
public String toString()
toString
in class Object
public void save(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
save
in interface org.freehep.xml.io.XMLIO
public void restore(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
restore
in interface org.freehep.xml.io.XMLIO
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |