|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xyz.AbstractXyzTransform
com.partnersoft.geometry.xyz.XyzAffineTransform
public class XyzAffineTransform
A vector matrix affine transform.
See the wikipedia page on Affine Transformation for a full discussion.
Putting matrices aside, here is the math:
x1 = x0*m00 + y0*m01 + z0*m02 + m03 y1 = x0*m10 + y0*m11 + z0*m12 + m13 z1 = x0*m20 + y0*m21 + z0*m22 + m23
Copyright 2007 Partner Software, Inc.
| Constructor Summary | |
|---|---|
XyzAffineTransform(double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23)
Tedious full constructor. |
|
XyzAffineTransform(XyAffineTransform xyAffineTransform)
|
|
| Method Summary | |
|---|---|
static XyzAffineTransform |
forIdentity()
Returns the identity transform. |
static XyzAffineTransform |
forRotationAroundXAxis(XyRotation rotation)
Returns a transformation matrix that will rotate by the given amount. |
static XyzAffineTransform |
forRotationAroundYAxis(XyRotation rotation)
Returns a transformation matrix that will rotate by the given amount. |
static XyzAffineTransform |
forRotationAroundZAxis(XyRotation rotation)
Returns a transformation matrix that will rotate by the given amount. |
static XyzAffineTransform |
forScaling(double scale)
Returns a transformation matrix that will scale by the given amount in both dimensions. |
static XyzAffineTransform |
forScaling(double m00,
double m11,
double scaleZ)
Returns a transformation matrix that will scale by the given amount for each dimension. |
static XyzAffineTransform |
forTranslation(double deltaX,
double deltaY,
double deltaZ)
Returns a transformation matrix that will translate by the given amount. |
double |
getDeterminant()
|
double |
getScaleX()
The x coordinate scaling element (m00) of the transformation matrix. |
double |
getScaleY()
The y coordinate scaling element (m11) of the transformation matrix. |
double |
getScaleZ()
The z coordinate scaling element (m22) of the transformation matrix. |
double |
getTranslateX()
The x coordinate translation element (m03) of the transformation matrix. |
double |
getTranslateY()
The y coordinate translation element (m13) of the transformation matrix. |
double |
getTranslateZ()
The z coordinate translation element (m23) of the transformation matrix. |
boolean |
isIdentity()
True if this is an identity transform. |
XyzAffineTransform |
multipliedBy(XyzAffineTransform nother)
Does a matrix multiplication and returns the result. |
XyzAffineTransform |
rotatedAroundXAxisBy(XyRotation rotation)
Rotates the transformation matrix by the given amount and returns the result. |
XyzAffineTransform |
rotatedAroundYAxisBy(XyRotation rotation)
Rotates the transformation matrix by the given amount and returns the result. |
XyzAffineTransform |
rotatedAroundZAxisBy(XyRotation rotation)
Rotates the transformation matrix by the given amount and returns the result. |
XyzAffineTransform |
scaledBy(double scale)
Scales the transformation matrix by the given amount and returns the result. |
XyzAffineTransform |
scaledBy(double scaleX,
double scaleY,
double scaleZ)
Scales the transformation matrix by the given amount and returns the result. |
protected XyzPoint |
transformImp(XyzPoint point)
Subclasses must implement this to do the actual work of transformation. |
XyzAffineTransform |
translatedBy(double deltaX,
double deltaY,
double deltaZ)
Translates the transformation matrix by the given amount and returns the result. |
| Methods inherited from class com.partnersoft.geometry.xyz.AbstractXyzTransform |
|---|
transform, transform, transform |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XyzAffineTransform(double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23)
public XyzAffineTransform(XyAffineTransform xyAffineTransform)
| Method Detail |
|---|
public static XyzAffineTransform forIdentity()
public static XyzAffineTransform forRotationAroundXAxis(XyRotation rotation)
public static XyzAffineTransform forRotationAroundYAxis(XyRotation rotation)
public static XyzAffineTransform forRotationAroundZAxis(XyRotation rotation)
public static XyzAffineTransform forTranslation(double deltaX,
double deltaY,
double deltaZ)
public static XyzAffineTransform forScaling(double scale)
public static XyzAffineTransform forScaling(double m00,
double m11,
double scaleZ)
public double getDeterminant()
public XyzAffineTransform rotatedAroundXAxisBy(XyRotation rotation)
public XyzAffineTransform rotatedAroundYAxisBy(XyRotation rotation)
public XyzAffineTransform rotatedAroundZAxisBy(XyRotation rotation)
public XyzAffineTransform translatedBy(double deltaX,
double deltaY,
double deltaZ)
public XyzAffineTransform scaledBy(double scaleX,
double scaleY,
double scaleZ)
public XyzAffineTransform scaledBy(double scale)
public XyzAffineTransform multipliedBy(XyzAffineTransform nother)
protected XyzPoint transformImp(XyzPoint point)
AbstractXyzTransform#transform(XyPoint), except that you
do NOT have to check for identity - that will be done automatically.
transformImp in class AbstractXyzTransformpublic boolean isIdentity()
isIdentity in interface XyzTransformpublic double getScaleX()
public double getScaleY()
public double getScaleZ()
public double getTranslateX()
public double getTranslateY()
public double getTranslateZ()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||