math.geom3d.transform
Class AffineTransform3D

java.lang.Object
  extended by math.geom3d.transform.AffineTransform3D
All Implemented Interfaces:
Bijection3D, Transform3D

public class AffineTransform3D
extends java.lang.Object
implements Bijection3D

Author:
dlegland

Constructor Summary
AffineTransform3D()
          Creates a new affine transform3D set to identity
AffineTransform3D(double[] coefs)
           
AffineTransform3D(double xx, double yx, double zx, double tx, double xy, double yy, double zy, double ty, double xz, double yz, double zz, double tz)
           
 
Method Summary
 double[] coefficients()
          Returns the affine coefficients of the transform.
static AffineTransform3D createRotationOx(double theta)
           
static AffineTransform3D createRotationOy(double theta)
           
static AffineTransform3D createRotationOz(double theta)
           
static AffineTransform3D createScaling(double s)
           
static AffineTransform3D createScaling(double sx, double sy, double sz)
           
static AffineTransform3D createTranslation(double x, double y, double z)
           
static AffineTransform3D createTranslation(Vector3D vec)
           
 boolean equals(java.lang.Object obj)
          Compares two transforms.
 AffineTransform3D inverse()
          Computes the inverse affine transform.
 boolean isIdentity()
           
 void preConcatenate(AffineTransform3D trans)
          Combine this transform with another AffineTransform.
 void transform(AffineTransform3D trans)
          Combine this transform with another AffineTransform.
 Point3D transformPoint(Point3D src)
           
 Point3D[] transformPoints(Point3D[] src, Point3D[] dst)
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AffineTransform3D

public AffineTransform3D()
Creates a new affine transform3D set to identity


AffineTransform3D

public AffineTransform3D(double[] coefs)

AffineTransform3D

public AffineTransform3D(double xx,
                         double yx,
                         double zx,
                         double tx,
                         double xy,
                         double yy,
                         double zy,
                         double ty,
                         double xz,
                         double yz,
                         double zz,
                         double tz)
Method Detail

createTranslation

public static final AffineTransform3D createTranslation(Vector3D vec)

createTranslation

public static final AffineTransform3D createTranslation(double x,
                                                        double y,
                                                        double z)

createRotationOx

public static final AffineTransform3D createRotationOx(double theta)

createRotationOy

public static final AffineTransform3D createRotationOy(double theta)

createRotationOz

public static final AffineTransform3D createRotationOz(double theta)

createScaling

public static final AffineTransform3D createScaling(double s)

createScaling

public static final AffineTransform3D createScaling(double sx,
                                                    double sy,
                                                    double sz)

isIdentity

public boolean isIdentity()

coefficients

public double[] coefficients()
Returns the affine coefficients of the transform. Result is an array of 12 double.


inverse

public AffineTransform3D inverse()
Computes the inverse affine transform.

Specified by:
inverse in interface Bijection3D

transform

public void transform(AffineTransform3D trans)
Combine this transform with another AffineTransform.


preConcatenate

public void preConcatenate(AffineTransform3D trans)
Combine this transform with another AffineTransform.


transformPoints

public Point3D[] transformPoints(Point3D[] src,
                                 Point3D[] dst)
Specified by:
transformPoints in interface Transform3D

transformPoint

public Point3D transformPoint(Point3D src)
Specified by:
transformPoint in interface Transform3D

equals

public boolean equals(java.lang.Object obj)
Compares two transforms. Returns true if all inner fields are equal up to the precision given by Shape3D.ACCURACY.

Overrides:
equals in class java.lang.Object