Package com.jme3.bullet.animation
Class TorsoLink
java.lang.Object
com.jme3.bullet.animation.PhysicsLink
com.jme3.bullet.animation.TorsoLink
- All Implemented Interfaces:
Savable
,JmeCloneable
,Cloneable
Link the torso of an animated model to a rigid body in a ragdoll.
This class is shared between JBullet and Native Bullet.
-
Field Summary
Fields inherited from class com.jme3.bullet.animation.PhysicsLink
logger
-
Constructor Summary
ModifierConstructorDescriptionprotected
No-argument constructor needed by SavableClassUtil. -
Method Summary
Modifier and TypeMethodDescriptionvoid
blendToKinematicMode
(KinematicSubmode submode, float blendInterval, Transform endModelTransform) Begin blending this link to a purely kinematic mode.void
cloneFields
(Cloner cloner, Object original) Callback fromCloner
to convert this shallow-cloned link into a deep-cloned one, using the specified cloner and original to resolve copied fields.protected void
Update this link in Dynamic mode, setting the local transform of the model's root spatial based on the transform of the linked rigid body.jmeClone()
Create a shallow clone for the JME cloner.protected void
kinematicUpdate
(float tpf) Update this link in blended Kinematic mode.name()
Unambiguously identify this link by name, within its DynamicAnimControl.void
read
(JmeImporter im) De-serialize this link, for example when loading from a J3O file.void
write
(JmeExporter ex) Serialize this link, for example when saving to a J3O file.Methods inherited from class com.jme3.bullet.animation.PhysicsLink
blendToKinematicMode, boneName, countChildren, getBone, getControl, getJoint, getParent, getRigidBody, isKinematic, kinematicWeight, listChildren, localOffset, physicsTransform, setDynamic, setJoint, setParent, setRigidBody
-
Field Details
-
logger2
message logger for this class
-
-
Constructor Details
-
TorsoLink
protected TorsoLink()No-argument constructor needed by SavableClassUtil. Do not invoke directly!
-
-
Method Details
-
blendToKinematicMode
public void blendToKinematicMode(KinematicSubmode submode, float blendInterval, Transform endModelTransform) Begin blending this link to a purely kinematic mode.- Parameters:
submode
- enum value (not null)blendInterval
- the duration of the blend interval (in seconds, ≥0)endModelTransform
- the desired local transform for the controlled spatial when the blend completes or null for no change to local transform (unaffected)
-
cloneFields
Callback fromCloner
to convert this shallow-cloned link into a deep-cloned one, using the specified cloner and original to resolve copied fields.- Specified by:
cloneFields
in interfaceJmeCloneable
- Overrides:
cloneFields
in classPhysicsLink
- Parameters:
cloner
- the cloner that's cloning this link (not null)original
- the instance from which this link was shallow-cloned (unused)
-
dynamicUpdate
protected void dynamicUpdate()Update this link in Dynamic mode, setting the local transform of the model's root spatial based on the transform of the linked rigid body.- Specified by:
dynamicUpdate
in classPhysicsLink
-
jmeClone
Create a shallow clone for the JME cloner.- Specified by:
jmeClone
in interfaceJmeCloneable
- Overrides:
jmeClone
in classPhysicsLink
- Returns:
- a new instance
-
kinematicUpdate
protected void kinematicUpdate(float tpf) Update this link in blended Kinematic mode.- Overrides:
kinematicUpdate
in classPhysicsLink
- Parameters:
tpf
- the time interval between frames (in seconds, ≥0)
-
name
Unambiguously identify this link by name, within its DynamicAnimControl.- Specified by:
name
in classPhysicsLink
- Returns:
- a brief textual description (not null, not empty)
-
read
De-serialize this link, for example when loading from a J3O file.- Specified by:
read
in interfaceSavable
- Overrides:
read
in classPhysicsLink
- Parameters:
im
- importer (not null)- Throws:
IOException
- from importer
-
write
Serialize this link, for example when saving to a J3O file.- Specified by:
write
in interfaceSavable
- Overrides:
write
in classPhysicsLink
- Parameters:
ex
- exporter (not null)- Throws:
IOException
- from exporter
-