Documentation
¶
Overview ¶
Package SkeletonModification2DCCDIK provides methods for working with SkeletonModification2DCCDIK object instances.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
- func (self *Extension[T]) AsResource() Resource.Instance
- func (self *Extension[T]) AsSkeletonModification2D() SkeletonModification2D.Instance
- func (self *Extension[T]) AsSkeletonModification2DCCDIK() Instance
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsSkeletonModification2D() SkeletonModification2D.Instance
- func (self Instance) AsSkeletonModification2DCCDIK() Instance
- func (self Instance) CcdikDataChainLength() int
- func (self Instance) GetCcdikJointBone2dNode(joint_idx int) string
- func (self Instance) GetCcdikJointBoneIndex(joint_idx int) int
- func (self Instance) GetCcdikJointConstraintAngleInvert(joint_idx int) bool
- func (self Instance) GetCcdikJointConstraintAngleMax(joint_idx int) Angle.Radians
- func (self Instance) GetCcdikJointConstraintAngleMin(joint_idx int) Angle.Radians
- func (self Instance) GetCcdikJointEnableConstraint(joint_idx int) bool
- func (self Instance) GetCcdikJointRotateFromJoint(joint_idx int) bool
- func (self Instance) ID() ID
- func (self Instance) SetCcdikDataChainLength(value int)
- func (self Instance) SetCcdikJointBone2dNode(joint_idx int, bone2d_nodepath string)
- func (self Instance) SetCcdikJointBoneIndex(joint_idx int, bone_idx int)
- func (self Instance) SetCcdikJointConstraintAngleInvert(joint_idx int, invert bool)
- func (self Instance) SetCcdikJointConstraintAngleMax(joint_idx int, angle_max Angle.Radians)
- func (self Instance) SetCcdikJointConstraintAngleMin(joint_idx int, angle_min Angle.Radians)
- func (self Instance) SetCcdikJointEnableConstraint(joint_idx int, enable_constraint bool)
- func (self Instance) SetCcdikJointRotateFromJoint(joint_idx int, rotate_from_joint bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetTargetNodepath(value string)
- func (self Instance) SetTipNodepath(value string)
- func (self Instance) TargetNodepath() string
- func (self Instance) TipNodepath() string
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
func (*Extension[T]) AsSkeletonModification2D ¶
func (self *Extension[T]) AsSkeletonModification2D() SkeletonModification2D.Instance
func (*Extension[T]) AsSkeletonModification2DCCDIK ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.SkeletonModification2DCCDIK
This [SkeletonModification2D] uses an algorithm called Cyclic Coordinate Descent Inverse Kinematics, or CCDIK, to manipulate a chain of bones in a [Skeleton2D] so it reaches a defined target. CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers. [b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK. CCDIK also fully supports angle constraints, allowing for more control over how a solution is met.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsSkeletonModification2D ¶
func (self Instance) AsSkeletonModification2D() SkeletonModification2D.Instance
func (Instance) AsSkeletonModification2DCCDIK ¶
func (Instance) CcdikDataChainLength ¶
func (Instance) GetCcdikJointBone2dNode ¶
Returns the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].
func (Instance) GetCcdikJointBoneIndex ¶
Returns the index of the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].
func (Instance) GetCcdikJointConstraintAngleInvert ¶
Returns whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_angle_invert] for details.
func (Instance) GetCcdikJointConstraintAngleMax ¶
Returns the maximum angle constraint for the joint at [param joint_idx].
func (Instance) GetCcdikJointConstraintAngleMin ¶
Returns the minimum angle constraint for the joint at [param joint_idx].
func (Instance) GetCcdikJointEnableConstraint ¶
Returns whether angle constraints on the CCDIK joint at [param joint_idx] are enabled.
func (Instance) GetCcdikJointRotateFromJoint ¶
Returns whether the joint at [param joint_idx] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. The default is to rotate from the tip.
func (Instance) SetCcdikDataChainLength ¶
func (Instance) SetCcdikJointBone2dNode ¶
Sets the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].
func (Instance) SetCcdikJointBoneIndex ¶
Sets the bone index, [param bone_idx], of the CCDIK joint at [param joint_idx]. When possible, this will also update the [code]bone2d_node[/code] of the CCDIK joint based on data provided by the linked skeleton.
func (Instance) SetCcdikJointConstraintAngleInvert ¶
Sets whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.
func (Instance) SetCcdikJointConstraintAngleMax ¶
Sets the maximum angle constraint for the joint at [param joint_idx].
func (Instance) SetCcdikJointConstraintAngleMin ¶
Sets the minimum angle constraint for the joint at [param joint_idx].
func (Instance) SetCcdikJointEnableConstraint ¶
Determines whether angle constraints on the CCDIK joint at [param joint_idx] are enabled. When [code]true[/code], constraints will be enabled and taken into account when solving.
func (Instance) SetCcdikJointRotateFromJoint ¶
Sets whether the joint at [param joint_idx] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code].