public abstract class Contact
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BULLET_HIT_FLAG |
static int |
ENABLED_FLAG |
static int |
FILTER_FLAG |
static int |
ISLAND_FLAG |
Fixture |
m_fixtureA |
Fixture |
m_fixtureB |
int |
m_flags |
float |
m_friction |
int |
m_indexA |
int |
m_indexB |
Manifold |
m_manifold |
Contact |
m_next |
ContactEdge |
m_nodeA |
ContactEdge |
m_nodeB |
Contact |
m_prev |
float |
m_restitution |
float |
m_tangentSpeed |
float |
m_toi |
float |
m_toiCount |
protected IWorldPool |
pool |
static int |
TOI_FLAG |
static int |
TOUCHING_FLAG |
Modifier | Constructor and Description |
---|---|
protected |
Contact(IWorldPool argPool) |
Modifier and Type | Method and Description |
---|---|
abstract void |
evaluate(Manifold manifold,
Transform xfA,
Transform xfB) |
void |
flagForFiltering()
Flag this contact for filtering.
|
int |
getChildIndexA() |
int |
getChildIndexB() |
Fixture |
getFixtureA()
Get the first fixture in this contact.
|
Fixture |
getFixtureB()
Get the second fixture in this contact.
|
float |
getFriction() |
Manifold |
getManifold()
Get the contact manifold.
|
Contact |
getNext()
Get the next contact in the world's contact list.
|
float |
getRestitution() |
float |
getTangentSpeed() |
void |
getWorldManifold(WorldManifold worldManifold)
Get the world manifold.
|
void |
init(Fixture fA,
int indexA,
Fixture fB,
int indexB)
initialization for pooling
|
boolean |
isEnabled()
Has this contact been disabled?
|
boolean |
isTouching()
Is this contact touching
|
static float |
mixFriction(float friction1,
float friction2)
Friction mixing law.
|
static float |
mixRestitution(float restitution1,
float restitution2)
Restitution mixing law.
|
void |
resetFriction() |
void |
resetRestitution() |
void |
setEnabled(boolean flag)
Enable/disable this contact.
|
void |
setFriction(float friction) |
void |
setRestitution(float restitution) |
void |
setTangentSpeed(float speed) |
void |
update(ContactListener listener) |
public static final int ISLAND_FLAG
public static final int TOUCHING_FLAG
public static final int ENABLED_FLAG
public static final int FILTER_FLAG
public static final int BULLET_HIT_FLAG
public static final int TOI_FLAG
public int m_flags
public Contact m_prev
public Contact m_next
public ContactEdge m_nodeA
public ContactEdge m_nodeB
public Fixture m_fixtureA
public Fixture m_fixtureB
public int m_indexA
public int m_indexB
public final Manifold m_manifold
public float m_toiCount
public float m_toi
public float m_friction
public float m_restitution
public float m_tangentSpeed
protected final IWorldPool pool
protected Contact(IWorldPool argPool)
public Manifold getManifold()
public void getWorldManifold(WorldManifold worldManifold)
public boolean isTouching()
public void setEnabled(boolean flag)
flag
- public boolean isEnabled()
public Contact getNext()
public Fixture getFixtureA()
public int getChildIndexA()
public Fixture getFixtureB()
public int getChildIndexB()
public void setFriction(float friction)
public float getFriction()
public void resetFriction()
public void setRestitution(float restitution)
public float getRestitution()
public void resetRestitution()
public void setTangentSpeed(float speed)
public float getTangentSpeed()
public void flagForFiltering()
public void update(ContactListener listener)
public static final float mixFriction(float friction1, float friction2)
friction1
- friction2
- public static final float mixRestitution(float restitution1, float restitution2)
restitution1
- restitution2
- Copyright © 2017. All Rights Reserved.