public abstract class PhysicsJoint extends NativePhysicsObject
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger
message logger for this class
|
loggerN| Modifier | Constructor and Description |
|---|---|
protected |
PhysicsJoint()
Instantiate a PhysicsJoint.
|
| Modifier and Type | Method and Description |
|---|---|
int |
countEnds()
Count how many ends this joint has.
|
void |
destroy()
Remove this joint from the joint lists of both ends.
|
JointEnd |
findEnd(PhysicsBody body)
Test whether the specified body is an end of this joint.
|
PhysicsBody |
findOtherBody(PhysicsBody body)
Access the remaining body of this joint.
|
PhysicsBody |
getBody(JointEnd end)
Access the body at the specified end of this joint.
|
PhysicsBody |
getBodyA()
Access the body at the joint's "A" end.
|
PhysicsBody |
getBodyB()
Access the body at the joint's "B" end.
|
PhysicsSpace |
getPhysicsSpace()
Access the PhysicsSpace where this joint is added.
|
abstract boolean |
isEnabled()
Test whether this joint is enabled.
|
protected void |
setBodyA(PhysicsBody body)
Specify the body at the joint's "A" end.
|
protected void |
setBodyB(PhysicsBody body)
Specify the body at the joint's "B" end.
|
protected void |
setNativeId(long jointId)
Initialize the native ID.
|
void |
setPhysicsSpace(PhysicsSpace physicsSpace)
Alter which PhysicsSpace this joint is added to.
|
java.lang.String |
toString()
Represent this joint as a String.
|
compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeIdNotTracked, unassignNativeObjectpublic static final java.util.logging.Logger logger
protected PhysicsJoint()
This no-arg constructor was made explicit to avoid javadoc warnings from JDK 18+.
public int countEnds()
public void destroy()
public JointEnd findEnd(PhysicsBody body)
body - the body to find (not null, unaffected)public PhysicsBody findOtherBody(PhysicsBody body)
body - (not null, unaffected)public PhysicsBody getBody(JointEnd end)
end - which end of the joint to access (not null)public PhysicsBody getBodyA()
public PhysicsBody getBodyB()
public PhysicsSpace getPhysicsSpace()
public abstract boolean isEnabled()
public void setPhysicsSpace(PhysicsSpace physicsSpace)
physicsSpace - (may be null)protected final void setBodyA(PhysicsBody body)
body - the desired body (not null, alias created)protected final void setBodyB(PhysicsBody body)
body - the desired body (not null, alias created)protected void setNativeId(long jointId)
setNativeId in class NativePhysicsObjectjointId - the native identifier of the btTypedConstraint,
btSoftBody::Anchor, or btSoftBody::Joint (not zero)public java.lang.String toString()
toString in class NativePhysicsObject