Interface IGeckoBone


  • public interface IGeckoBone
    Interface for querying and modifying bone transforms on a GeckoLib model at runtime. Bones represent individual parts of a model (e.g. "head", "left_arm", "body").

    Position values are relative offsets from the bone's rest position. Rotation values are in radians. Scale values are multipliers where 1.0 is the default size.

    See Also:
    IGeckoModel.getBone(java.lang.String)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      IGeckoBone[] getChildBones()
      Get the direct child bones of this bone.
      String getName()
      Get the name of this bone as defined in the model file.
      IGeckoBone getParent()
      Get the parent bone in the bone hierarchy.
      float getPivotX()
      Get the X pivot point of this bone.
      float getPivotY()
      Get the Y pivot point of this bone.
      float getPivotZ()
      Get the Z pivot point of this bone.
      float getPositionX()
      Get the X position offset from the bone's rest position.
      float getPositionY()
      Get the Y position offset from the bone's rest position.
      float getPositionZ()
      Get the Z position offset from the bone's rest position.
      float getRotationX()
      Get the X rotation in radians.
      float getRotationY()
      Get the Y rotation in radians.
      float getRotationZ()
      Get the Z rotation in radians.
      float getScaleX()
      Get the X scale multiplier.
      float getScaleY()
      Get the Y scale multiplier.
      float getScaleZ()
      Get the Z scale multiplier.
      boolean isHidden()
      Check whether this bone is hidden from rendering.
      void setHidden​(boolean hidden)
      Set whether this bone is hidden from rendering.
      void setPivotX​(float value)
      Set the X pivot point of this bone.
      void setPivotY​(float value)
      Set the Y pivot point of this bone.
      void setPivotZ​(float value)
      Set the Z pivot point of this bone.
      void setPositionX​(float value)
      Set the X position offset from the bone's rest position.
      void setPositionY​(float value)
      Set the Y position offset from the bone's rest position.
      void setPositionZ​(float value)
      Set the Z position offset from the bone's rest position.
      void setRotationX​(float value)
      Set the X rotation in radians.
      void setRotationY​(float value)
      Set the Y rotation in radians.
      void setRotationZ​(float value)
      Set the Z rotation in radians.
      void setScaleX​(float value)
      Set the X scale multiplier.
      void setScaleY​(float value)
      Set the Y scale multiplier.
      void setScaleZ​(float value)
      Set the Z scale multiplier.
    • Method Detail

      • getName

        String getName()
        Get the name of this bone as defined in the model file.
        Returns:
        the bone name
      • getPositionX

        float getPositionX()
        Get the X position offset from the bone's rest position.
        Returns:
        the X position offset
      • getPositionY

        float getPositionY()
        Get the Y position offset from the bone's rest position.
        Returns:
        the Y position offset
      • getPositionZ

        float getPositionZ()
        Get the Z position offset from the bone's rest position.
        Returns:
        the Z position offset
      • setPositionX

        void setPositionX​(float value)
        Set the X position offset from the bone's rest position.
        Parameters:
        value - the X position offset
      • setPositionY

        void setPositionY​(float value)
        Set the Y position offset from the bone's rest position.
        Parameters:
        value - the Y position offset
      • setPositionZ

        void setPositionZ​(float value)
        Set the Z position offset from the bone's rest position.
        Parameters:
        value - the Z position offset
      • getRotationX

        float getRotationX()
        Get the X rotation in radians.
        Returns:
        the X rotation in radians
      • getRotationY

        float getRotationY()
        Get the Y rotation in radians.
        Returns:
        the Y rotation in radians
      • getRotationZ

        float getRotationZ()
        Get the Z rotation in radians.
        Returns:
        the Z rotation in radians
      • setRotationX

        void setRotationX​(float value)
        Set the X rotation in radians.
        Parameters:
        value - the X rotation in radians
      • setRotationY

        void setRotationY​(float value)
        Set the Y rotation in radians.
        Parameters:
        value - the Y rotation in radians
      • setRotationZ

        void setRotationZ​(float value)
        Set the Z rotation in radians.
        Parameters:
        value - the Z rotation in radians
      • getScaleX

        float getScaleX()
        Get the X scale multiplier.
        Returns:
        the X scale multiplier (1.0 = default size)
      • getScaleY

        float getScaleY()
        Get the Y scale multiplier.
        Returns:
        the Y scale multiplier (1.0 = default size)
      • getScaleZ

        float getScaleZ()
        Get the Z scale multiplier.
        Returns:
        the Z scale multiplier (1.0 = default size)
      • setScaleX

        void setScaleX​(float value)
        Set the X scale multiplier.
        Parameters:
        value - the X scale multiplier (1.0 = default size)
      • setScaleY

        void setScaleY​(float value)
        Set the Y scale multiplier.
        Parameters:
        value - the Y scale multiplier (1.0 = default size)
      • setScaleZ

        void setScaleZ​(float value)
        Set the Z scale multiplier.
        Parameters:
        value - the Z scale multiplier (1.0 = default size)
      • getPivotX

        float getPivotX()
        Get the X pivot point of this bone.
        Returns:
        the X pivot point
      • getPivotY

        float getPivotY()
        Get the Y pivot point of this bone.
        Returns:
        the Y pivot point
      • getPivotZ

        float getPivotZ()
        Get the Z pivot point of this bone.
        Returns:
        the Z pivot point
      • setPivotX

        void setPivotX​(float value)
        Set the X pivot point of this bone.
        Parameters:
        value - the X pivot point
      • setPivotY

        void setPivotY​(float value)
        Set the Y pivot point of this bone.
        Parameters:
        value - the Y pivot point
      • setPivotZ

        void setPivotZ​(float value)
        Set the Z pivot point of this bone.
        Parameters:
        value - the Z pivot point
      • isHidden

        boolean isHidden()
        Check whether this bone is hidden from rendering.
        Returns:
        true if this bone is currently hidden
      • setHidden

        void setHidden​(boolean hidden)
        Set whether this bone is hidden from rendering. Hidden bones and their children are not drawn.
        Parameters:
        hidden - true to hide this bone, false to show it
      • getParent

        IGeckoBone getParent()
        Get the parent bone in the bone hierarchy.
        Returns:
        the parent bone, or null if this is a root bone
      • getChildBones

        IGeckoBone[] getChildBones()
        Get the direct child bones of this bone.
        Returns:
        array of child bones, or an empty array if this bone has no children