math.geom3d.transform
Class AffineTransform3D
- java.lang.Object
-
- math.geom3d.transform.AffineTransform3D
-
- All Implemented Interfaces:
- Bijection3D, Transform3D
public class AffineTransform3D extends java.lang.Object implements Bijection3D
-
-
Constructor Summary
Constructors Constructor and Description AffineTransform3D()Creates a new affine transform3D set to identityAffineTransform3D(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]coefficients()Returns the affine coefficients of the transform.static AffineTransform3DcreateRotationOx(double theta)static AffineTransform3DcreateRotationOy(double theta)static AffineTransform3DcreateRotationOz(double theta)static AffineTransform3DcreateScaling(double s)static AffineTransform3DcreateScaling(double sx, double sy, double sz)static AffineTransform3DcreateTranslation(double x, double y, double z)static AffineTransform3DcreateTranslation(Vector3D vec)booleanequals(java.lang.Object obj)Compares two transforms.AffineTransform3Dinverse()Computes the inverse affine transform.booleanisIdentity()voidpreConcatenate(AffineTransform3D trans)Combines this transform with another AffineTransform.voidtransform(AffineTransform3D trans)Combines this transform with another AffineTransform.Point3DtransformPoint(Point3D src)Transforms the input point.Point3D[]transformPoints(Point3D[] src, Point3D[] dst)Transforms the input point array, stores the result in the pre-allocated array, and returns a pointer to the result array.
-
-
-
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:
inversein interfaceBijection3D
-
transform
public void transform(AffineTransform3D trans)
Combines this transform with another AffineTransform.
-
preConcatenate
public void preConcatenate(AffineTransform3D trans)
Combines this transform with another AffineTransform.
-
transformPoints
public Point3D[] transformPoints(Point3D[] src, Point3D[] dst)
Transforms the input point array, stores the result in the pre-allocated array, and returns a pointer to the result array. A new array is created ifresis null or has length smaller than of src.- Specified by:
transformPointsin interfaceTransform3D
-
transformPoint
public Point3D transformPoint(Point3D src)
Transforms the input point.- Specified by:
transformPointin interfaceTransform3D
-
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:
equalsin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG