Class AffineTransformations

java.lang.Object
gaiasky.scene.component.AffineTransformations
All Implemented Interfaces:
com.badlogic.ashley.core.Component

public class AffineTransformations extends Object implements com.badlogic.ashley.core.Component
Represents an arbitrarily large sequence of affine transformations as a list of 4x4 matrices.
  • Field Details

    • transformations

      public Vector<ITransform> transformations
      Affine transformations, applied each cycle
  • Constructor Details

    • AffineTransformations

      public AffineTransformations()
  • Method Details

    • setTransformations

      public void setTransformations(Object[] transformations)
    • setTransformations

      public void setTransformations(Vector<ITransform> transformations)
    • initialize

      public void initialize()
    • clear

      public void clear()
    • isEmpty

      public boolean isEmpty()
    • replace

      public void replace(ITransform newTransform, int index)
      Replace the transformation at the current index with the given one.
      Parameters:
      newTransform - The new transformation.
      index - The index.
    • setMatrix

      public void setMatrix(double[] matrix)
      Sets a generic 4x4 transformation matrix in the chain.
      Parameters:
      matrix - The matrix values in column-major order.
    • setTransformMatrix

      public void setTransformMatrix(double[] matrix)
    • setTranslate

      public void setTranslate(double[] translation)
    • setTranslatePc

      public void setTranslatePc(double[] translation)
    • setTranslateKm

      public void setTranslateKm(double[] translation)
    • setQuaternion

      public void setQuaternion(double[] axis, double angle)
    • setQuaternion

      public void setQuaternion(QuaternionDouble q)
    • setRotate

      public void setRotate(double[] axisDegrees)
    • setScale

      public void setScale(double[] sc)
    • setScale

      public void setScale(Double sc)
    • apply

      public com.badlogic.gdx.math.Matrix4 apply(com.badlogic.gdx.math.Matrix4 mat)
    • apply

      public Matrix4d apply(Matrix4d mat)
    • getScaleTransform

      public ScaleTransform getScaleTransform()
    • getRotateTransform

      public RotateTransform getRotateTransform()
    • getTranslateTransform

      public TranslateTransform getTranslateTransform()
    • deepCopy

      public AffineTransformations deepCopy()
      Produces a deep copy of the current affine transformations object.
      Returns:
      A deep copy of this object.