Class AffineTransform
java.lang.Object
com.sk89q.worldedit.math.transform.AffineTransform
- All Implemented Interfaces:
Transform
An affine transform.
This class is from the JavaGeom project, which is licensed under LGPL v2.1.
-
Constructor Summary
ConstructorDescriptionCreates a new affine transform3D set to the identity.AffineTransform
(double[] coefs) AffineTransform
(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
Modifier and TypeMethodDescriptionReturns the result of applying the function to the input.double[]
Returns the affine coefficients of the transform.combine
(AffineTransform other) Create a newTransform
that combines this transform with another.concatenate
(AffineTransform that) Returns the affine transform created by applying first the affine transform given bythat
, then this affine transform.inverse()
Computes the inverse affine transform.boolean
Returns if this affine transform represents a horizontal flip.boolean
Return whether this transform is an identity.boolean
Returns if this affine transform represents a vertical flip.Return the affine transform created by applying first this affine transform, then the affine transform given bythat
.rotateX
(double theta) rotateY
(double theta) rotateZ
(double theta) scale
(double s) scale
(double sx, double sy, double sz) toString()
translate
(double x, double y, double z) translate
(BlockVector3 vec)
-
Constructor Details
-
AffineTransform
public AffineTransform()Creates a new affine transform3D set to the identity. -
AffineTransform
public AffineTransform(double[] coefs) -
AffineTransform
public AffineTransform(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 Details
-
isIdentity
public boolean isIdentity()Description copied from interface:Transform
Return whether this transform is an identity.If it is not known, then
false
must be returned.- Specified by:
isIdentity
in interfaceTransform
- Returns:
- true if identity
-
coefficients
public double[] coefficients()Returns the affine coefficients of the transform. Result is an array of 12 double. -
inverse
Computes the inverse affine transform. -
concatenate
Returns the affine transform created by applying first the affine transform given bythat
, then this affine transform.- Parameters:
that
- the transform to apply first- Returns:
- the composition this * that
-
preConcatenate
Return the affine transform created by applying first this affine transform, then the affine transform given bythat
.- Parameters:
that
- the transform to apply in a second step- Returns:
- the composition that * this
-
translate
-
translate
-
translate
-
rotateX
-
rotateY
-
rotateZ
-
scale
-
scale
-
scale
-
apply
Description copied from interface:Transform
Returns the result of applying the function to the input. -
combine
-
combine
Description copied from interface:Transform
Create a newTransform
that combines this transform with another. -
isHorizontalFlip
public boolean isHorizontalFlip()Returns if this affine transform represents a horizontal flip. -
isVerticalFlip
public boolean isVerticalFlip()Returns if this affine transform represents a vertical flip. -
toString
-