CopyTransformModifier3D

package
v0.0.0-...-535787f Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 26 Imported by: 0

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

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
	AsCopyTransformModifier3D() Instance
}

type AxisFlag

type AxisFlag int //gd:CopyTransformModifier3D.AxisFlag
const (
	// If set, allows to process the X-axis.
	AxisFlagX AxisFlag = 1
	// If set, allows to process the Y-axis.
	AxisFlagY AxisFlag = 2
	// If set, allows to process the Z-axis.
	AxisFlagZ AxisFlag = 4
	// If set, allows to process the all axes.
	AxisFlagAll AxisFlag = 7
)

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

func (self *Extension[T]) AsBoneConstraint3D() BoneConstraint3D.Instance

func (*Extension[T]) AsCopyTransformModifier3D

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

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsNode3D

func (self *Extension[T]) AsNode3D() Node3D.Instance

func (*Extension[T]) AsObject

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

func (*Extension[T]) AsSkeletonModifier3D

func (self *Extension[T]) AsSkeletonModifier3D() SkeletonModifier3D.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

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 New

func New() Instance

func (Instance) AsBoneConstraint3D

func (self Instance) AsBoneConstraint3D() BoneConstraint3D.Instance

func (Instance) AsCopyTransformModifier3D

func (self Instance) AsCopyTransformModifier3D() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

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

func (Instance) AsSkeletonModifier3D

func (self Instance) AsSkeletonModifier3D() SkeletonModifier3D.Instance

func (Instance) GetAxisFlags

func (self Instance) GetAxisFlags(index int) AxisFlag

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

func (self Instance) GetInvertFlags(index int) AxisFlag

Returns the invert flags of the setting at 'index'.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IsAdditive

func (self Instance) IsAdditive(index int) bool

Returns true if the additive option is enabled in the setting at 'index'.

func (Instance) IsAxisXEnabled

func (self Instance) IsAxisXEnabled(index int) bool

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

func (self Instance) IsAxisXInverted(index int) bool

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

func (self Instance) IsAxisYEnabled(index int) bool

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

func (self Instance) IsAxisYInverted(index int) bool

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

func (self Instance) IsAxisZEnabled(index int) bool

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

func (self Instance) IsAxisZInverted(index int) bool

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

func (self Instance) IsPositionCopying(index int) bool

Returns true if the copy flags has the flag for the position in the setting at 'index'. See also Instance.SetCopyFlags.

func (Instance) IsRelative

func (self Instance) IsRelative(index int) bool

Returns true if the relative option is enabled in the setting at 'index'.

func (Instance) IsRotationCopying

func (self Instance) IsRotationCopying(index int) bool

Returns true if the copy flags has the flag for the rotation in the setting at 'index'. See also Instance.SetCopyFlags.

func (Instance) IsScaleCopying

func (self Instance) IsScaleCopying(index int) bool

Returns true if the copy flags has the flag for the scale in the setting at 'index'. See also Instance.SetCopyFlags.

func (Instance) SetAdditive

func (self Instance) SetAdditive(index int, enabled bool)

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

func (self Instance) SetAxisFlags(index int, axis_flags AxisFlag)

Sets the flags to copy axes. If the flag is valid, the axis is copied.

func (Instance) SetAxisXEnabled

func (self Instance) SetAxisXEnabled(index int, enabled bool)

If sets 'enabled' to true, the X-axis will be copied.

func (Instance) SetAxisXInverted

func (self Instance) SetAxisXInverted(index int, enabled bool)

If sets 'enabled' to true, the X-axis will be inverted.

func (Instance) SetAxisYEnabled

func (self Instance) SetAxisYEnabled(index int, enabled bool)

If sets 'enabled' to true, the Y-axis will be copied.

func (Instance) SetAxisYInverted

func (self Instance) SetAxisYInverted(index int, enabled bool)

If sets 'enabled' to true, the Y-axis will be inverted.

func (Instance) SetAxisZEnabled

func (self Instance) SetAxisZEnabled(index int, enabled bool)

If sets 'enabled' to true, the Z-axis will be copied.

func (Instance) SetAxisZInverted

func (self Instance) SetAxisZInverted(index int, enabled bool)

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

func (self Instance) SetCopyPosition(index int, enabled bool)

If sets 'enabled' to true, the position will be copied.

func (Instance) SetCopyRotation

func (self Instance) SetCopyRotation(index int, enabled bool)

If sets 'enabled' to true, the rotation will be copied.

func (Instance) SetCopyScale

func (self Instance) SetCopyScale(index int, enabled bool)

If sets 'enabled' to true, the scale will be copied.

func (Instance) SetInvertFlags

func (self Instance) SetInvertFlags(index int, axis_flags AxisFlag)

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

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

func (Instance) SetRelative

func (self Instance) SetRelative(index int, enabled bool)

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.

func (Instance) Virtual

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

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
)

Jump to

Keyboard shortcuts

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