Shiftable
DefaultContactManager
, SimpleContactManager
, WarmStartingContactManager
public interface ContactManager extends Shiftable
ContactConstraint
s between Body
s and notifies ContactListener
s
of various events related to the life-cycle of a contact.Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
Clears the contact manager.
|
boolean |
end(ContactConstraint constraint) |
Manually ends the contacts associated with the given
ContactConstraint . |
int |
getContactCount() |
Returns the number of contact constraints in the manager.
|
int |
getQueueCount() |
Returns the number of contact constraints in the queue.
|
void |
postSolveNotify(java.util.List<ContactListener> listeners) |
Notifies the given
ContactListener s of the post-solve event for all
ContactConstraint s that reached this stage. |
void |
preSolveNotify(java.util.List<ContactListener> listeners) |
Notifies the given
ContactListener s of the pre-solve event for all
ContactConstraint s that reached this stage. |
void |
queue(ContactConstraint constraint) |
Queues a new
ContactConstraint to be added to this ContactManager . |
void |
updateAndNotify(java.util.List<ContactListener> listeners,
Settings settings) |
Updates this
ContactManager with the queued ContactConstraint s and notifying
the given ContactListener s of the respective events. |
void queue(ContactConstraint constraint)
ContactConstraint
to be added to this ContactManager
.
The updateAndNotify(List, Settings)
method should be called after all ContactConstraint
s
have been queued.
constraint
- the ContactConstraint
void updateAndNotify(java.util.List<ContactListener> listeners, Settings settings)
ContactManager
with the queued ContactConstraint
s and notifying
the given ContactListener
s of the respective events.
This method does not notify the ContactListener.preSolve(ContactPoint)
or
ContactListener.postSolve(SolvedContactPoint)
events.
If any ContactListener
method returns false, the contact will not continue to the
next stage. In the event that all the contacts of a ContactConstraint
do not
continue to the next stage, the ContactConstraint
itself will not continue.
listeners
- the ContactListener
to notifysettings
- the world Settings
ContactListener
void preSolveNotify(java.util.List<ContactListener> listeners)
ContactListener
s of the pre-solve event for all
ContactConstraint
s that reached this stage.
If any ContactListener
method returns false, the contact will not continue to the
next stage. In the event that all the contacts of a ContactConstraint
do not
continue to the next stage, the ContactConstraint
itself will not continue.
listeners
- the ContactListener
to notifyvoid postSolveNotify(java.util.List<ContactListener> listeners)
ContactListener
s of the post-solve event for all
ContactConstraint
s that reached this stage.listeners
- the ContactListener
to notifyboolean end(ContactConstraint constraint)
ContactConstraint
.
This method does not call the ContactListener.end(ContactPoint)
method for
the contacts in the given ContactConstraint
.
constraint
- the ContactConstraint
ContactConstraint
was foundvoid clear()
int getQueueCount()
int getContactCount()