Class ArmatureFrame

java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.armature.ArmatureFrame

public final class ArmatureFrame extends Object
An armature posed for one frame: where every joint is, which are shown, and how they are tinted. Renderers draw it; code that hangs things on an armature or spawns particles from it reads joint and point places from it.

Joint matrices take model pixels at rest to model pixels posed. modelToWorld() goes on from there to the world (blocks), as last drawn.

  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    glows(int index)
    Whether a joint is drawn at full brightness whatever the light.
    org.joml.Matrix4fc
    joint(int index)
     
    @Nullable org.joml.Matrix4fc
    joint(String name)
     
    org.joml.Matrix4fc
    From model pixels to the world, as of the last update.
    org.joml.Matrix3f
    normal(int index)
    The matrix's normal part, for lighting.
    int
    The joint a point (or joint) of that name moves with, or -1.
    @Nullable org.joml.Matrix4f
    Where a point (or, if there is no point by that name, a joint's pivot) is, as a matrix in model pixels: its position, and its axes turned as it is.
    The .obj models carried this frame: the armature's own and the animator's.
    int
    tint(int index)
    The ARGB colour a joint's faces are multiplied by (white when untinted).
    boolean
    visible(int index)
     
    @Nullable org.joml.Vector3f
    Where a point or joint pivot is in the world, in blocks; null if the armature has neither.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • armature

      public BakedArmature armature()
    • joint

      public org.joml.Matrix4fc joint(int index)
    • joint

      @Nullable public @Nullable org.joml.Matrix4fc joint(String name)
    • normal

      public org.joml.Matrix3f normal(int index)
      The matrix's normal part, for lighting.
    • visible

      public boolean visible(int index)
    • tint

      public int tint(int index)
      The ARGB colour a joint's faces are multiplied by (white when untinted).
    • glows

      public boolean glows(int index)
      Whether a joint is drawn at full brightness whatever the light.
    • props

      public List<ObjProp> props()
      The .obj models carried this frame: the armature's own and the animator's.
    • pointJoint

      public int pointJoint(String name)
      The joint a point (or joint) of that name moves with, or -1.
    • modelToWorld

      public org.joml.Matrix4fc modelToWorld()
      From model pixels to the world, as of the last update.
    • pointMatrix

      @Nullable public @Nullable org.joml.Matrix4f pointMatrix(String name)
      Where a point (or, if there is no point by that name, a joint's pivot) is, as a matrix in model pixels: its position, and its axes turned as it is. Null if the armature has neither.
    • worldPosition

      @Nullable public @Nullable org.joml.Vector3f worldPosition(String name)
      Where a point or joint pivot is in the world, in blocks; null if the armature has neither.