|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmex.physics.contact.MutableContactInfo
public class MutableContactInfo
Helper class to specify contact details.
ContactHandlingDetails| Field Summary | |
|---|---|
static java.lang.String |
APPLIED_PROPERTY
|
static java.lang.String |
BOUNCE_PROPERTY
|
static java.lang.String |
DAMPING_COEFFICIENT_PROPERTY
|
static java.lang.String |
FRICTION_DIRECTION_PROPERTY
|
static java.lang.String |
IGNORED_PROPERTY
|
static java.lang.String |
MINIMUM_BOUNCE_VELOCITY_PROPERTY
|
static java.lang.String |
MU_ORTHOGONAL_PROPERTY
|
static java.lang.String |
MU_PROPERTY
|
static java.lang.String |
SLIP_PROPERTY
|
static java.lang.String |
SPRING_CONSTANT_PROPERTY
|
static java.lang.String |
SURFACE_MOTION_PROPERTY
|
| Constructor Summary | |
|---|---|
MutableContactInfo()
Default ctor. |
|
MutableContactInfo(ContactHandlingDetails toCopy)
Copy ctor. |
|
| Method Summary | |
|---|---|
void |
clear()
|
void |
copy(ContactHandlingDetails details)
Copy contact details into this pending contact. |
float |
getBounce()
|
java.lang.Class |
getClassTag()
|
float |
getDampingCoefficient()
If spring constant and damping coefficient are not NaN they make the contact 'softer' like a spring. |
com.jme.math.Vector3f |
getFrictionDirection(com.jme.math.Vector3f store)
Query the direction for the friction - TODO: remove this? |
float |
getMinimumBounceVelocity()
|
float |
getMu()
|
float |
getMuOrthogonal()
|
com.jme.math.Vector3f |
getSecondaryFrictionDirection(com.jme.math.Vector3f store)
Query the direction for the secondary friction - TODO: remove this? |
com.jme.math.Vector2f |
getSlip(com.jme.math.Vector2f store)
|
float |
getSpringConstant()
If spring constant and damping coefficient are not NaN they make the contact 'softer' like a spring. |
com.jme.math.Vector2f |
getSurfaceMotion(com.jme.math.Vector2f store)
|
boolean |
isApplied()
|
boolean |
isIgnored()
|
void |
read(com.jme.util.export.JMEImporter im)
|
void |
setApplied(boolean value)
|
void |
setBounce(float bounce)
Restitution parameter (0..1). |
void |
setDampingCoefficient(float value)
|
void |
setFrictionDirection(com.jme.math.Vector3f direction)
|
void |
setIgnored(boolean value)
|
void |
setMinimumBounceVelocity(float minimumBounceVelocity)
The minimum incoming velocity necessary for bounce (in m/s). |
void |
setMu(float mu)
Coulomb friction coefficient. |
void |
setMuOrthogonal(float muOrthogonal)
Optional Coulomb friction coefficient for orthogonal friction direction (0..Infinity). |
void |
setSecondaryFrictionDirection(com.jme.math.Vector3f direction)
|
void |
setSlip(com.jme.math.Vector2f slip)
The coefficients of force-dependent-slip (FDS). |
void |
setSpringConstant(float value)
|
void |
setSurfaceMotion(com.jme.math.Vector2f motion)
Surface velocity - if set, the contact surface is assumed to be moving independently of the motion of the nodes. |
void |
write(com.jme.util.export.JMEExporter ex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String IGNORED_PROPERTY
public static final java.lang.String MU_PROPERTY
public static final java.lang.String MU_ORTHOGONAL_PROPERTY
public static final java.lang.String BOUNCE_PROPERTY
public static final java.lang.String MINIMUM_BOUNCE_VELOCITY_PROPERTY
public static final java.lang.String SURFACE_MOTION_PROPERTY
public static final java.lang.String SLIP_PROPERTY
public static final java.lang.String APPLIED_PROPERTY
public static final java.lang.String FRICTION_DIRECTION_PROPERTY
public static final java.lang.String SPRING_CONSTANT_PROPERTY
public static final java.lang.String DAMPING_COEFFICIENT_PROPERTY
| Constructor Detail |
|---|
public MutableContactInfo()
public MutableContactInfo(ContactHandlingDetails toCopy)
toCopy - details to copy| Method Detail |
|---|
public boolean isIgnored()
isIgnored in interface ContactHandlingDetailsContactHandlingDetails.isApplied()public void setIgnored(boolean value)
public boolean isApplied()
isApplied in interface ContactHandlingDetailsContactHandlingDetails.isIgnored()public void setApplied(boolean value)
public void clear()
public float getMu()
getMu in interface ContactHandlingDetailssetMu(float)public void setMu(float mu)
Float.POSITIVE_INFINITY.
0 results in a frictionless contact, and infinity results in a contact that
never slips. Note that frictionless contacts are less time consuming to
compute than ones with friction, and infinite friction contacts can be
cheaper than contacts with finite friction. Friction must always be set.
mu - friction coefficientpublic float getMuOrthogonal()
getMuOrthogonal in interface ContactHandlingDetailssetMuOrthogonal(float)public void setMuOrthogonal(float muOrthogonal)
muOrthogonal - othogonal friction coefficientpublic float getBounce()
getBounce in interface ContactHandlingDetailssetBounce(float)public void setBounce(float bounce)
bounce - bouncynesspublic float getMinimumBounceVelocity()
getMinimumBounceVelocity in interface ContactHandlingDetailssetMinimumBounceVelocity(float)public void setMinimumBounceVelocity(float minimumBounceVelocity)
minimumBounceVelocity - new valuepublic void setSurfaceMotion(com.jme.math.Vector2f motion)
motion - new value, (0, 0) for no motion (not NaN)public com.jme.math.Vector2f getSurfaceMotion(com.jme.math.Vector2f store)
getSurfaceMotion in interface ContactHandlingDetailsstore - where to store the retrieved value (null to create a new vector)
setSurfaceMotion(com.jme.math.Vector2f)public void setSlip(com.jme.math.Vector2f slip)
slip - slip vectorpublic com.jme.math.Vector2f getSlip(com.jme.math.Vector2f store)
getSlip in interface ContactHandlingDetailsstore - where to store the retrieved value (null to create a new vector)
setSlip(com.jme.math.Vector2f)public void copy(ContactHandlingDetails details)
details - copy sourcepublic void setFrictionDirection(com.jme.math.Vector3f direction)
public com.jme.math.Vector3f getFrictionDirection(com.jme.math.Vector3f store)
ContactHandlingDetails
getFrictionDirection in interface ContactHandlingDetailsstore - where to put the value, null to create a new Vector
public void setSecondaryFrictionDirection(com.jme.math.Vector3f direction)
public com.jme.math.Vector3f getSecondaryFrictionDirection(com.jme.math.Vector3f store)
ContactHandlingDetails
getSecondaryFrictionDirection in interface ContactHandlingDetailsstore - where to put the value, null to create a new Vector
public final void setSpringConstant(float value)
public final float getSpringConstant()
ContactHandlingDetails
getSpringConstant in interface ContactHandlingDetailsContactHandlingDetails.getDampingCoefficient()public final void setDampingCoefficient(float value)
public final float getDampingCoefficient()
ContactHandlingDetails
getDampingCoefficient in interface ContactHandlingDetailsContactHandlingDetails.getSpringConstant()public java.lang.Class getClassTag()
getClassTag in interface com.jme.util.export.Savable
public void read(com.jme.util.export.JMEImporter im)
throws java.io.IOException
read in interface com.jme.util.export.Savablejava.io.IOException
public void write(com.jme.util.export.JMEExporter ex)
throws java.io.IOException
write in interface com.jme.util.export.Savablejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||