mikera.transformz
Class AAffineTransform
- java.lang.Object
-
- mikera.transformz.ATransform
-
- mikera.transformz.AAffineTransform
-
- All Implemented Interfaces:
- java.lang.Cloneable, ITransform
- Direct Known Subclasses:
- AConstantTransform, Affine23, Affine34, AffineMN, ALinearTransform, ATranslation
public abstract class AAffineTransform extends ATransform
Abstract base class for affine transformations
-
-
Constructor Summary
Constructors Constructor and Description AAffineTransform()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description doublecalculateElement(int i, AVector v)Calculates a single element of the output.ATransformcompose(AAffineTransform a)ATransformcompose(ATransform a)Composes this transformation with another transformation, returning a new combined transformationAMatrixcopyOfMatrix()Returns a deep copy of the transformation matrix for this affine transformAVectorcopyOfTranslationVector()Returns a deep copy of the translation vector for this affine transformbooleanequals(AAffineTransform a)booleanequals(java.lang.Object o)abstract AMatrixgetMatrix()MatrixTransformgetMatrixTransform()abstract ATranslationgetTranslation()AVectorgetTranslationVector()Gets the translation offset that is part of this affine transform.inthashCode()AAffineTransforminverse()Return the inverse of this transformation (if possible).booleanisIdentity()Returns true if this transform is known to be the identity function, i.e.booleanisInvertible()Returns true if this transform is invertiblebooleanisLinear()Returns true if this transformation is guaranteed to be linearAAffineTransformtoAffineTransform()voidtransform(AVector source, AVector dest)Transforms the source vector, storing the result in the given destination vectorvoidtransformInPlace(AVector v)Transforms a vector destructively.voidtransformNormal(AVector source, AVector dest)-
Methods inherited from class mikera.transformz.ATransform
clone, composeWith, inputDimensions, isSquare, outputDimensions, takeComponents, takeComponents, takeComponents, transform, transform
-
-
-
-
Method Detail
-
getMatrix
public abstract AMatrix getMatrix()
-
getTranslation
public abstract ATranslation getTranslation()
-
copyOfTranslationVector
public AVector copyOfTranslationVector()
Returns a deep copy of the translation vector for this affine transform
-
copyOfMatrix
public AMatrix copyOfMatrix()
Returns a deep copy of the transformation matrix for this affine transform
-
getMatrixTransform
public MatrixTransform getMatrixTransform()
-
getTranslationVector
public AVector getTranslationVector()
Gets the translation offset that is part of this affine transform.- Returns:
-
isIdentity
public boolean isIdentity()
Description copied from class:ATransformReturns true if this transform is known to be the identity function, i.e. it maps all vectors to themselves- Overrides:
isIdentityin classATransform
-
compose
public ATransform compose(ATransform a)
Description copied from class:ATransformComposes this transformation with another transformation, returning a new combined transformation- Overrides:
composein classATransform
-
compose
public ATransform compose(AAffineTransform a)
-
transform
public void transform(AVector source, AVector dest)
Description copied from interface:ITransformTransforms the source vector, storing the result in the given destination vector- Specified by:
transformin interfaceITransform- Specified by:
transformin classATransform
-
calculateElement
public double calculateElement(int i, AVector v)Description copied from class:ATransformCalculates a single element of the output. Not necessarily faster than calculating full output, but can be in some circumstances.- Overrides:
calculateElementin classATransform
-
transformInPlace
public void transformInPlace(AVector v)
Description copied from class:ATransformTransforms a vector destructively. Intended for fast non-allocating transforms- Overrides:
transformInPlacein classATransform
-
toAffineTransform
public AAffineTransform toAffineTransform()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
equals
public boolean equals(AAffineTransform a)
-
inverse
public AAffineTransform inverse()
Description copied from class:ATransformReturn the inverse of this transformation (if possible). Throws an exception if the inverse cannot be computed.- Overrides:
inversein classATransform- Returns:
-
isLinear
public boolean isLinear()
Description copied from class:ATransformReturns true if this transformation is guaranteed to be linear- Overrides:
isLinearin classATransform- Returns:
-
isInvertible
public boolean isInvertible()
Description copied from class:ATransformReturns true if this transform is invertible- Overrides:
isInvertiblein classATransform
-
-
DMelt 3.0 © DataMelt by jWork.ORG