mikera.transformz
Class ATranslation
- java.lang.Object
-
- mikera.transformz.ATransform
-
- mikera.transformz.AAffineTransform
-
- mikera.transformz.ATranslation
-
- All Implemented Interfaces:
- java.lang.Cloneable, ITransform
- Direct Known Subclasses:
- IdentityTranslation, Translation, Translation3
public abstract class ATranslation extends AAffineTransform
Abstract base class for translations of arbitrary dimensionality.
-
-
Constructor Summary
Constructors Constructor and Description ATranslation()
-
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.intdimensions()Returns the number of dimensions of this translationbooleanequals(AAffineTransform a)booleanequals(ATranslation a)doublegetTranslationComponent(int i)abstract AVectorgetTranslationVector()Gets the vector offset that this translation represents.inthashCode()ATranslationinverse()Return the inverse of this transformation (if possible).booleanisIdentity()Returns true if this transform is an identity transformbooleanisInvertible()Returns true if this transform is invertiblebooleanisSquare()Returns true if the transform is square (same number of input and output dimensions)AAffineTransformtoAffineTransform()ATranslationtoMutableTranslation()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.AAffineTransform
compose, compose, copyOfMatrix, copyOfTranslationVector, equals, getMatrix, getMatrixTransform, getTranslation, isLinear
-
Methods inherited from class mikera.transformz.ATransform
clone, composeWith, inputDimensions, outputDimensions, takeComponents, takeComponents, takeComponents, transform, transform
-
-
-
-
Method Detail
-
getTranslationVector
public abstract AVector getTranslationVector()
Gets the vector offset that this translation represents. Not guaranteed to be a reference.- Overrides:
getTranslationVectorin classAAffineTransform- Returns:
-
dimensions
public int dimensions()
Returns the number of dimensions of this translation
-
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 classAAffineTransform
-
getTranslationComponent
public double getTranslationComponent(int i)
-
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- Overrides:
transformin classAAffineTransform
-
transformNormal
public void transformNormal(AVector source, AVector dest)
- Overrides:
transformNormalin classAAffineTransform
-
transformInPlace
public void transformInPlace(AVector v)
Description copied from class:ATransformTransforms a vector destructively. Intended for fast non-allocating transforms- Overrides:
transformInPlacein classAAffineTransform
-
toAffineTransform
public AAffineTransform toAffineTransform()
- Overrides:
toAffineTransformin classAAffineTransform
-
toMutableTranslation
public ATranslation toMutableTranslation()
-
isIdentity
public boolean isIdentity()
Returns true if this transform is an identity transform- Overrides:
isIdentityin classAAffineTransform
-
equals
public boolean equals(ATranslation a)
-
equals
public boolean equals(AAffineTransform a)
- Overrides:
equalsin classAAffineTransform
-
inverse
public ATranslation inverse()
Description copied from class:ATransformReturn the inverse of this transformation (if possible). Throws an exception if the inverse cannot be computed.- Overrides:
inversein classAAffineTransform- Returns:
-
isSquare
public boolean isSquare()
Description copied from class:ATransformReturns true if the transform is square (same number of input and output dimensions)- Overrides:
isSquarein classATransform- Returns:
-
isInvertible
public boolean isInvertible()
Description copied from class:ATransformReturns true if this transform is invertible- Overrides:
isInvertiblein classAAffineTransform
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAAffineTransform
-
-
DMelt 3.0 © DataMelt by jWork.ORG