|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.struc.CTransform3D
public class CTransform3D
3D transformation matrix.
Field Summary | |
---|---|
double |
m00
The m00 element of the matrix. |
double |
m01
The m01 element of the matrix. |
double |
m02
The m02 element of the matrix. |
double |
m03
The m03 element of the matrix. |
double |
m10
The m10 element of the matrix. |
double |
m11
The m11 element of the matrix. |
double |
m12
The m12 element of the matrix. |
double |
m13
The m13 element of the matrix. |
double |
m20
The m20 element of the matrix. |
double |
m21
The m21 element of the matrix. |
double |
m22
The m22 element of the matrix. |
double |
m23
The m23 element of the matrix. |
double |
m30
The m30 element of the matrix. |
double |
m31
The m31 element of the matrix. |
double |
m32
The m32 element of the matrix. |
double |
m33
The m33 element of the matrix. |
Constructor Summary | |
---|---|
CTransform3D()
Constructs an identity transformation. |
|
CTransform3D(CTransform3D t)
Copy constructor. |
Method Summary | |
---|---|
double |
determinant()
Computes the determinant of the matrix. |
double |
determinant2D()
Computes the determinant of the 2D matrix. |
double[] |
getEuler()
Gets the Euler angles from the rotation transformation. |
double |
getScale()
Gets the scale factor. |
void |
invert()
Inverts the matrix. |
boolean |
is3d()
Tests whether the transformation is 3D. |
void |
mul(CTransform3D b)
Multiplies by another matrix. |
void |
read16doubles(java.io.ObjectInput in)
Reads the 4x4 matrix components as double precision floating point numbers. |
void |
read16floats(java.io.ObjectInput in)
Reads the 4x4 matrix components as single precision floating point numbers. |
void |
readExternal(java.io.ObjectInput in)
Deserializes a transformation matrix. |
void |
set(CTransform3D t)
Copy. |
void |
setEuler(double psi,
double theta,
double phi)
Sets the rotational component using the Euler angles provided. |
void |
setIdentity()
Makes identity transformation. |
void |
setRotation(double nx,
double ny,
double nz,
double phi)
Sets the rotation components. |
void |
setRotationCenter(DPoint3 o)
Sets the rotation center. |
void |
setScale(double scale)
Sets the scale factor. |
void |
setTranslation(double x0,
double y0,
double z0)
Sets the translation components ( m03 , m13 and m23 ). |
void |
setTranslation(DPoint3 p)
Sets the translation components ( m03 , m13 and m23 ). |
void |
setZero()
Sets all components to zero. |
java.lang.String |
toString()
Gets a string representation of the matrix. |
void |
transform(DPoint3 p)
Transforms a point. |
void |
write16doubles(java.io.ObjectOutput out)
Writes the 4x4 matrix components as double precision floating point numbers. |
void |
write16floats(java.io.ObjectOutput out)
Writes the 4x4 matrix components as single precision floating point numbers. |
void |
writeExternal(java.io.ObjectOutput out)
Serializes a transformation matrix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public transient double m00
public transient double m01
public transient double m02
public transient double m03
public transient double m10
public transient double m11
public transient double m12
public transient double m13
public transient double m20
public transient double m21
public transient double m22
public transient double m23
public transient double m30
public transient double m31
public transient double m32
public transient double m33
Constructor Detail |
---|
public CTransform3D(CTransform3D t)
t
- the transformation to copypublic CTransform3D()
Method Detail |
---|
public void set(CTransform3D t)
t
- target transformationpublic final void setZero()
public final void setIdentity()
public final double[] getEuler()
public final void setEuler(double psi, double theta, double phi)
psi
- rotation angle about X axistheta
- rotation angle about Y axisphi
- rotation angle about Z axispublic final double getScale()
public final void setScale(double scale)
scale
- the scalepublic final double determinant()
public final double determinant2D()
public final void setRotation(double nx, double ny, double nz, double phi)
nx
- normal vector xny
- normal vector ynz
- normal vector zphi
- anglepublic final void setRotationCenter(DPoint3 o)
setRotation
(order is important!) if a point other than the origin is meant to be
the rotation center. It sets the translation vector in the fourth
column (m03
, m13
and m23
)
in such a way that point o
will be the center of rotation
specified by the upper left 3x3 components.
o
- the centerpublic final void setTranslation(DPoint3 p)
m03
, m13
and m23
).
p
- the translationpublic final void setTranslation(double x0, double y0, double z0)
m03
, m13
and m23
).
x0
- x translationy0
- y translationz0
- z translationpublic final void transform(DPoint3 p)
p
- the pointpublic final void mul(CTransform3D b)
b
- the other matrixpublic boolean is3d()
public final void invert()
public java.lang.String toString()
toString
in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- the object output stream
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
readExternal
in interface java.io.Externalizable
in
- the object input stream
java.io.IOException
public final void write16doubles(java.io.ObjectOutput out) throws java.io.IOException
out
- the object output stream
java.io.IOException
public final void read16doubles(java.io.ObjectInput in) throws java.io.IOException
in
- the object input stream
java.io.IOException
public final void write16floats(java.io.ObjectOutput out) throws java.io.IOException
out
- the object output stream
java.io.IOException
public final void read16floats(java.io.ObjectInput in) throws java.io.IOException
in
- the object input stream
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |