|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.collision.Contact
public class Contact
This class can be used for accessing collision data buffers. Usable only with JavaCollision. Created 11.02.2004 (dd.mm.yyyy)
| Field Summary | |
|---|---|
static int |
BODY_ID1
|
static int |
BODY_ID2
|
static int |
BOUNCE
|
static int |
BOUNCE_VEL
|
static int |
DEPTH
|
static int |
FDIR1
|
protected FloatBuffer |
floatBuf
Buffer holding the float data for these sets of contacts |
static int |
FLOATBUF_CHUNK_SIZE
|
static int |
GEOM_ID1
|
static int |
GEOM_ID2
|
protected int |
index
The current index that this class is working on, if used in that way |
static int |
INTBUF_CHUNK_SIZE
|
protected LongBuffer |
longBuf
Buffer holding the integer data for these sets of contacts |
protected int |
maxContacts
The maximum number of contacts processable |
static int |
MODE
|
static int |
MOTION1
|
static int |
MOTION2
|
static int |
MU
|
static int |
MU2
|
static int |
NORMAL
|
static int |
POSITION
|
static int |
SLIP1
|
static int |
SLIP2
|
static int |
SOFT_CFM
|
static int |
SOFT_ERP
|
| Constructor Summary | |
|---|---|
Contact(JavaCollision jCollision)
Create a new contact collection that sources it's data from the two NIO buffers. |
|
Contact(LongBuffer longBuf,
FloatBuffer floatBuf)
Create a new contact collection that sources it's data from the two NIO buffers. |
|
| Method Summary | |
|---|---|
boolean |
geom1EqualTo(Geom geom)
Tests the passed geom with the first Geom involved and returns true if they are equal. |
boolean |
geom2EqualTo(Geom geom)
Tests the passed geom with the second Geom involved and returns true if they are equal. |
long |
getBodyID1()
|
long |
getBodyID1(int idx)
|
long |
getBodyID2()
|
long |
getBodyID2(int idx)
|
float |
getBounce()
|
float |
getBounce(int idx)
|
float |
getBounceVel()
|
float |
getBounceVel(int idx)
|
float |
getDepth()
|
float |
getDepth(int idx)
|
void |
getFdir1(float[] fdir1)
|
void |
getFdir1(float[] fdir1,
int idx)
|
Geom |
getGeom1()
Returns the first Geom object involved in this contact. |
Geom |
getGeom1(int idx)
Returns the first Geom object involved in this contact. |
Geom |
getGeom2()
Returns the second Geom object involved in this contact. |
Geom |
getGeom2(int idx)
Returns the second Geom object involved in this contact. |
long |
getGeomID1()
Returns the native address of the first Geom object involved in this contact. |
long |
getGeomID1(int idx)
Returns the native address of the first Geom object involved in this contact. |
long |
getGeomID2()
Returns the native address of the second Geom object involved in this contact. |
long |
getGeomID2(int idx)
Returns the native address of the second Geom object involved in this contact. |
int |
getMaxContacts()
Get the total maximum possible contacts that could be used from this set. |
long |
getMode()
Note, if mode = -1 then default surface parameter values are used. |
long |
getMode(int idx)
Note, if mode = -1 then default surface parameter values are used. |
float |
getMotion1()
|
float |
getMotion1(int idx)
|
float |
getMotion2()
|
float |
getMotion2(int idx)
|
float |
getMu()
|
float |
getMu(int idx)
|
float |
getMu2()
|
float |
getMu2(int idx)
|
float[] |
getNormal()
|
void |
getNormal(float[] normal)
|
void |
getNormal(float[] normal,
int idx)
|
float[] |
getNormal(int idx)
|
void |
getNormal(org.openmali.vecmath2.Vector3f normal)
|
void |
getNormal(org.openmali.vecmath2.Vector3f normal,
int idx)
|
float[] |
getPosition()
|
void |
getPosition(float[] position)
|
void |
getPosition(float[] position,
int idx)
|
float[] |
getPosition(int idx)
|
void |
getPosition(org.openmali.vecmath2.Tuple3f position)
|
void |
getPosition(org.openmali.vecmath2.Tuple3f position,
int idx)
|
float |
getSlip1()
|
float |
getSlip1(int idx)
|
float |
getSlip2()
|
float |
getSlip2(int idx)
|
float |
getSoftCfm()
|
float |
getSoftCfm(int idx)
|
float |
getSoftErp()
|
float |
getSoftErp(int idx)
|
void |
ignoreContact()
Ignore contact so it does not affect to simulation. |
void |
nextContact()
Increment the internal working index by one to access the next contact. |
void |
setBodyID1(int id)
|
void |
setBodyID1(int id,
int idx)
|
void |
setBodyID2(int id,
int idx)
|
void |
setBodyID2(long id)
|
void |
setBounce(float bounce)
|
void |
setBounce(float bounce,
int idx)
|
void |
setBounceVel(float bounceVel)
|
void |
setBounceVel(float bounceVel,
int idx)
|
void |
setDepth(float depth)
|
void |
setDepth(float depth,
int idx)
|
void |
setFdir1(float[] fdir1)
|
void |
setFdir1(float[] fdir1,
int idx)
|
void |
setFdir1(org.openmali.vecmath2.Vector3f fdir1)
|
void |
setFdir1(org.openmali.vecmath2.Vector3f fdir1,
int idx)
|
void |
setGeomID1(long id)
|
void |
setGeomID1(long id,
int idx)
|
void |
setGeomID2(long id)
|
void |
setGeomID2(long id,
int idx)
|
void |
setIndex(int index)
Set the working index to the the given value. |
void |
setMode(int mode)
Note, if mode = -1 then default surface parameter values are used. |
void |
setMode(int mode,
int idx)
Note, if mode = -1 then default surface parameter values are used. |
void |
setMotion1(float motion1)
|
void |
setMotion1(float motion1,
int idx)
|
void |
setMotion2(float motion2)
|
void |
setMotion2(float motion2,
int idx)
|
void |
setMu(float mu)
|
void |
setMu(float mu,
int idx)
|
void |
setMu2(float mu2)
|
void |
setMu2(float mu2,
int idx)
|
void |
setNormal(float[] normal)
|
void |
setNormal(float[] normal,
int idx)
|
void |
setNormal(org.openmali.vecmath2.Vector3f normal)
|
void |
setNormal(org.openmali.vecmath2.Vector3f normal,
int idx)
|
void |
setPosition(float[] position)
|
void |
setPosition(float[] position,
int idx)
|
void |
setPosition(org.openmali.vecmath2.Tuple3f position)
|
void |
setPosition(org.openmali.vecmath2.Tuple3f position,
int idx)
|
void |
setSlip1(float slip1)
|
void |
setSlip1(float slip1,
int idx)
|
void |
setSlip2(float slip2)
|
void |
setSlip2(float slip2,
int idx)
|
void |
setSoftCfm(float softCfm)
|
void |
setSoftCfm(float softCfm,
int idx)
|
void |
setSoftErp(float softErp)
|
void |
setSoftErp(float softErp,
int idx)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INTBUF_CHUNK_SIZE
public static final int GEOM_ID1
public static final int GEOM_ID2
public static final int BODY_ID1
public static final int BODY_ID2
public static final int MODE
public static final int FLOATBUF_CHUNK_SIZE
public static final int POSITION
public static final int NORMAL
public static final int DEPTH
public static final int FDIR1
public static final int MU
public static final int MU2
public static final int BOUNCE
public static final int BOUNCE_VEL
public static final int SOFT_ERP
public static final int SOFT_CFM
public static final int MOTION1
public static final int MOTION2
public static final int SLIP1
public static final int SLIP2
protected LongBuffer longBuf
protected FloatBuffer floatBuf
protected int index
protected int maxContacts
| Constructor Detail |
|---|
public Contact(LongBuffer longBuf,
FloatBuffer floatBuf)
longBuf - The integer data sourcefloatBuf - The floating point data sourcepublic Contact(JavaCollision jCollision)
jCollision - the JavaCollision to take the buffers from| Method Detail |
|---|
public void setIndex(int index)
index - The new index to use
ArrayIndexOutOfBoundsException - Passed the end of the arraypublic void nextContact()
ArrayIndexOutOfBoundsException - Passed the end of the arraypublic int getMaxContacts()
JavaCollision.getContactCount() method.
public void ignoreContact()
public long getGeomID1()
Geom.getNativeAddr(),
Geom.getGeomFromNativeAddr(long)public long getGeomID1(int idx)
Geom.getNativeAddr(),
Geom.getGeomFromNativeAddr(long)public Geom getGeom1()
public Geom getGeom1(int idx)
public void setGeomID1(long id)
public void setGeomID1(long id,
int idx)
public long getGeomID2()
Geom.getNativeAddr(),
Geom.getGeomFromNativeAddr(long)public long getGeomID2(int idx)
Geom.getNativeAddr(),
Geom.getGeomFromNativeAddr(long)public Geom getGeom2()
public Geom getGeom2(int idx)
public boolean geom1EqualTo(Geom geom)
geom - the geom to test
public boolean geom2EqualTo(Geom geom)
geom - the geom to test
public void setGeomID2(long id)
public void setGeomID2(long id,
int idx)
public long getBodyID1()
public long getBodyID1(int idx)
public void setBodyID1(int id)
public void setBodyID1(int id,
int idx)
public long getBodyID2()
public long getBodyID2(int idx)
public void setBodyID2(long id)
public void setBodyID2(int id,
int idx)
public long getMode()
public long getMode(int idx)
public void setMode(int mode)
mode - of surface contact
public void setMode(int mode,
int idx)
mode - of surface contactpublic void getPosition(org.openmali.vecmath2.Tuple3f position)
public void getPosition(org.openmali.vecmath2.Tuple3f position,
int idx)
public void getPosition(float[] position)
public void getPosition(float[] position,
int idx)
public float[] getPosition()
public float[] getPosition(int idx)
public void setPosition(float[] position)
public void setPosition(org.openmali.vecmath2.Tuple3f position)
public void setPosition(float[] position,
int idx)
public void setPosition(org.openmali.vecmath2.Tuple3f position,
int idx)
public void getNormal(org.openmali.vecmath2.Vector3f normal)
public void getNormal(org.openmali.vecmath2.Vector3f normal,
int idx)
public void getNormal(float[] normal)
public void getNormal(float[] normal,
int idx)
public float[] getNormal()
public float[] getNormal(int idx)
public void setNormal(float[] normal)
public void setNormal(org.openmali.vecmath2.Vector3f normal)
public void setNormal(float[] normal,
int idx)
public void setNormal(org.openmali.vecmath2.Vector3f normal,
int idx)
public float getDepth()
public float getDepth(int idx)
public void setDepth(float depth)
public void setDepth(float depth,
int idx)
public void getFdir1(float[] fdir1)
public void getFdir1(float[] fdir1,
int idx)
public void setFdir1(float[] fdir1)
public void setFdir1(org.openmali.vecmath2.Vector3f fdir1)
public void setFdir1(float[] fdir1,
int idx)
public void setFdir1(org.openmali.vecmath2.Vector3f fdir1,
int idx)
public float getMu()
public float getMu(int idx)
public void setMu(float mu)
public void setMu(float mu,
int idx)
public float getMu2()
public float getMu2(int idx)
public void setMu2(float mu2)
public void setMu2(float mu2,
int idx)
public float getBounce()
public float getBounce(int idx)
public void setBounce(float bounce)
public void setBounce(float bounce,
int idx)
public float getBounceVel()
public float getBounceVel(int idx)
public void setBounceVel(float bounceVel)
public void setBounceVel(float bounceVel,
int idx)
public float getSoftErp()
public float getSoftErp(int idx)
public void setSoftErp(float softErp)
public void setSoftErp(float softErp,
int idx)
public float getSoftCfm()
public float getSoftCfm(int idx)
public void setSoftCfm(float softCfm)
public void setSoftCfm(float softCfm,
int idx)
public float getMotion1()
public float getMotion1(int idx)
public void setMotion1(float motion1)
public void setMotion1(float motion1,
int idx)
public float getMotion2()
public float getMotion2(int idx)
public void setMotion2(float motion2)
public void setMotion2(float motion2,
int idx)
public float getSlip1()
public float getSlip1(int idx)
public void setSlip1(float slip1)
public void setSlip1(float slip1,
int idx)
public float getSlip2()
public float getSlip2(int idx)
public void setSlip2(float slip2)
public void setSlip2(float slip2,
int idx)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||