| 
 | 1 | +<?xml version="1.0" encoding="UTF-8" ?>  | 
 | 2 | +<class name="IterateIK3D" inherits="ChainIK3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">  | 
 | 3 | +	<brief_description>  | 
 | 4 | +		A [SkeletonModifier3D] to approach the goal by repeating small rotations.  | 
 | 5 | +	</brief_description>  | 
 | 6 | +	<description>  | 
 | 7 | +		Base class of [SkeletonModifier3D] to approach the goal by repeating small rotations.  | 
 | 8 | +		Each bone chain (setting) has one effector, which is processed in order of the setting list. You can set some limitations for each joint.  | 
 | 9 | +	</description>  | 
 | 10 | +	<tutorials>  | 
 | 11 | +	</tutorials>  | 
 | 12 | +	<methods>  | 
 | 13 | +		<method name="get_joint_limitation" qualifiers="const">  | 
 | 14 | +			<return type="JointLimitation3D" />  | 
 | 15 | +			<param index="0" name="index" type="int" />  | 
 | 16 | +			<param index="1" name="joint" type="int" />  | 
 | 17 | +			<description>  | 
 | 18 | +				Returns the joint limitation at [param joint] in the bone chain's joint list.  | 
 | 19 | +			</description>  | 
 | 20 | +		</method>  | 
 | 21 | +		<method name="get_joint_limitation_right_axis" qualifiers="const">  | 
 | 22 | +			<return type="int" enum="SkeletonModifier3D.SecondaryDirection" />  | 
 | 23 | +			<param index="0" name="index" type="int" />  | 
 | 24 | +			<param index="1" name="joint" type="int" />  | 
 | 25 | +			<description>  | 
 | 26 | +				Returns the joint limitation right axis at [param joint] in the bone chain's joint list.  | 
 | 27 | +			</description>  | 
 | 28 | +		</method>  | 
 | 29 | +		<method name="get_joint_limitation_right_axis_vector" qualifiers="const">  | 
 | 30 | +			<return type="Vector3" />  | 
 | 31 | +			<param index="0" name="index" type="int" />  | 
 | 32 | +			<param index="1" name="joint" type="int" />  | 
 | 33 | +			<description>  | 
 | 34 | +				Returns the joint limitation right axis vector at [param joint] in the bone chain's joint list.  | 
 | 35 | +				If [method get_joint_limitation_right_axis] is [constant SkeletonModifier3D.SECONDARY_DIRECTION_NONE], this method returns [code]Vector3(0, 0, 0)[/code].  | 
 | 36 | +			</description>  | 
 | 37 | +		</method>  | 
 | 38 | +		<method name="get_joint_limitation_rotation_offset" qualifiers="const">  | 
 | 39 | +			<return type="Quaternion" />  | 
 | 40 | +			<param index="0" name="index" type="int" />  | 
 | 41 | +			<param index="1" name="joint" type="int" />  | 
 | 42 | +			<description>  | 
 | 43 | +				Returns the joint limitation rotation offset at [param joint] in the bone chain's joint list.  | 
 | 44 | +				Rotation is done in the local space which is constructed by the bone direction (in general parent to child) as the +Y axis and [method get_joint_limitation_right_axis_vector] as the +X axis.  | 
 | 45 | +				If the +X and +Y axes are not orthogonal, the +X axis is implicitly modified to make it orthogonal.  | 
 | 46 | +				Also, if the length of [method get_joint_limitation_right_axis_vector] is zero, the space is created by rotating the bone rest using the shortest arc that rotates the +Y axis of the bone rest to match the bone direction.  | 
 | 47 | +			</description>  | 
 | 48 | +		</method>  | 
 | 49 | +		<method name="get_joint_rotation_axis" qualifiers="const">  | 
 | 50 | +			<return type="int" enum="SkeletonModifier3D.RotationAxis" />  | 
 | 51 | +			<param index="0" name="index" type="int" />  | 
 | 52 | +			<param index="1" name="joint" type="int" />  | 
 | 53 | +			<description>  | 
 | 54 | +				Returns the rotation axis at [param joint] in the bone chain's joint list.  | 
 | 55 | +			</description>  | 
 | 56 | +		</method>  | 
 | 57 | +		<method name="get_joint_rotation_axis_vector" qualifiers="const">  | 
 | 58 | +			<return type="Vector3" />  | 
 | 59 | +			<param index="0" name="index" type="int" />  | 
 | 60 | +			<param index="1" name="joint" type="int" />  | 
 | 61 | +			<description>  | 
 | 62 | +				Returns the rotation axis vector for the specified joint in the bone chain. This vector represents the axis around which the joint can rotate. It is determined based on the rotation axis set for the joint.  | 
 | 63 | +				If [method get_joint_rotation_axis] is [constant SkeletonModifier3D.ROTATION_AXIS_ALL], this method returns [code]Vector3(0, 0, 0)[/code].  | 
 | 64 | +			</description>  | 
 | 65 | +		</method>  | 
 | 66 | +		<method name="get_target_node" qualifiers="const">  | 
 | 67 | +			<return type="NodePath" />  | 
 | 68 | +			<param index="0" name="index" type="int" />  | 
 | 69 | +			<description>  | 
 | 70 | +				Returns the target node that the end bone is trying to reach.  | 
 | 71 | +			</description>  | 
 | 72 | +		</method>  | 
 | 73 | +		<method name="set_joint_limitation">  | 
 | 74 | +			<return type="void" />  | 
 | 75 | +			<param index="0" name="index" type="int" />  | 
 | 76 | +			<param index="1" name="joint" type="int" />  | 
 | 77 | +			<param index="2" name="limitation" type="JointLimitation3D" />  | 
 | 78 | +			<description>  | 
 | 79 | +				Sets the joint limitation at [param joint] in the bone chain's joint list.  | 
 | 80 | +			</description>  | 
 | 81 | +		</method>  | 
 | 82 | +		<method name="set_joint_limitation_right_axis">  | 
 | 83 | +			<return type="void" />  | 
 | 84 | +			<param index="0" name="index" type="int" />  | 
 | 85 | +			<param index="1" name="joint" type="int" />  | 
 | 86 | +			<param index="2" name="direction" type="int" enum="SkeletonModifier3D.SecondaryDirection" />  | 
 | 87 | +			<description>  | 
 | 88 | +				Sets the joint limitation right axis at [param joint] in the bone chain's joint list.  | 
 | 89 | +			</description>  | 
 | 90 | +		</method>  | 
 | 91 | +		<method name="set_joint_limitation_right_axis_vector">  | 
 | 92 | +			<return type="void" />  | 
 | 93 | +			<param index="0" name="index" type="int" />  | 
 | 94 | +			<param index="1" name="joint" type="int" />  | 
 | 95 | +			<param index="2" name="vector" type="Vector3" />  | 
 | 96 | +			<description>  | 
 | 97 | +				Sets the optional joint limitation right axis vector at [param joint] in the bone chain's joint list.  | 
 | 98 | +			</description>  | 
 | 99 | +		</method>  | 
 | 100 | +		<method name="set_joint_limitation_rotation_offset">  | 
 | 101 | +			<return type="void" />  | 
 | 102 | +			<param index="0" name="index" type="int" />  | 
 | 103 | +			<param index="1" name="joint" type="int" />  | 
 | 104 | +			<param index="2" name="offset" type="Quaternion" />  | 
 | 105 | +			<description>  | 
 | 106 | +				Sets the joint limitation rotation offset at [param joint] in the bone chain's joint list.  | 
 | 107 | +				Rotation is done in the local space which is constructed by the bone direction (in general parent to child) as the +Y axis and [method get_joint_limitation_right_axis_vector] as the +X axis.  | 
 | 108 | +				If the +X and +Y axes are not orthogonal, the +X axis is implicitly modified to make it orthogonal.  | 
 | 109 | +				Also, if the length of [method get_joint_limitation_right_axis_vector] is zero, the space is created by rotating the bone rest using the shortest arc that rotates the +Y axis of the bone rest to match the bone direction.  | 
 | 110 | +			</description>  | 
 | 111 | +		</method>  | 
 | 112 | +		<method name="set_joint_rotation_axis">  | 
 | 113 | +			<return type="void" />  | 
 | 114 | +			<param index="0" name="index" type="int" />  | 
 | 115 | +			<param index="1" name="joint" type="int" />  | 
 | 116 | +			<param index="2" name="axis" type="int" enum="SkeletonModifier3D.RotationAxis" />  | 
 | 117 | +			<description>  | 
 | 118 | +				Sets the rotation axis at [param joint] in the bone chain's joint list.  | 
 | 119 | +				The axes are based on the [method Skeleton3D.get_bone_rest]'s space, if [param axis] is [constant SkeletonModifier3D.ROTATION_AXIS_CUSTOM], you can specify any axis.  | 
 | 120 | +				[b]Note:[/b] The rotation axis and the forward vector shouldn't be colinear to avoid unintended rotation since [ChainIK3D] does not factor in twisting forces.  | 
 | 121 | +			</description>  | 
 | 122 | +		</method>  | 
 | 123 | +		<method name="set_joint_rotation_axis_vector">  | 
 | 124 | +			<return type="void" />  | 
 | 125 | +			<param index="0" name="index" type="int" />  | 
 | 126 | +			<param index="1" name="joint" type="int" />  | 
 | 127 | +			<param index="2" name="axis_vector" type="Vector3" />  | 
 | 128 | +			<description>  | 
 | 129 | +				Sets the rotation axis vector for the specified joint in the bone chain.  | 
 | 130 | +				This vector is normalized by an internal process and represents the axis around which the bone chain can rotate.  | 
 | 131 | +				If the vector length is [code]0[/code], it is considered synonymous with [constant SkeletonModifier3D.ROTATION_AXIS_ALL].  | 
 | 132 | +			</description>  | 
 | 133 | +		</method>  | 
 | 134 | +		<method name="set_target_node">  | 
 | 135 | +			<return type="void" />  | 
 | 136 | +			<param index="0" name="index" type="int" />  | 
 | 137 | +			<param index="1" name="target_node" type="NodePath" />  | 
 | 138 | +			<description>  | 
 | 139 | +				Sets the target node that the end bone is trying to reach.  | 
 | 140 | +			</description>  | 
 | 141 | +		</method>  | 
 | 142 | +	</methods>  | 
 | 143 | +	<members>  | 
 | 144 | +		<member name="angular_delta_limit" type="float" setter="set_angular_delta_limit" getter="get_angular_delta_limit" default="0.034906585">  | 
 | 145 | +			The maximum amount each bone can rotate in a single iteration.  | 
 | 146 | +			[b]Note:[/b] This limitation is applied during each iteration. For example, if [member max_iterations] is [code]4[/code] and [member angular_delta_limit] is [code]5[/code] degrees, the maximum rotation possible in a single frame is [code]20[/code] degrees.  | 
 | 147 | +		</member>  | 
 | 148 | +		<member name="max_iterations" type="int" setter="set_max_iterations" getter="get_max_iterations" default="4">  | 
 | 149 | +			The number of iteration loops used by the IK solver to produce more accurate results.  | 
 | 150 | +		</member>  | 
 | 151 | +		<member name="min_distance" type="float" setter="set_min_distance" getter="get_min_distance" default="0.001">  | 
 | 152 | +			The minimum distance between the end bone and the target. If the distance is below this value, the IK solver stops any further iterations.  | 
 | 153 | +		</member>  | 
 | 154 | +		<member name="setting_count" type="int" setter="set_setting_count" getter="get_setting_count" default="0">  | 
 | 155 | +			The number of settings.  | 
 | 156 | +		</member>  | 
 | 157 | +	</members>  | 
 | 158 | +</class>  | 
0 commit comments