Package com.jme3.bullet.joints
Class SoftAngularJoint
java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.joints.PhysicsJoint
com.jme3.bullet.joints.SoftPhysicsJoint
com.jme3.bullet.joints.SoftAngularJoint
- All Implemented Interfaces:
- com.jme3.export.Savable,- com.jme3.util.clone.JmeCloneable,- Cloneable,- Comparable<NativePhysicsObject>
A SoftPhysicsJoint that allows rotation around an axis, based on Bullet's
 btSoftBody::AJoint.
- 
Field SummaryFieldsFields inherited from class com.jme3.bullet.joints.SoftPhysicsJointlogger2Fields inherited from class com.jme3.bullet.joints.PhysicsJointloggerFields inherited from class com.jme3.bullet.NativePhysicsObjectloggerN
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedNo-argument constructor needed by SavableClassUtil.SoftAngularJoint(com.jme3.math.Vector3f axis, PhysicsSoftBody softA, int clusterIndexA, PhysicsRigidBody rigidB) Instantiate a soft-rigid angular joint.SoftAngularJoint(com.jme3.math.Vector3f axis, PhysicsSoftBody softA, int clusterIndexA, PhysicsSoftBody softB, int clusterIndexB) Instantiate a soft-soft angular joint.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcloneFields(com.jme3.util.clone.Cloner cloner, Object original) Callback fromClonerto convert this shallow-cloned joint into a deep-cloned one, using the specified Cloner and original to resolve copied fields.com.jme3.math.Vector3fcopyAxis(com.jme3.math.Vector3f storeResult) Copy the joint axis.voidread(com.jme3.export.JmeImporter importer) De-serialize this joint from the specified importer, for example when loading from a J3O file.voidsetAxis(com.jme3.math.Vector3f newAxis) Alter the joint axis.voidwrite(com.jme3.export.JmeExporter exporter) Serialize this joint to the specified exporter, for example when saving to a J3O file.Methods inherited from class com.jme3.bullet.joints.SoftPhysicsJointcheckParameters, clusterIndexA, clusterIndexB, finalizeNative, getCFM, getERP, getSoftBodyA, getSoftBodyB, getSplit, isEnabled, isSoftRigid, isSoftSoft, setCFM, setERP, setSplitMethods inherited from class com.jme3.bullet.joints.PhysicsJointcountEnds, destroy, findEnd, findOtherBody, getBody, getBodyA, getBodyB, getPhysicsSpace, jmeClone, setBodyA, setBodyB, setNativeId, setPhysicsSpace, toStringMethods inherited from class com.jme3.bullet.NativePhysicsObjectcompareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeIdNotTracked, unassignNativeObject
- 
Field Details- 
logger3message logger for this class
 
- 
- 
Constructor Details- 
SoftAngularJointprotected SoftAngularJoint()No-argument constructor needed by SavableClassUtil.
- 
SoftAngularJointpublic SoftAngularJoint(com.jme3.math.Vector3f axis, PhysicsSoftBody softA, int clusterIndexA, PhysicsRigidBody rigidB) Instantiate a soft-rigid angular joint.- Parameters:
- axis- the axis of the joint (in physics-space coordinates, not null, unaffected)
- softA- the soft body for the A end (not null, alias created)
- clusterIndexA- the index of the cluster for the A end (≥0)
- rigidB- the rigid body for the B end (not null, alias created)
 
- 
SoftAngularJointpublic SoftAngularJoint(com.jme3.math.Vector3f axis, PhysicsSoftBody softA, int clusterIndexA, PhysicsSoftBody softB, int clusterIndexB) Instantiate a soft-soft angular joint. Each soft body must contain a cluster.- Parameters:
- axis- the axis of the joint (in physics-space coordinates, not null, unaffected)
- softA- the soft body for the A end (not null, alias created)
- clusterIndexA- the index of the cluster for the A end (≥0)
- softB- the soft body for the B end (not null, alias created)
- clusterIndexB- the index of the cluster for the B end (≥0)
 
 
- 
- 
Method Details- 
copyAxispublic com.jme3.math.Vector3f copyAxis(com.jme3.math.Vector3f storeResult) Copy the joint axis.- Parameters:
- storeResult- storage for the result (modified if not null)
- Returns:
- the axis (in physics-space coordinates, either storeResult or a new vector, not null)
 
- 
setAxispublic void setAxis(com.jme3.math.Vector3f newAxis) Alter the joint axis.- Parameters:
- newAxis- the desired axis (in physics-space coordinates, not null, unaffected)
 
- 
cloneFieldsCallback fromClonerto convert this shallow-cloned joint into a deep-cloned one, using the specified Cloner and original to resolve copied fields.- Specified by:
- cloneFieldsin interface- com.jme3.util.clone.JmeCloneable
- Overrides:
- cloneFieldsin class- PhysicsJoint
- Parameters:
- cloner- the Cloner that's cloning this joint (not null)
- original- the instance from which this joint was shallow-cloned (not null, unaffected)
 
- 
readDe-serialize this joint from the specified importer, for example when loading from a J3O file.- Specified by:
- readin interface- com.jme3.export.Savable
- Overrides:
- readin class- SoftPhysicsJoint
- Parameters:
- importer- (not null)
- Throws:
- IOException- from the importer
 
- 
writeSerialize this joint to the specified exporter, for example when saving to a J3O file.- Specified by:
- writein interface- com.jme3.export.Savable
- Overrides:
- writein class- SoftPhysicsJoint
- Parameters:
- exporter- (not null)
- Throws:
- IOException- from the exporter
 
 
-