mikera.transformz.impl
Class IdentityTranslation
- java.lang.Object
-
- mikera.transformz.ATransform
-
- mikera.transformz.AAffineTransform
-
- mikera.transformz.ATranslation
-
- mikera.transformz.impl.IdentityTranslation
-
- All Implemented Interfaces:
- java.lang.Cloneable, ITransform
public final class IdentityTranslation extends ATranslation
Immutable identity translation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecalculateElement(int i, AVector v)Calculates a single element of the output.static IdentityTranslationcreate(int i)AMatrixgetMatrix()ATranslationgetTranslation()AVectorgetTranslationVector()Gets the vector offset that this translation represents.inthashCode()intinputDimensions()Returns the number of dimensions required for input vectorsbooleanisIdentity()Returns true if this transform is an identity transformintoutputDimensions()Returns the number of dimensions required for output vectorsVectortransform(AVector source)Transforms a vector, returning a new transformed vectorvoidtransform(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
dimensions, equals, equals, getTranslationComponent, inverse, 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, composeWith, takeComponents, takeComponents, takeComponents, transform
-
-
-
-
Method Detail
-
create
public static IdentityTranslation create(int i)
-
getMatrix
public AMatrix getMatrix()
- Specified by:
getMatrixin classAAffineTransform
-
getTranslation
public ATranslation getTranslation()
- Specified by:
getTranslationin classAAffineTransform
-
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
-
transform
public Vector transform(AVector source)
Description copied from class:ATransformTransforms a vector, returning a new transformed vector- Overrides:
transformin classATransform- Returns:
-
transformInPlace
public void transformInPlace(AVector v)
Description copied from class:ATransformTransforms a vector destructively. Intended for fast non-allocating transforms- Overrides:
transformInPlacein classATranslation
-
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
-
isIdentity
public boolean isIdentity()
Description copied from class:ATranslationReturns true if this transform is an identity transform- Overrides:
isIdentityin classATranslation
-
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:
-
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:
-
hashCode
public int hashCode()
- Overrides:
hashCodein classATranslation
-
-
DMelt 3.0 © DataMelt by jWork.ORG