Package codechicken.lib.vec
Class ITransformation<Vector,Transformation extends ITransformation<Vector,Transformation>>
java.lang.Object
codechicken.lib.vec.ITransformation<Vector,Transformation>
- Type Parameters:
Vector- The vector typeTransformation- The transformation type
- All Implemented Interfaces:
Copyable<Transformation>
- Direct Known Subclasses:
Transformation,UVTransformation
public abstract class ITransformation<Vector,Transformation extends ITransformation<Vector,Transformation>>
extends Object
implements Copyable<Transformation>
Abstract supertype for any VectorN transformation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionScala ++ operatorabstract voidApplies this transformation to vecabstract Transformationabstract Transformationinverse()Attempts to invert the Transformation.booleanReturns true if this transformation is redundant, eg.merge(Transformation next) Returns a simplified transformation that performs this, followed by next.abstract TransformationCreates a TransformationList composed of this transformation followed by t If this is a TransformationList, the transformation will be appended and this returned
-
Constructor Details
-
ITransformation
public ITransformation()
-
-
Method Details
-
apply
Applies this transformation to vec -
at
- Parameters:
point- The point to apply this transformation around- Returns:
- Wraps this transformation in a translation to point and then back from point
-
with
Creates a TransformationList composed of this transformation followed by t If this is a TransformationList, the transformation will be appended and this returned -
merge
Returns a simplified transformation that performs this, followed by next. If such a transformation does not exist, returns null -
isRedundant
public boolean isRedundant()Returns true if this transformation is redundant, eg. Scale(1, 1, 1), Translation(0, 0, 0) or Rotation(0, a, b, c) -
inverse
Attempts to invert the Transformation.The transformations inverse may be itself, or the transform may not have an inverse. In that case a
IrreversibleTransformationExceptionis thrown.- Returns:
- The inverse transform.
- Throws:
IrreversibleTransformationException- If the transform does not have an inverse.
-
$plus$plus
Scala ++ operator
-