Documentation
¶
Overview ¶
Apply the copied transform of the bone set by graphics.gd/classdb/BoneConstraint3D.Instance.SetReferenceBone to the bone set by graphics.gd/classdb/BoneConstraint3D.Instance.SetApplyBone with processing it with some masks and options.
There are 4 ways to apply the transform, depending on the combination of Instance.SetRelative and Instance.SetAdditive.
Relative + Additive:
- Extract reference pose relative to the rest and add it to the apply bone's pose.
Relative + Not Additive:
- Extract reference pose relative to the rest and add it to the apply bone's rest.
Not Relative + Additive:
- Extract reference pose absolutely and add it to the apply bone's pose.
Not Relative + Not Additive:
- Extract reference pose absolutely and the apply bone's pose is replaced with it.
Index ¶
- type Advanced
- type Any
- type AxisFlag
- type Extension
- func (self *Extension[T]) AsBoneConstraint3D() BoneConstraint3D.Instance
- func (self *Extension[T]) AsCopyTransformModifier3D() Instance
- func (self *Extension[T]) AsNode() Node.Instance
- func (self *Extension[T]) AsNode3D() Node3D.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsSkeletonModifier3D() SkeletonModifier3D.Instance
- type ID
- type Instance
- func (self Instance) AsBoneConstraint3D() BoneConstraint3D.Instance
- func (self Instance) AsCopyTransformModifier3D() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsSkeletonModifier3D() SkeletonModifier3D.Instance
- func (self Instance) GetAxisFlags(index int) AxisFlag
- func (self Instance) GetCopyFlags(index int) TransformFlag
- func (self Instance) GetInvertFlags(index int) AxisFlag
- func (self Instance) ID() ID
- func (self Instance) IsAdditive(index int) bool
- func (self Instance) IsAxisXEnabled(index int) bool
- func (self Instance) IsAxisXInverted(index int) bool
- func (self Instance) IsAxisYEnabled(index int) bool
- func (self Instance) IsAxisYInverted(index int) bool
- func (self Instance) IsAxisZEnabled(index int) bool
- func (self Instance) IsAxisZInverted(index int) bool
- func (self Instance) IsPositionCopying(index int) bool
- func (self Instance) IsRelative(index int) bool
- func (self Instance) IsRotationCopying(index int) bool
- func (self Instance) IsScaleCopying(index int) bool
- func (self Instance) SetAdditive(index int, enabled bool)
- func (self Instance) SetAxisFlags(index int, axis_flags AxisFlag)
- func (self Instance) SetAxisXEnabled(index int, enabled bool)
- func (self Instance) SetAxisXInverted(index int, enabled bool)
- func (self Instance) SetAxisYEnabled(index int, enabled bool)
- func (self Instance) SetAxisYInverted(index int, enabled bool)
- func (self Instance) SetAxisZEnabled(index int, enabled bool)
- func (self Instance) SetAxisZInverted(index int, enabled bool)
- func (self Instance) SetCopyFlags(index int, copy_flags TransformFlag)
- func (self Instance) SetCopyPosition(index int, enabled bool)
- func (self Instance) SetCopyRotation(index int, enabled bool)
- func (self Instance) SetCopyScale(index int, enabled bool)
- func (self Instance) SetInvertFlags(index int, axis_flags AxisFlag)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetRelative(index int, enabled bool)
- func (self Instance) Virtual(name string) reflect.Value
- type TransformFlag
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]) AsBoneConstraint3D ¶
func (self *Extension[T]) AsBoneConstraint3D() BoneConstraint3D.Instance
func (*Extension[T]) AsCopyTransformModifier3D ¶
func (*Extension[T]) AsSkeletonModifier3D ¶
func (self *Extension[T]) AsSkeletonModifier3D() SkeletonModifier3D.Instance
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.CopyTransformModifier3D
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsBoneConstraint3D ¶
func (self Instance) AsBoneConstraint3D() BoneConstraint3D.Instance
func (Instance) AsCopyTransformModifier3D ¶
func (Instance) AsSkeletonModifier3D ¶
func (self Instance) AsSkeletonModifier3D() SkeletonModifier3D.Instance
func (Instance) GetAxisFlags ¶
Returns the axis flags of the setting at 'index'.
func (Instance) GetCopyFlags ¶
func (self Instance) GetCopyFlags(index int) TransformFlag
Returns the copy flags of the setting at 'index'.
func (Instance) GetInvertFlags ¶
Returns the invert flags of the setting at 'index'.
func (Instance) IsAdditive ¶
Returns true if the additive option is enabled in the setting at 'index'.
func (Instance) IsAxisXEnabled ¶
Returns true if the enable flags has the flag for the X-axis in the setting at 'index'. See also Instance.SetAxisFlags.
func (Instance) IsAxisXInverted ¶
Returns true if the invert flags has the flag for the X-axis in the setting at 'index'. See also Instance.SetInvertFlags.
func (Instance) IsAxisYEnabled ¶
Returns true if the enable flags has the flag for the Y-axis in the setting at 'index'. See also Instance.SetAxisFlags.
func (Instance) IsAxisYInverted ¶
Returns true if the invert flags has the flag for the Y-axis in the setting at 'index'. See also Instance.SetInvertFlags.
func (Instance) IsAxisZEnabled ¶
Returns true if the enable flags has the flag for the Z-axis in the setting at 'index'. See also Instance.SetAxisFlags.
func (Instance) IsAxisZInverted ¶
Returns true if the invert flags has the flag for the Z-axis in the setting at 'index'. See also Instance.SetInvertFlags.
func (Instance) IsPositionCopying ¶
Returns true if the copy flags has the flag for the position in the setting at 'index'. See also Instance.SetCopyFlags.
func (Instance) IsRelative ¶
Returns true if the relative option is enabled in the setting at 'index'.
func (Instance) IsRotationCopying ¶
Returns true if the copy flags has the flag for the rotation in the setting at 'index'. See also Instance.SetCopyFlags.
func (Instance) IsScaleCopying ¶
Returns true if the copy flags has the flag for the scale in the setting at 'index'. See also Instance.SetCopyFlags.
func (Instance) SetAdditive ¶
Sets additive option in the setting at 'index' to 'enabled'. This mainly affects the process of applying transform to the graphics.gd/classdb/BoneConstraint3D.Instance.SetApplyBone.
If sets 'enabled' to true, the processed transform is added to the pose of the current apply bone.
If sets 'enabled' to false, the pose of the current apply bone is replaced with the processed transform. However, if set Instance.SetRelative to true, the transform is relative to rest.
func (Instance) SetAxisFlags ¶
Sets the flags to copy axes. If the flag is valid, the axis is copied.
func (Instance) SetAxisXEnabled ¶
If sets 'enabled' to true, the X-axis will be copied.
func (Instance) SetAxisXInverted ¶
If sets 'enabled' to true, the X-axis will be inverted.
func (Instance) SetAxisYEnabled ¶
If sets 'enabled' to true, the Y-axis will be copied.
func (Instance) SetAxisYInverted ¶
If sets 'enabled' to true, the Y-axis will be inverted.
func (Instance) SetAxisZEnabled ¶
If sets 'enabled' to true, the Z-axis will be copied.
func (Instance) SetAxisZInverted ¶
If sets 'enabled' to true, the Z-axis will be inverted.
func (Instance) SetCopyFlags ¶
func (self Instance) SetCopyFlags(index int, copy_flags TransformFlag)
Sets the flags to process the transform operations. If the flag is valid, the transform operation is processed.
Note: If the rotation is valid for only one axis, it respects the roll of the valid axis. If the rotation is valid for two axes, it discards the roll of the invalid axis.
func (Instance) SetCopyPosition ¶
If sets 'enabled' to true, the position will be copied.
func (Instance) SetCopyRotation ¶
If sets 'enabled' to true, the rotation will be copied.
func (Instance) SetCopyScale ¶
If sets 'enabled' to true, the scale will be copied.
func (Instance) SetInvertFlags ¶
Sets the flags to inverte axes. If the flag is valid, the axis is copied.
Note: An inverted scale means an inverse number, not a negative scale. For example, inverting 2.0 means 0.5.
Note: An inverted rotation flips the elements of the quaternion. For example, a two-axis inversion will flip the roll of each axis, and a three-axis inversion will flip the final orientation. However, be aware that flipping only one axis may cause unintended rotation by the unflipped axes, due to the characteristics of the quaternion.
func (Instance) SetRelative ¶
Sets relative option in the setting at 'index' to 'enabled'.
If sets 'enabled' to true, the extracted and applying transform is relative to the rest.
If sets 'enabled' to false, the extracted transform is absolute.
type TransformFlag ¶
type TransformFlag int //gd:CopyTransformModifier3D.TransformFlag
const ( // If set, allows to copy the position. TransformFlagPosition TransformFlag = 1 // If set, allows to copy the rotation. TransformFlagRotation TransformFlag = 2 // If set, allows to copy the scale. TransformFlagScale TransformFlag = 4 // If set, allows to copy the position/rotation/scale. TransformFlagAll TransformFlag = 7 )