org.jbox2d.dynamics.contacts
Class Contact

java.lang.Object
  extended by org.jbox2d.dynamics.contacts.Contact
Direct Known Subclasses:
CircleContact, NullContact, PolyContact

public abstract class Contact
extends java.lang.Object

Base class for contacts between shapes.

Author:
ewjordan

Field Summary
static int e_islandFlag
           
static int e_nonSolidFlag
           
static int e_slowFlag
           
static int e_toiFlag
           
 int m_flags
           
 float m_friction
          Combined friction
 int m_manifoldCount
           
 Contact m_next
           
 ContactEdge m_node1
          Node for connecting bodies.
 ContactEdge m_node2
          Node for connecting bodies.
 Contact m_prev
           
 float m_restitution
          Combined restitution
 Shape m_shape1
           
 Shape m_shape2
           
 float m_toi
           
 World m_world
          The parent world.
 
Constructor Summary
Contact()
           
Contact(Shape s1, Shape s2)
           
 
Method Summary
abstract  Contact clone()
           
static Contact createContact(Shape shape1, Shape shape2)
           
static void destroy(Contact contact)
           
abstract  void evaluate(ContactListener listener)
           
 int getManifoldCount()
          Get the number of manifolds.
abstract  java.util.List<Manifold> getManifolds()
          Get the manifold array.
 Contact getNext()
           
 Shape getShape1()
           
 Shape getShape2()
           
 boolean isSolid()
           
 void update(ContactListener listener)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e_nonSolidFlag

public static final int e_nonSolidFlag
See Also:
Constant Field Values

e_slowFlag

public static final int e_slowFlag
See Also:
Constant Field Values

e_islandFlag

public static final int e_islandFlag
See Also:
Constant Field Values

e_toiFlag

public static final int e_toiFlag
See Also:
Constant Field Values

m_world

public World m_world
The parent world.


m_prev

public Contact m_prev

m_next

public Contact m_next

m_node1

public ContactEdge m_node1
Node for connecting bodies.


m_node2

public ContactEdge m_node2
Node for connecting bodies.


m_shape1

public Shape m_shape1

m_shape2

public Shape m_shape2

m_friction

public float m_friction
Combined friction


m_restitution

public float m_restitution
Combined restitution


m_flags

public int m_flags

m_manifoldCount

public int m_manifoldCount

m_toi

public float m_toi
Constructor Detail

Contact

public Contact()

Contact

public Contact(Shape s1,
               Shape s2)
Method Detail

evaluate

public abstract void evaluate(ContactListener listener)

getManifolds

public abstract java.util.List<Manifold> getManifolds()
Get the manifold array.


getManifoldCount

public int getManifoldCount()
Get the number of manifolds. This is 0 or 1 between convex shapes. This may be greater than 1 for convex-vs-concave shapes. Each manifold holds up to two contact points with a shared contact normal.


isSolid

public boolean isSolid()

getNext

public Contact getNext()

getShape1

public Shape getShape1()

getShape2

public Shape getShape2()

createContact

public static Contact createContact(Shape shape1,
                                    Shape shape2)

destroy

public static void destroy(Contact contact)

update

public void update(ContactListener listener)

clone

public abstract Contact clone()
Overrides:
clone in class java.lang.Object