mikera.transformz
Class Translation3
- java.lang.Object
-
- mikera.transformz.ATransform
-
- mikera.transformz.AAffineTransform
-
- mikera.transformz.ATranslation
-
- mikera.transformz.Translation3
-
- All Implemented Interfaces:
- java.lang.Cloneable, ITransform, ISpecialisedTransform
public final class Translation3 extends ATranslation implements ISpecialisedTransform
Specialised 3D translation class
-
-
Constructor Summary
Constructors Constructor and Description Translation3(ATranslation t)Translation3(AVector v)Translation3(double dx, double dy, double dz)
-
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(Translation t)voidcomposeWith(Translation3 t)Matrix33copyOfMatrix()Returns a deep copy of the transformation matrix for this affine transformVector3copyOfTranslationVector()Returns a deep copy of the translation vector for this affine transformintdimensions()Returns the number of dimensions of this translationAMatrixgetMatrix()ATranslationgetTranslation()doublegetTranslationComponent(int i)Vector3getTranslationVector()Gets the vector offset that this translation represents.intinputDimensions()Returns the number of dimensions required for input vectorsTranslation3inverse()Return the inverse of this transformation (if possible).booleanisIdentity()Returns true if this transform is an identity transformintoutputDimensions()Returns the number of dimensions required for output vectorsvoidtransform(AVector source, AVector dest)Transforms the source vector, storing the result in the given destination vectorvoidtransform(Vector3 source, Vector3 dest)voidtransformInPlace(AVector v)Transforms a vector destructively.voidtransformInPlace(Vector3 v)voidtransformNormal(Vector3 source, Vector3 dest)-
Methods inherited from class mikera.transformz.ATranslation
equals, equals, hashCode, isInvertible, isSquare, toAffineTransform, toMutableTranslation, transformNormal
-
Methods inherited from class mikera.transformz.AAffineTransform
compose, compose, equals, getMatrixTransform, isLinear
-
Methods inherited from class mikera.transformz.ATransform
clone, takeComponents, takeComponents, takeComponents, transform, transform
-
-
-
-
Constructor Detail
-
Translation3
public Translation3(AVector v)
-
Translation3
public Translation3(ATranslation t)
-
Translation3
public Translation3(double dx, double dy, double dz)
-
-
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
-
getTranslationComponent
public double getTranslationComponent(int i)
- Overrides:
getTranslationComponentin classATranslation
-
getTranslationVector
public Vector3 getTranslationVector()
Description copied from class:ATranslationGets the vector offset that this translation represents. Not guaranteed to be a reference.- Specified by:
getTranslationVectorin classATranslation- Returns:
-
getMatrix
public AMatrix getMatrix()
- Specified by:
getMatrixin classAAffineTransform
-
copyOfTranslationVector
public Vector3 copyOfTranslationVector()
Description copied from class:AAffineTransformReturns a deep copy of the translation vector for this affine transform- Overrides:
copyOfTranslationVectorin classAAffineTransform
-
copyOfMatrix
public Matrix33 copyOfMatrix()
Description copied from class:AAffineTransformReturns a deep copy of the transformation matrix for this affine transform- Overrides:
copyOfMatrixin classAAffineTransform
-
getTranslation
public ATranslation getTranslation()
- Specified by:
getTranslationin classAAffineTransform
-
dimensions
public int dimensions()
Description copied from class:ATranslationReturns the number of dimensions of this translation- Overrides:
dimensionsin 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:
-
isIdentity
public boolean isIdentity()
Description copied from class:ATranslationReturns true if this transform is an identity transform- Overrides:
isIdentityin classATranslation
-
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
-
transformInPlace
public void transformInPlace(Vector3 v)
-
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(Translation t)
-
composeWith
public void composeWith(Translation3 t)
-
inverse
public Translation3 inverse()
Description copied from class:ATransformReturn the inverse of this transformation (if possible). Throws an exception if the inverse cannot be computed.- Overrides:
inversein classATranslation- Returns:
-
-
DMelt 3.0 © DataMelt by jWork.ORG