mikera.transformz
Class Translation
- java.lang.Object
-
- mikera.transformz.ATransform
-
- mikera.transformz.AAffineTransform
-
- mikera.transformz.ATranslation
-
- mikera.transformz.Translation
-
- All Implemented Interfaces:
- java.lang.Cloneable, ITransform
public final class Translation extends ATranslation
Represents a translation by a fixed vector
-
-
Constructor Summary
Constructors Constructor and Description Translation(ATranslation t)Translation(AVector source)Translation(double[] v)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecalculateElement(int i, AVector v)Calculates a single element of the output.voidcomposeWith(ATransform t)Composes this transformation with a given transformation, mutating the transformation to represent the combined transformvoidcomposeWith(ATranslation t)voidcomposeWith(Translation t)intdimensions()Returns the number of dimensions of this translationAMatrixgetMatrix()ATranslationgetTranslation()AVectorgetTranslationVector()Gets the vector offset that this translation represents.intinputDimensions()Returns the number of dimensions required for input vectorsintoutputDimensions()Returns the number of dimensions required for output vectorsvoidtransform(AVector source, AVector dest)Transforms the source vector, storing the result in the given destination vectorvoidtransformInPlace(AVector v)Transforms a vector destructively.-
Methods inherited from class mikera.transformz.ATranslation
equals, equals, getTranslationComponent, hashCode, inverse, isIdentity, isInvertible, isSquare, toAffineTransform, toMutableTranslation, transformNormal
-
Methods inherited from class mikera.transformz.AAffineTransform
compose, compose, copyOfMatrix, copyOfTranslationVector, equals, getMatrixTransform, isLinear
-
Methods inherited from class mikera.transformz.ATransform
clone, takeComponents, takeComponents, takeComponents, transform, transform
-
-
-
-
Constructor Detail
-
Translation
public Translation(AVector source)
-
Translation
public Translation(ATranslation t)
-
Translation
public Translation(double[] v)
-
-
Method Detail
-
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 classATranslation
-
getTranslationVector
public AVector getTranslationVector()
Description copied from class:ATranslationGets the vector offset that this translation represents. Not guaranteed to be a reference.- Specified by:
getTranslationVectorin classATranslation- Returns:
-
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 classATranslation
-
transformInPlace
public void transformInPlace(AVector v)
Description copied from class:ATransformTransforms a vector destructively. Intended for fast non-allocating transforms- Overrides:
transformInPlacein classATranslation
-
getMatrix
public AMatrix getMatrix()
- Specified by:
getMatrixin classAAffineTransform
-
getTranslation
public ATranslation getTranslation()
- Specified by:
getTranslationin classAAffineTransform
-
inputDimensions
public int inputDimensions()
Description copied from interface:ITransformReturns the number of dimensions required for input vectors- Specified by:
inputDimensionsin interfaceITransform- Specified by:
inputDimensionsin classATransform- Returns:
-
outputDimensions
public int outputDimensions()
Description copied from interface:ITransformReturns the number of dimensions required for output vectors- Specified by:
outputDimensionsin interfaceITransform- Specified by:
outputDimensionsin classATransform- Returns:
-
dimensions
public int dimensions()
Description copied from class:ATranslationReturns the number of dimensions of this translation- Overrides:
dimensionsin classATranslation
-
composeWith
public void composeWith(ATransform t)
Description copied from class:ATransformComposes this transformation with a given transformation, mutating the transformation to represent the combined transform- Overrides:
composeWithin classATransform
-
composeWith
public void composeWith(ATranslation t)
-
composeWith
public void composeWith(Translation t)
-
-
DMelt 3.0 © DataMelt by jWork.ORG