mikera.transformz.impl
Class ConstantTransform4
- java.lang.Object
-
- mikera.transformz.ATransform
-
- mikera.transformz.AAffineTransform
-
- mikera.transformz.impl.AConstantTransform
-
- mikera.transformz.impl.ConstantTransform4
-
- All Implemented Interfaces:
- java.lang.Cloneable, ITransform, ISpecialisedTransform
public final class ConstantTransform4 extends AConstantTransform implements ISpecialisedTransform
Class represnting a transform that returns a 4D constant
-
-
Constructor Summary
Constructors Constructor and Description ConstantTransform4(int inputDimensions, AVector value)Creates a new constant transform, using the provided vector as the constant value Does *not* take a defensive copy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecalculateElement(int i, AVector inputVector)Calculates a single element of the output.AVectorgetConstantValue()ATranslationgetTranslation()intoutputDimensions()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(AVector source, Vector4 dest)-
Methods inherited from class mikera.transformz.impl.AConstantTransform
compose, getMatrix, inputDimensions, inverse, isIdentity
-
Methods inherited from class mikera.transformz.AAffineTransform
compose, copyOfMatrix, copyOfTranslationVector, equals, equals, getMatrixTransform, getTranslationVector, hashCode, isInvertible, isLinear, toAffineTransform, transformInPlace, transformNormal
-
Methods inherited from class mikera.transformz.ATransform
clone, composeWith, isSquare, takeComponents, takeComponents, takeComponents, transform, transform
-
-
-
-
Constructor Detail
-
ConstantTransform4
public ConstantTransform4(int inputDimensions, AVector value)Creates a new constant transform, using the provided vector as the constant value Does *not* take a defensive copy- Parameters:
inputDimensions-value-
-
-
Method Detail
-
calculateElement
public double calculateElement(int i, AVector inputVector)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
-
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:
-
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
-
getTranslation
public ATranslation getTranslation()
- Specified by:
getTranslationin classAAffineTransform
-
getConstantValue
public AVector getConstantValue()
- Specified by:
getConstantValuein classAConstantTransform
-
-
DMelt 3.0 © DataMelt by jWork.ORG