Class Transformation

All Implemented Interfaces:
IVertexOperation, Copyable<Transformation>
Direct Known Subclasses:
Matrix4, RedundantTransformation, Rotation, Scale, TransformationList, Translation, VariableTransformation

public abstract class Transformation extends ITransformation<Vector3,Transformation> implements IVertexOperation
Abstract supertype for any 3D vector transformation
  • Field Details

    • operationIndex

      public static final int operationIndex
  • Constructor Details

    • Transformation

      public Transformation()
  • Method Details

    • applyN

      public abstract void applyN(Vector3 normal)
      Applies this transformation to a normal (doesn't translate)
      Parameters:
      normal - The normal to transform
    • apply

      public abstract void apply(Matrix4 mat)
      Applies this transformation to a matrix as a multiplication on the right hand side.
      Parameters:
      mat - The matrix to combine this transformation with
    • at

      public Transformation at(Vector3 point)
      Specified by:
      at in class ITransformation<Vector3,Transformation>
      Parameters:
      point - The point to apply this transformation around
      Returns:
      Wraps this transformation in a translation to point and then back from point
    • with

      Description copied from class: ITransformation
      Creates a TransformationList composed of this transformation followed by t If this is a TransformationList, the transformation will be appended and this returned
      Specified by:
      with in class ITransformation<Vector3,Transformation>
    • load

      public boolean load(CCRenderState ccrs)
      Description copied from interface: IVertexOperation
      Load any required references and add dependencies to the pipeline based on the current model (may be null) Return false if this operation is redundant in the pipeline with the given model
      Specified by:
      load in interface IVertexOperation
    • operate

      public void operate(CCRenderState ccrs)
      Description copied from interface: IVertexOperation
      Perform the operation on the current render state
      Specified by:
      operate in interface IVertexOperation
    • operationID

      public int operationID()
      Description copied from interface: IVertexOperation
      Get the unique id representing this type of operation. Duplicate operation IDs within the pipeline may have unexpected results. ID should be obtained from CCRenderState.registerOperation() and stored in a static variable
      Specified by:
      operationID in interface IVertexOperation