SkeletonModification2DCCDIK

package
v0.0.0-...-5eaf078 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package SkeletonModification2DCCDIK provides methods for working with SkeletonModification2DCCDIK object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsSkeletonModification2DCCDIK() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

func (*Extension[T]) AsSkeletonModification2D

func (self *Extension[T]) AsSkeletonModification2D() SkeletonModification2D.Instance

func (*Extension[T]) AsSkeletonModification2DCCDIK

func (self *Extension[T]) AsSkeletonModification2DCCDIK() Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

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 New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsSkeletonModification2D

func (self Instance) AsSkeletonModification2D() SkeletonModification2D.Instance

func (Instance) AsSkeletonModification2DCCDIK

func (self Instance) AsSkeletonModification2DCCDIK() Instance

func (Instance) CcdikDataChainLength

func (self Instance) CcdikDataChainLength() int

func (Instance) GetCcdikJointBone2dNode

func (self Instance) GetCcdikJointBone2dNode(joint_idx int) string

Returns the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].

func (Instance) GetCcdikJointBoneIndex

func (self Instance) GetCcdikJointBoneIndex(joint_idx int) int

Returns the index of the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].

func (Instance) GetCcdikJointConstraintAngleInvert

func (self Instance) GetCcdikJointConstraintAngleInvert(joint_idx int) bool

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

func (self Instance) GetCcdikJointConstraintAngleMax(joint_idx int) Angle.Radians

Returns the maximum angle constraint for the joint at [param joint_idx].

func (Instance) GetCcdikJointConstraintAngleMin

func (self Instance) GetCcdikJointConstraintAngleMin(joint_idx int) Angle.Radians

Returns the minimum angle constraint for the joint at [param joint_idx].

func (Instance) GetCcdikJointEnableConstraint

func (self Instance) GetCcdikJointEnableConstraint(joint_idx int) bool

Returns whether angle constraints on the CCDIK joint at [param joint_idx] are enabled.

func (Instance) GetCcdikJointRotateFromJoint

func (self Instance) GetCcdikJointRotateFromJoint(joint_idx int) bool

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) ID

func (self Instance) ID() ID

func (Instance) SetCcdikDataChainLength

func (self Instance) SetCcdikDataChainLength(value int)

func (Instance) SetCcdikJointBone2dNode

func (self Instance) SetCcdikJointBone2dNode(joint_idx int, bone2d_nodepath string)

Sets the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].

func (Instance) SetCcdikJointBoneIndex

func (self Instance) SetCcdikJointBoneIndex(joint_idx int, bone_idx int)

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

func (self Instance) SetCcdikJointConstraintAngleInvert(joint_idx int, invert bool)

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

func (self Instance) SetCcdikJointConstraintAngleMax(joint_idx int, angle_max Angle.Radians)

Sets the maximum angle constraint for the joint at [param joint_idx].

func (Instance) SetCcdikJointConstraintAngleMin

func (self Instance) SetCcdikJointConstraintAngleMin(joint_idx int, angle_min Angle.Radians)

Sets the minimum angle constraint for the joint at [param joint_idx].

func (Instance) SetCcdikJointEnableConstraint

func (self Instance) SetCcdikJointEnableConstraint(joint_idx int, enable_constraint bool)

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

func (self Instance) SetCcdikJointRotateFromJoint(joint_idx int, rotate_from_joint bool)

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].

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetTargetNodepath

func (self Instance) SetTargetNodepath(value string)

func (Instance) SetTipNodepath

func (self Instance) SetTipNodepath(value string)

func (Instance) TargetNodepath

func (self Instance) TargetNodepath() string

func (Instance) TipNodepath

func (self Instance) TipNodepath() string

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL