Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
ModifierCallbackModeProcess
Skeleton3D.swift:33enum ModifierCallbackModeProcess
Cases
case physics
Set a flag to process modification during physics frames (see
Node
notificationInternalPhysicsProcess````).case idle
Set a flag to process modification during process frames (see
Node
notificationInternalProcess````).
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (56) members.
Types
class Signal1
Signal support.
Type members
static let notificationUpdateSkeleton: Int
Notification received when this skeleton’s pose needs to be updated. In that case, this is called only once per frame in a deferred process.
class var godotClassName: StringName
Instance members
var boneEnabledChanged: Signal1
Emitted when the bone at
boneIdx
is toggled withsetBoneEnabled(boneIdx:enabled:)
. UseisBoneEnabled(boneIdx:)
to check the new value.var boneListChanged: SimpleSignal
To connect to this signal, reference this property and call the
var modifierCallbackModeProcess: Skeleton3D.ModifierCallbackModeProcess
Sets the processing timing for the Modifier.
var motionScale: Double
Multiplies the 3D position track animation.
var poseUpdated: SimpleSignal
Emitted when the pose is updated.
var showRestOnly: Bool
If
true
, forces the bones in their default rest pose, regardless of their values. In the editor, this also prevents the bones from being edited.var showRestOnlyChanged: SimpleSignal
Emitted when the value of
showRestOnly
changes.var skeletonUpdated: SimpleSignal
Emitted when the final pose has been calculated will be applied to the skin in the update process.
func addBone(name: String
) -> Int32 Adds a new bone with the given name. Returns the new bone’s index, or
-1
if this method fails.func clearBones(
) Clear all the bones in this skeleton.
func clearBonesGlobalPoseOverride(
) Removes the global pose override on all bones in the skeleton.
func createSkinFromRestTransforms(
) -> Skin? func findBone(name: String
) -> Int32 Returns the bone index that matches
name
as its name. Returns-1
if no bone with this name exists.func forceUpdateAllBoneTransforms(
) Force updates the bone transforms/poses for all bones in the skeleton.
func forceUpdateBoneChildTransform(boneIdx: Int32
) Force updates the bone transform for the bone at
boneIdx
and all of its children.func getAnimatePhysicalBones(
) -> Bool func getBoneChildren(boneIdx: Int32
) -> PackedInt32Array Returns an array containing the bone indexes of all the child node of the passed in bone,
boneIdx
.func getBoneCount(
) -> Int32 Returns the number of bones in the skeleton.
func getBoneGlobalPose(boneIdx: Int32
) -> Transform3D Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual “global” transform of the bone.
func getBoneGlobalPoseNoOverride(boneIdx: Int32
) -> Transform3D Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual “global” transform of the bone.
func getBoneGlobalPoseOverride(boneIdx: Int32
) -> Transform3D Returns the global pose override transform for
boneIdx
.func getBoneGlobalRest(boneIdx: Int32
) -> Transform3D Returns the global rest transform for
boneIdx
.func getBoneName(boneIdx: Int32
) -> String Returns the name of the bone at index
boneIdx
.func getBoneParent(boneIdx: Int32
) -> Int32 Returns the bone index which is the parent of the bone at
boneIdx
. If -1, then bone has no parent.func getBonePose(boneIdx: Int32
) -> Transform3D Returns the pose transform of the specified bone.
func getBonePosePosition(boneIdx: Int32
) -> Vector3 Returns the pose position of the bone at
boneIdx
. The returnedVector3
is in the local coordinate space of theSkeleton3D
node.func getBonePoseRotation(boneIdx: Int32
) -> Quaternion Returns the pose rotation of the bone at
boneIdx
. The returnedQuaternion
is local to the bone with respect to the rotation of any parent bones.func getBonePoseScale(boneIdx: Int32
) -> Vector3 Returns the pose scale of the bone at
boneIdx
.func getBoneRest(boneIdx: Int32
) -> Transform3D Returns the rest transform for a bone
boneIdx
.func getConcatenatedBoneNames(
) -> StringName Returns all bone names concatenated with commas (
,
) as a singleStringName
.func getParentlessBones(
) -> PackedInt32Array Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton.
func getVersion(
) -> UInt Returns the number of times the bone hierarchy has changed within this skeleton, including renames.
func isBoneEnabled(boneIdx: Int32
) -> Bool Returns whether the bone pose for the bone at
boneIdx
is enabled.func localizeRests(
) Returns all bones in the skeleton to their rest poses.
func physicalBonesAddCollisionException(RID
) Adds a collision exception to the physical bone.
func physicalBonesRemoveCollisionException(RID
) Removes a collision exception to the physical bone.
func physicalBonesStartSimulation(bones: VariantCollection<StringName>
) Tells the
PhysicalBone3D
nodes in the Skeleton to start simulating and reacting to the physics world.func physicalBonesStopSimulation(
) Tells the
PhysicalBone3D
nodes in the Skeleton to stop simulating.func registerSkin(Skin?
) -> SkinReference? Binds the given Skin to the Skeleton.
func resetBonePose(boneIdx: Int32
) Sets the bone pose to rest for
boneIdx
.func resetBonePoses(
) Sets all bone poses to rests.
func setAnimatePhysicalBones(enabled: Bool
) This method exists for compatibility with old structures in which the
Skeleton3D
does not have aPhysicalBoneSimulator3D
as a child, but directly hasPhysicalBone3D
s as children.func setBoneEnabled(boneIdx: Int32, enabled: Bool
) Disables the pose for the bone at
boneIdx
iffalse
, enables the bone pose iftrue
.func setBoneGlobalPose(boneIdx: Int32, pose: Transform3D
) Sets the global pose transform,
pose
, for the bone atboneIdx
.func setBoneGlobalPoseOverride(boneIdx: Int32, pose: Transform3D, amount: Double, persistent: Bool
) Sets the global pose transform,
pose
, for the bone atboneIdx
.func setBoneName(boneIdx: Int32, name: String
) Sets the bone name,
name
, for the bone atboneIdx
.func setBoneParent(boneIdx: Int32, parentIdx: Int32
) Sets the bone index
parentIdx
as the parent of the bone atboneIdx
. If -1, then bone has no parent.func setBonePose(boneIdx: Int32, pose: Transform3D
) Sets the pose transform,
pose
, for the bone atboneIdx
.func setBonePosePosition(boneIdx: Int32, position: Vector3
) Sets the pose position of the bone at
boneIdx
toposition
.position
is aVector3
describing a position local to theSkeleton3D
node.func setBonePoseRotation(boneIdx: Int32, rotation: Quaternion
) Sets the pose rotation of the bone at
boneIdx
torotation
.rotation
is aQuaternion
describing a rotation in the bone’s local coordinate space with respect to the rotation of any parent bones.func setBonePoseScale(boneIdx: Int32, scale: Vector3
) Sets the pose scale of the bone at
boneIdx
toscale
.func setBoneRest(boneIdx: Int32, rest: Transform3D
) Sets the rest transform for bone
boneIdx
.func unparentBoneAndRest(boneIdx: Int32
) Unparents the bone at
boneIdx
and sets its rest position to that of its parent prior to being reset.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.