Package com.jme3.bullet.animation
Class DacConfiguration
java.lang.Object
com.jme3.bullet.control.AbstractPhysicsControl
com.jme3.bullet.animation.DacConfiguration
- All Implemented Interfaces:
- PhysicsControl,- Savable,- Control,- JmeCloneable,- Cloneable
- Direct Known Subclasses:
- DacLinks
Configure a DynamicAnimControl and access its configuration.
 
This class is shared between JBullet and Native Bullet.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Loggermessage logger for this classstatic final Stringname for the ragdoll's torso, must not be used for any boneFields inherited from class com.jme3.bullet.control.AbstractPhysicsControladded, applyLocal, enabled, space, spatial
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddUnlinkedDescendants(Joint startBone, Collection<Joint> addResult) Add unlinked descendants of the specified bone to the specified collection.voidcloneFields(Cloner cloner, Object original) Callback fromClonerto convert this shallow-cloned control into a deep-cloned one, using the specified cloner and original to resolve copied fields.intCount the linked bones.intCount the links.floatdamping()Read the damping ratio for new rigid bodies.floatRead the event-dispatch impulse threshold of this control.protected StringfindManager(Joint startBone) Find the manager of the specified bone.getJointLimits(String boneName) Access the nominal range of motion for the joint connecting the named linked bone to its parent in the hierarchy.Copy this control's gravitational acceleration for Ragdoll mode.booleanhasBoneLink(String boneName) Test whether a BoneLink exists for the named bone.jmeClone()Create a shallow clone for the JME cloner.voidlink(String boneName, float mass, RangeOfMotion rom) Link the named bone using the specified mass and range of motion.String[]Enumerate all bones with bone links.protected String[]managerMap(Armature skeleton) Create a map from bone indices to the names of the bones that manage them.floatRead the mass of the named bone/torso.voidread(JmeImporter im) De-serialize this control, for example when loading from a J3O file.voidrender(RenderManager rm, ViewPort vp) Render this control.voidsetApplyPhysicsLocal(boolean applyPhysicsLocal) Alter whether physics-space coordinates should match the spatial's local coordinates.voidsetDamping(float dampingRatio) Alter the viscous damping ratio for new rigid bodies.voidsetEventDispatchImpulseThreshold(float threshold) Alter the event-dispatch impulse threshold of this control.voidsetGravity(Vector3f gravity) Alter this control's gravitational acceleration for Ragdoll mode.voidsetJointLimits(String boneName, RangeOfMotion rom) Alter the range of motion of the joint connecting the named BoneLink to its parent in the link hierarchy.voidAlter the mass of the named bone/torso.floatCalculate the ragdoll's total mass.voidunlinkBone(String boneName) Unlink the BoneLink of the named bone.voidwrite(JmeExporter ex) Serialize this control, for example when saving to a J3O file.Methods inherited from class com.jme3.bullet.control.AbstractPhysicsControladdPhysics, applyPhysicsTransform, cloneForSpatial, createSpatialData, getPhysicsSpace, getSpatial, getSpatialRotation, getSpatialTranslation, isApplyPhysicsLocal, isEnabled, removePhysics, removeSpatialData, setEnabled, setPhysicsLocation, setPhysicsRotation, setPhysicsSpace, setSpatial, update
- 
Field Details- 
logger2message logger for this class
- 
torsoNamename for the ragdoll's torso, must not be used for any bone- See Also:
 
 
- 
- 
Method Details- 
countLinkedBonespublic int countLinkedBones()Count the linked bones.- Returns:
- count (≥0)
 
- 
countLinkspublic int countLinks()Count the links.- Returns:
- count (≥0)
 
- 
dampingpublic float damping()Read the damping ratio for new rigid bodies.- Returns:
- the viscous damping ratio (0→no damping, 1→critically damped)
 
- 
eventDispatchImpulseThresholdpublic float eventDispatchImpulseThreshold()Read the event-dispatch impulse threshold of this control.- Returns:
- the threshold value (≥0)
 
- 
getJointLimitsAccess the nominal range of motion for the joint connecting the named linked bone to its parent in the hierarchy.- Parameters:
- boneName- the name of the linked bone (not null, not empty)
- Returns:
- the pre-existing instance (not null)
 
- 
gravityCopy this control's gravitational acceleration for Ragdoll mode.- Parameters:
- storeResult- storage for the result (modified if not null)
- Returns:
- an acceleration vector (in physics-space coordinates, either storeResult or a new vector, not null)
 
- 
hasBoneLinkTest whether a BoneLink exists for the named bone.- Parameters:
- boneName- the name of the bone (may be null)
- Returns:
- true if found, otherwise false
 
- 
linkLink the named bone using the specified mass and range of motion.Allowed only when the control is NOT added to a spatial. - Parameters:
- boneName- the name of the bone to link (not null, not empty)
- mass- the desired mass of the bone (>0)
- rom- the desired range of motion (not null)
- See Also:
 
- 
listLinkedBoneNamesEnumerate all bones with bone links.- Returns:
- a new array of bone names (not null, may be empty)
 
- 
massRead the mass of the named bone/torso.- Parameters:
- boneName- the name of the bone/torso (not null)
- Returns:
- the mass (in physics units, >0)
 
- 
setDampingpublic void setDamping(float dampingRatio) Alter the viscous damping ratio for new rigid bodies.- Parameters:
- dampingRatio- the desired damping ratio (non-negative, 0→no damping, 1→critically damped, default=0.6)
 
- 
setEventDispatchImpulseThresholdpublic void setEventDispatchImpulseThreshold(float threshold) Alter the event-dispatch impulse threshold of this control.- Parameters:
- threshold- the desired threshold (≥0)
 
- 
setGravityAlter this control's gravitational acceleration for Ragdoll mode.- Parameters:
- gravity- the desired acceleration vector (in physics-space coordinates, not null, unaffected, default=0,-9.8,0)
 
- 
setJointLimitsAlter the range of motion of the joint connecting the named BoneLink to its parent in the link hierarchy.- Parameters:
- boneName- the name of the BoneLink (not null, not empty)
- rom- the desired range of motion (not null)
 
- 
setMassAlter the mass of the named bone/torso.- Parameters:
- boneName- the name of the bone, or torsoName (not null)
- mass- the desired mass (>0)
 
- 
totalMasspublic float totalMass()Calculate the ragdoll's total mass.- Returns:
- the total mass (>0)
 
- 
unlinkBoneUnlink the BoneLink of the named bone.Allowed only when the control is NOT added to a spatial. - Parameters:
- boneName- the name of the bone to unlink (not null, not empty)
 
- 
addUnlinkedDescendantsAdd unlinked descendants of the specified bone to the specified collection. Note: recursive.- Parameters:
- startBone- the starting bone (not null, unaffected)
- addResult- the collection of bone names to append to (not null, modified)
 
- 
findManagerFind the manager of the specified bone.- Parameters:
- startBone- the bone (not null, unaffected)
- Returns:
- a bone/torso name (not null)
 
- 
managerMapCreate a map from bone indices to the names of the bones that manage them.- Parameters:
- skeleton- (not null, unaffected)
- Returns:
- a new array of bone/torso names (not null)
 
- 
cloneFieldsCallback fromClonerto convert this shallow-cloned control into a deep-cloned one, using the specified cloner and original to resolve copied fields.- Specified by:
- cloneFieldsin interface- JmeCloneable
- Overrides:
- cloneFieldsin class- AbstractPhysicsControl
- Parameters:
- cloner- the cloner that's cloning this control (not null, modified)
- original- the control from which this control was shallow-cloned (not null, unaffected)
 
- 
jmeCloneCreate a shallow clone for the JME cloner.- Returns:
- a new instance
 
- 
readDe-serialize this control, for example when loading from a J3O file.- Specified by:
- readin interface- Savable
- Overrides:
- readin class- AbstractPhysicsControl
- Parameters:
- im- importer (not null)
- Throws:
- IOException- from importer
 
- 
renderRender this control. Invoked once per view port per frame, provided the control is added to a scene. Should be invoked only by a subclass or by the RenderManager.- Specified by:
- renderin interface- Control
- Overrides:
- renderin class- AbstractPhysicsControl
- Parameters:
- rm- the render manager (not null)
- vp- the view port to render (not null)
 
- 
setApplyPhysicsLocalpublic void setApplyPhysicsLocal(boolean applyPhysicsLocal) Alter whether physics-space coordinates should match the spatial's local coordinates.- Overrides:
- setApplyPhysicsLocalin class- AbstractPhysicsControl
- Parameters:
- applyPhysicsLocal- true→match local coordinates, false→match world coordinates (default=false)
 
- 
writeSerialize this control, for example when saving to a J3O file.- Specified by:
- writein interface- Savable
- Overrides:
- writein class- AbstractPhysicsControl
- Parameters:
- ex- exporter (not null)
- Throws:
- IOException- from exporter
 
 
-