ChainIK3D

继承: IKModifier3D < SkeletonModifier3D < Node3D < Node < Object

派生: IterateIK3D, SplineIK3D

A SkeletonModifier3D to apply inverse kinematics to bone chains containing an arbitrary number of bones.

描述

Base class of SkeletonModifier3D that automatically generates a joint list from the bones between the root bone and the end bone.

方法

int

get_end_bone(index: int) const

BoneDirection

get_end_bone_direction(index: int) const

float

get_end_bone_length(index: int) const

String

get_end_bone_name(index: int) const

int

get_joint_bone(index: int, joint: int) const

String

get_joint_bone_name(index: int, joint: int) const

int

get_joint_count(index: int) const

int

get_root_bone(index: int) const

String

get_root_bone_name(index: int) const

bool

is_end_bone_extended(index: int) const

void

set_end_bone(index: int, bone: int)

void

set_end_bone_direction(index: int, bone_direction: BoneDirection)

void

set_end_bone_length(index: int, length: float)

void

set_end_bone_name(index: int, bone_name: String)

void

set_extend_end_bone(index: int, enabled: bool)

void

set_root_bone(index: int, bone: int)

void

set_root_bone_name(index: int, bone_name: String)


方法说明

int get_end_bone(index: int) const 🔗

返回骨骼链末尾骨骼的索引。


BoneDirection get_end_bone_direction(index: int) const 🔗

Returns the tail direction of the end bone of the bone chain when is_end_bone_extended() is true.


float get_end_bone_length(index: int) const 🔗

Returns the end bone tail length of the bone chain when is_end_bone_extended() is true.


String get_end_bone_name(index: int) const 🔗

返回骨骼链末尾骨骼的名称。


int get_joint_bone(index: int, joint: int) const 🔗

返回骨骼链关节列表中位于 joint 的骨骼的索引。


String get_joint_bone_name(index: int, joint: int) const 🔗

返回骨骼链关节列表中位于 joint 的骨骼的名称。


int get_joint_count(index: int) const 🔗

返回骨骼链关节列表中的关节数量。


int get_root_bone(index: int) const 🔗

返回骨骼链根骨骼的索引。


String get_root_bone_name(index: int) const 🔗

返回骨骼链根骨骼的名称。


bool is_end_bone_extended(index: int) const 🔗

Returns true if the end bone is extended to have a tail.


void set_end_bone(index: int, bone: int) 🔗

设置骨骼链中末端骨骼的索引。


void set_end_bone_direction(index: int, bone_direction: BoneDirection) 🔗

is_end_bone_extended()true 时,设置骨骼链中末端骨骼的尾部方向。


void set_end_bone_length(index: int, length: float) 🔗

is_end_bone_extended()true 时,设置骨骼链中末端骨骼的尾部长度。


void set_end_bone_name(index: int, bone_name: String) 🔗

Sets the end bone name of the bone chain.

Note: The end bone must be the root bone or a child of the root bone. If they are the same, the tail must be extended by set_extend_end_bone() to modify the bone.


void set_extend_end_bone(index: int, enabled: bool) 🔗

如果 enabledtrue,则会延伸末端骨骼形成尾部。

扩展的尾部配置会分配给关节列表中的最后一个元素。换句话说,如果将 enabled 设置为 false,则关节列表中最后一个元素的配置对模拟结果没有影响。


void set_root_bone(index: int, bone: int) 🔗

设置骨骼链中根骨骼的索引。


void set_root_bone_name(index: int, bone_name: String) 🔗

设置骨骼链中根骨骼的名称。