Represents an affine transformation matrix that is decomposable into translation, rotation / reflection, and uniform scaling.
struct
|
AffineTransform
|
implements
|
IEquatable<AffineTransform>
|
The orthonormal matrix that represents the rotation / reflection component of the transform.
public
readonly
field
|
Rotation
|
||
type
|
Mat3D
|
The uniform scale factor of the transform.
public
readonly
field
|
Scaling
|
||
type
|
float64
|
The translation component of the transform.
public
readonly
field
|
Translation
|
||
type
|
Vec3D
|
The identity transform.
public
static
readonly
field
|
Identity
|
||
type
|
AffineTransform
|
Creates a new instance of AffineTransform.
public
constructor
|
AffineTransform
(Vec3D translation)
|
||
params
|
translation
|
The translation component of the affine transform. |
Creates a new instance of AffineTransform.
public
constructor
|
AffineTransform
(Mat3D rotation)
|
||
params
|
rotation
|
The affine matrix that represents the rotation component of the affine transform. |
Creates a new instance of AffineTransform.
public
constructor
|
AffineTransform
(float64 scaling)
|
||
params
|
scaling
|
The uniform scale factor of the affine transform. |
Creates a new instance of AffineTransform.
public
constructor
|
AffineTransform
(Vec3D translation,
Mat3D rotation)
|
||
params
|
translation
|
The translation component of the affine transform. | |
rotation
|
The matrix that represents the rotation / reflection component of the affine transform. |
Creates a new instance of AffineTransform.
public
constructor
|
AffineTransform
(Vec3D translation,
float64 scaling)
|
||
params
|
translation
|
The translation component of the affine transform. | |
scaling
|
The uniform scale factor of the affine transform. |
Creates a new instance of AffineTransform.
public
constructor
|
AffineTransform
(Mat3D rotation,
float64 scaling)
|
||
params
|
rotation
|
The matrix that represents the rotation / reflection component of the affine transform. | |
scaling
|
The uniform scale factor of the affine transform. |
Creates a new instance of AffineTransform.
public
constructor
|
AffineTransform
(Vec3D translation,
Mat3D rotation,
float64 scaling)
|
||
params
|
translation
|
The translation component of the affine transform. | |
rotation
|
The matrix that represents the rotation / reflection component of the affine transform. | ||
scaling
|
The uniform scale factor of the affine transform. |
Creates a new instance of AffineTransform.
[Pure]
|
||||
public
static
method
|
FromMatrix
(Mat4D matrix)
|
|||
type
|
AffineTransform
|
|||
params
|
matrix
|
The matrix for which to create an affine transform. | ||
returns
|
The affine transform. |
Appends the given affine transform to this one.
[Pure]
|
||||
public
method
|
Append
(AffineTransform transform)
|
|||
type
|
AffineTransform
|
|||
params
|
transform
|
The affine transform to append. | ||
returns
|
The resulting affine transform, which applies this affine transform first and the given transform afterwards. This is opposite to matrix multiplication. |
Compares this object with the given one.
[Pure]
|
||||
public
method
|
Equals
(AffineTransform other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
Checks if this transform and the given one are similar but necessarily equal.
[Pure]
|
||||
public
method
|
EqualsAlmost
(AffineTransform other)
|
|||
type
|
bool
|
|||
params
|
other
|
The other transform. | ||
returns
|
true
if
both
transforms
are
similar,
false
if
they
are
not.
|
See also:
Maths.SimilarMultiplies the scaling component of this affine transform with the given factor.
[Pure]
|
||||
public
method
|
Scale
(float64 factor)
|
|||
type
|
AffineTransform
|
|||
params
|
factor
|
The scale factor to apply. | ||
returns
|
The resulting affine transform. |
Converts this affine transform into a matrix.
[Pure]
|
||||
public
method
|
ToMatrix
(bool inverse = false)
|
|||
type
|
Mat4D
|
|||
params
|
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
||
returns
|
The matrix. |
Transforms the given axis-aligned bounding box.
[Pure]
|
||||
public
method
|
TransformBox
(Box3D box,
bool inverse = false)
|
|||
type
|
Box3D
|
|||
params
|
box
|
The axis-aligned bounding box. | ||
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
|||
returns
|
The transformed axis-aligned bounding box. |
Transforms the given point.
[Pure]
|
||||
public
method
|
TransformPoint
(Vec3D point,
bool inverse = false)
|
|||
type
|
Vec3D
|
|||
params
|
point
|
The point. | ||
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
|||
returns
|
The transformed point. |
Transforms the given point.
[Pure]
|
||||
public
method
|
TransformPoint
(float64 x,
float64 y,
float64 z,
bool inverse = false)
|
|||
type
|
Vec3D
|
|||
params
|
x
|
X-coordinate of the point. | ||
y
|
Y-coordinate of the point. | |||
z
|
Z-coordinate of the point. | |||
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
|||
returns
|
The transformed point. |
Transforms the given ray.
[Pure]
|
||||
public
method
|
TransformRay
(Ray ray,
bool inverse = false)
|
|||
type
|
Ray
|
|||
params
|
ray
|
The ray. | ||
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
|||
returns
|
The transformed ray. |
Transforms the given scalar.
[Pure]
|
||||
public
method
|
TransformScalar
(float64 v,
bool inverse = false)
|
|||
type
|
float64
|
|||
params
|
v
|
The scalar value. | ||
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
|||
returns
|
The transformed scalar. |
Transforms the given bounding sphere.
[Pure]
|
||||
public
method
|
TransformSphere
(Sphere sphere,
bool inverse = false)
|
|||
type
|
Sphere
|
|||
params
|
sphere
|
The bounding sphere. | ||
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
|||
returns
|
The transformed bounding sphere box. |
Transforms the given vector.
[Pure]
|
||||
public
method
|
TransformVector
(Vec3D vector,
bool inverse = false)
|
|||
type
|
Vec3D
|
|||
params
|
vector
|
The vector. | ||
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
|||
returns
|
The transformed vector. |
Transforms the given vector.
[Pure]
|
||||
public
method
|
TransformVector
(float64 x,
float64 y,
float64 z,
bool inverse = false)
|
|||
type
|
Vec3D
|
|||
params
|
x
|
X-component of the vector. | ||
y
|
Y-component of the vector. | |||
z
|
Z-component of the vector. | |||
inverse
|
Apply
the
inverse
transformation?
Defaults
to
false . |
|||
returns
|
The transformed vector. |