V
- Vector/point implementation type defining the space.M
- Matrix transform implementation type.public abstract class AbstractAffineTransformMatrix<V extends EuclideanVector<V>,M extends AbstractAffineTransformMatrix<V,M>> extends Object implements EuclideanTransform<V>
Constructor and Description |
---|
AbstractAffineTransformMatrix() |
Modifier and Type | Method and Description |
---|---|
abstract V |
applyDirection(V vec)
Apply this transform to the given vector, ignoring translations and normalizing the
result.
|
abstract double |
determinant()
Get the determinant of the matrix.
|
abstract M |
inverse() |
abstract M |
linear()
Return a matrix containing only the linear portion of this transform.
|
abstract M |
linearTranspose()
Return a matrix containing the transpose of the linear portion of this transform.
|
M |
normalTransform()
Return a transform suitable for transforming normals.
|
boolean |
preservesOrientation() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyVector
identity
public AbstractAffineTransformMatrix()
public abstract V applyDirection(V vec)
transform.applyVector(vec).normalize()
but without
the intermediate vector instance.vec
- the vector to transformIllegalArgumentException
- if the transformed vector coordinates cannot be normalizedEuclideanTransform.applyVector(EuclideanVector)
public abstract double determinant()
public abstract M inverse()
inverse
in interface Transform<V extends EuclideanVector<V>>
IllegalStateException
- if the matrix cannot be invertedpublic abstract M linear()
public abstract M linearTranspose()
public M normalTransform()
N = (L-1)T
, where L
is the linear portion
of this instance and N
is the returned matrix. Note that normals
transformed with the returned matrix may be scaled during transformation and require
normalization.IllegalStateException
- if the matrix cannot be invertedpublic boolean preservesOrientation()
This method returns true if the determinant of the matrix is positive.
preservesOrientation
in interface Transform<V extends EuclideanVector<V>>
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.