public abstract class SoftPhysicsJoint extends PhysicsJoint
To join a particular *node* of a soft body to a rigid body, use an Anchor instead.
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
loggerloggerN| Modifier | Constructor and Description |
|---|---|
protected |
SoftPhysicsJoint(PhysicsSoftBody softBodyA,
int clusterIndexA,
PhysicsRigidBody rigidBodyB)
Instantiate a SoftPhysicsJoint to join a soft-body cluster and a rigid
body.
|
protected |
SoftPhysicsJoint(PhysicsSoftBody softBodyA,
int clusterIndexA,
PhysicsSoftBody softBodyB,
int clusterIndexB)
Instantiate a SoftPhysicsJoint to join 2 soft bodies.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkParameters()
Compare Bullet parameters against their local copies.
|
int |
clusterIndexA()
Read the index of the cluster for the A end.
|
int |
clusterIndexB()
Read the index of the cluster for the B end.
|
protected static void |
finalizeNative(long jointId)
Finalize the
btTypedConstraint. |
float |
getCFM()
Read the constraint force mixing coefficient (aka CFM).
|
float |
getERP()
Read the error-reduction parameter (aka ERP).
|
PhysicsSoftBody |
getSoftBodyA()
Access the soft body at the A end.
|
PhysicsSoftBody |
getSoftBodyB()
Access the soft body at the B end.
|
float |
getSplit()
Return the split.
|
boolean |
isEnabled()
Test whether this joint is enabled.
|
boolean |
isSoftRigid()
Test whether this joint is a soft-rigid joint.
|
boolean |
isSoftSoft()
Test whether this joint is a soft-soft joint.
|
void |
setCFM(float cfm)
Set the constraint force mixing coefficient (aka CFM).
|
void |
setERP(float erp)
Set the error-reduction parameter (aka ERP).
|
void |
setSplit(float split)
Alter the split.
|
countEnds, destroy, findEnd, findOtherBody, getBody, getBodyA, getBodyB, getPhysicsSpace, setBodyA, setBodyB, setNativeId, setPhysicsSpace, toStringcompareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeIdNotTracked, unassignNativeObjectpublic static final java.util.logging.Logger logger2
protected SoftPhysicsJoint(PhysicsSoftBody softBodyA, int clusterIndexA, PhysicsRigidBody rigidBodyB)
To be fully effective, the joint must be added to the PhysicsSoftSpace of both bodies.
softBodyA - the soft body for the A end (not null, alias created)clusterIndexA - the index of the cluster for the A end (≥0)rigidBodyB - the rigid body for the B end (not null, alias created)protected SoftPhysicsJoint(PhysicsSoftBody softBodyA, int clusterIndexA, PhysicsSoftBody softBodyB, int clusterIndexB)
To be effective, the joint must be added to the PhysicsSoftSpace of both bodies. Also, the bodies must be distinct.
softBodyA - the body for the A end (not null, alias created)clusterIndexA - the index of the cluster for the A end (≥0)softBodyB - the body for the B end (not null, alias created)clusterIndexB - the index of the cluster for the B end (≥0)public boolean checkParameters()
public int clusterIndexA()
public int clusterIndexB()
public float getCFM()
From the Bullet documentation:
public float getERP()
From the Bullet documentation:
The ERP specifies what proportion of the joint error will be fixed during the next simulation step.
public PhysicsSoftBody getSoftBodyA()
public PhysicsSoftBody getSoftBodyB()
public float getSplit()
public boolean isSoftRigid()
public boolean isSoftSoft()
public void setCFM(float cfm)
From the Bullet documentation:
Setting CFM to a negative value can cause instability.
cfm - the desired coefficient value (≥0, default=1)public void setERP(float erp)
From the Bullet documentation:
The ERP specifies what proportion of the joint error will be fixed during the next simulation step.
erp - the desired parameter value (≥0, ≤1, default=1)public void setSplit(float split)
split - the desired split value (default=1)protected static void finalizeNative(long jointId)
btTypedConstraint.jointId - identifier of the btSoftBody::Joint (not zero)public boolean isEnabled()
isEnabled in class PhysicsJoint