SkeletonRagdoll class final

A Skeleton gone limp: the NativeRagdoll built from it by a RagdollProfile, and the writing of its bodies back into the joints.

Built from the pose the skeleton holds; apply each frame after the world steps, lying once it settles, and dispose or a RagdollGetUp to take the bodies out of the world.

Constructors

SkeletonRagdoll({required Skeleton skeleton, required Matrix4 meshToScene, required NativeWorld world, RagdollProfile profile = RagdollProfile.quaternius, double mass = referenceBodyMass, List<Matrix4>? previous, double dt = 1.0 / 60.0, JointTissue tissue = JointTissue.human, MuscleTone? tone = MuscleTone.human, NativeDynamics? dynamics, int layer = 1, int mask = 0xffffffff})
skeleton gone limp in world from the pose it holds now, mass kilograms in all — the reference man's (referenceBodyMass) unless given. tissue is what every joint is made of and tone how its muscles hold it as it goes limp, null for none; see NativeRagdoll. The profile's RagdollSwings are measured against the figure's own forward and up at bind, read off its skeleton as lying reads them. meshToScene is the skinned mesh's world matrix, which the skeleton's bind pose is in. With previous — every joint's world matrix dt seconds ago — the bodies keep the motion the animation had.

Properties

hashCode → int
The hash code for this object.
no setterinherited
profile → RagdollProfile
Which joints became bodies and which ride on one.
final
ragdoll → NativeRagdoll
The bodies, to strike one or ask whether they sleep.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skeleton → Skeleton
The skeleton whose joints apply writes the bodies into.
final

Methods

apply({double weight = 1.0}) → void
The ragdoll's pose into the joints: all of it at weight one, none at nought, between them a blend with what the joints hold now — which is the animation's pose when its player was updated this frame first. A character getting up is this with weight falling to nought.
bodyNamed(String name) → int?
The body standing for the joint called name; null for one that is not a body.
dispose() → void
Takes the bodies out of the world. The joints keep the last pose written to them.
lying() → RagdollLying
How the body lies now, read off its pelvis: whether the chest faces up, where the pelvis is, and which way along the floor the head lies from it — what a game picks a get-up clip by and places the character it gets up as.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited