Package com.goodbird.npcgecko.api
Interface IGeckoBone
-
public interface IGeckoBoneInterface 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.StringgetName()Get the name of this bone as defined in the model file.IGeckoBonegetParent()Get the parent bone in the bone hierarchy.floatgetPivotX()Get the X pivot point of this bone.floatgetPivotY()Get the Y pivot point of this bone.floatgetPivotZ()Get the Z pivot point of this bone.floatgetPositionX()Get the X position offset from the bone's rest position.floatgetPositionY()Get the Y position offset from the bone's rest position.floatgetPositionZ()Get the Z position offset from the bone's rest position.floatgetRotationX()Get the X rotation in radians.floatgetRotationY()Get the Y rotation in radians.floatgetRotationZ()Get the Z rotation in radians.floatgetScaleX()Get the X scale multiplier.floatgetScaleY()Get the Y scale multiplier.floatgetScaleZ()Get the Z scale multiplier.booleanisHidden()Check whether this bone is hidden from rendering.voidsetHidden(boolean hidden)Set whether this bone is hidden from rendering.voidsetPivotX(float value)Set the X pivot point of this bone.voidsetPivotY(float value)Set the Y pivot point of this bone.voidsetPivotZ(float value)Set the Z pivot point of this bone.voidsetPositionX(float value)Set the X position offset from the bone's rest position.voidsetPositionY(float value)Set the Y position offset from the bone's rest position.voidsetPositionZ(float value)Set the Z position offset from the bone's rest position.voidsetRotationX(float value)Set the X rotation in radians.voidsetRotationY(float value)Set the Y rotation in radians.voidsetRotationZ(float value)Set the Z rotation in radians.voidsetScaleX(float value)Set the X scale multiplier.voidsetScaleY(float value)Set the Y scale multiplier.voidsetScaleZ(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
-
-