Package com.jme3.bullet.objects
Class ReducedDeformableBody
java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.collision.PhysicsCollisionObject
com.jme3.bullet.objects.PhysicsBody
com.jme3.bullet.objects.PhysicsSoftBody
com.jme3.bullet.objects.ReducedDeformableBody
- All Implemented Interfaces:
Comparable<NativePhysicsObject>
A simplified soft body embedded in a rigid frame, based on Bullet's
btReducedDeformableBody.
-
Field Summary
FieldsFields inherited from class com.jme3.bullet.objects.PhysicsSoftBody
logger2Fields inherited from class com.jme3.bullet.objects.PhysicsBody
massForStaticFields inherited from class com.jme3.bullet.collision.PhysicsCollisionObject
COLLISION_GROUP_01, COLLISION_GROUP_02, COLLISION_GROUP_03, COLLISION_GROUP_04, COLLISION_GROUP_05, COLLISION_GROUP_06, COLLISION_GROUP_07, COLLISION_GROUP_08, COLLISION_GROUP_09, COLLISION_GROUP_10, COLLISION_GROUP_11, COLLISION_GROUP_12, COLLISION_GROUP_13, COLLISION_GROUP_14, COLLISION_GROUP_15, COLLISION_GROUP_16, COLLISION_GROUP_NONE, loggerFields inherited from class com.jme3.bullet.NativePhysicsObject
loggerN -
Constructor Summary
ConstructorsConstructorDescriptionReducedDeformableBody(Vector3f[] locations, float[] masses) Instantiate a deformable body with the specified nodes. -
Method Summary
Modifier and TypeMethodDescriptiongetLinearVelocity(Vector3f storeResult) Copy the rigid velocity.booleanTest whether reduced modes are enabled.protected voidCreate an emptybtReducedDeformableBodyfor this ReducedDeformableBody, using the pre-existing worldInfo.voidpinNode(int nodeIndex) Pin a node.voidsetDamping(float alpha, float beta) Alter the Rayleigh damping parameters.voidsetLinearVelocity(Vector3f velocity) Alter the rigid velocity.voidsetReducedModes(int numReduced, int numFull) Alter the number of modes.voidsetReducedModesEnabled(boolean enable) Enable/disable reduced modes.voidsetStiffnessScale(float scale) Alter the stiffness scale.Methods inherited from class com.jme3.bullet.objects.PhysicsSoftBody
addVelocity, addVelocity, appendFaces, appendLinks, appendNodes, appendTetras, applyForce, applyForce, applyRotation, applyScale, applyTransform, applyTranslation, boundingBox, clusterCenter, copyClusterCenters, copyClusterMasses, copyClusterVelocities, copyFaces, copyLinks, copyLocations, copyMasses, copyNormals, copyTetras, copyVelocities, countClusters, countFaces, countLinks, countNodes, countNodesInCluster, countPinnedNodes, countTetras, cutLink, destroySoftBody, generateBendingConstraints, generateClusters, generateClusters, get, getGravity, getMass, getPhysicsLocation, getPhysicsLocationDp, getPhysicsRotation, getPhysicsRotationDp, getPhysicsRotationMatrix, getPhysicsRotationMatrixDp, getScale, getSoftConfig, getSoftMaterial, getWorldInfo, initDefault, isCollisionAllowed, isEmpty, isWorldInfoProtected, listNodesInCluster, margin, nodeLocation, nodeMass, nodeNormal, nodeVelocity, randomizeConstraints, releaseAllClusters, releaseCluster, resetRestingLengths, restingLengthsScale, set, setConfig, setGravity, setMargin, setMass, setMassByArea, setMassByCurrent, setMasses, setMassFromDensity, setNodeMass, setNodeVelocity, setNormals, setPhysicsLocation, setPhysicsLocationDp, setPose, setProtectWorldInfo, setRestingLengthScale, setVelocities, setVelocity, setVolumeDensity, setVolumeMass, setWindVelocity, setWorldInfo, setWorldInfoInternal, volume, windVelocityMethods inherited from class com.jme3.bullet.objects.PhysicsBody
addJoint, countJoints, getDeactivationDeadline, isDeactivationEnabled, listJoints, removeJoint, setDeactivationDeadline, setDeactivationEnabledMethods inherited from class com.jme3.bullet.collision.PhysicsCollisionObject
activate, addCollideWithGroup, addToIgnoreList, attachCollisionShape, clearIgnoreList, collisionFlags, copyPcoProperties, countIgnored, finalizeNative, findInstance, getActivationState, getAnisotropicFriction, getCcdMotionThreshold, getCcdSquareMotionThreshold, getCcdSweptSphereRadius, getCollideWithGroups, getCollisionGroup, getCollisionShape, getCollisionSpace, getContactDamping, getContactProcessingThreshold, getContactStiffness, getDeactivationTime, getFriction, getInternalType, getRestitution, getRollingFriction, getSpinningFriction, getTransform, getTransformDp, getUserObject, hasAnisotropicFriction, ignores, initUserPointer, isActive, isContactResponse, isInWorld, isStatic, listIgnoredPcos, proxyGroup, proxyMask, removeCollideWithGroup, removeFromIgnoreList, setActivationState, setAnisotropicFriction, setCcdMotionThreshold, setCcdSweptSphereRadius, setCollideWithGroups, setCollisionFlags, setCollisionGroup, setCollisionShape, setContactDamping, setContactProcessingThreshold, setContactStiffness, setDeactivationTime, setFriction, setIgnoreList, setLocationAndBasis, setRestitution, setRollingFriction, setSpinningFriction, setUserIndex, setUserIndex2, setUserIndex3, setUserObject, spaceId, toString, userIndex, userIndex2, userIndex3Methods inherited from class com.jme3.bullet.NativePhysicsObject
compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, unassignNativeObject
-
Field Details
-
logger3
message logger for this class
-
-
Constructor Details
-
ReducedDeformableBody
Instantiate a deformable body with the specified nodes. The new body is not added to any physics space.- Parameters:
locations- the initial node locations (not null, alias created)masses- the initial node masses (not null, each ≥0, alias created)
-
-
Method Details
-
getLinearVelocity
Copy the rigid velocity.- Parameters:
storeResult- storage for the result (modified if not null)- Returns:
- a velocity vector (physics-space units per second in physics-space coordinates, either storeResult or a new vector)
-
isReducedModesEnabled
public boolean isReducedModesEnabled()Test whether reduced modes are enabled.- Returns:
- true if enabled, false if rigid-only
-
pinNode
public void pinNode(int nodeIndex) Pin a node.- Parameters:
nodeIndex- the index of the node (≥0)
-
setDamping
public void setDamping(float alpha, float beta) Alter the Rayleigh damping parameters.- Parameters:
alpha- the desired alpha value (default=0)beta- the desired beta value (default=0)
-
setLinearVelocity
Alter the rigid velocity.- Parameters:
velocity- the desired value (not null, unaffected)
-
setReducedModes
public void setReducedModes(int numReduced, int numFull) Alter the number of modes.- Parameters:
numReduced- the number of reduced modes (default=0)numFull- the number of full modes (default=0)
-
setReducedModesEnabled
public void setReducedModesEnabled(boolean enable) Enable/disable reduced modes.- Parameters:
enable- true to enabled reduced modes, false for rigid-only (default=true)
-
setStiffnessScale
public void setStiffnessScale(float scale) Alter the stiffness scale.- Parameters:
scale- the desired scale (default=1)
-
newEmptySoftBody
protected void newEmptySoftBody()Create an emptybtReducedDeformableBodyfor this ReducedDeformableBody, using the pre-existing worldInfo. The pre-existing btReducedDeformableBody (if any) will be destroyed.- Overrides:
newEmptySoftBodyin classPhysicsSoftBody
-