- Object
-
- DefaultContactManager
-
- All Implemented Interfaces:
ContactManager
,Shiftable
- Direct Known Subclasses:
SimpleContactManager
,WarmStartingContactManager
@Deprecated public class DefaultContactManager extends Object implements ContactManager, Shiftable
Deprecated.Deprecated in 4.0.0. No longer needed.Represents the default contact manager that reports beginning, persisted, and ending contacts and performs warm starting by default.- Since:
- 3.3.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Constructor Description DefaultContactManager()
Deprecated.Default constructor.DefaultContactManager(Capacity initialCapacity)
Deprecated.Full constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.Clears the contact manager.boolean
end(ContactConstraint contactConstraint)
Deprecated.Manually ends the contacts associated with the givenContactConstraint
.int
getContactCount()
Deprecated.Returns the number of contact constraints in the manager.int
getQueueCount()
Deprecated.Returns the number of contact constraints in the queue.boolean
isWarmStartingEnabled()
Deprecated.Returns true if warm starting is enabled.void
postSolveNotify(List<ContactListener> listeners)
Deprecated.Notifies the givenContactListener
s of the post-solve event for allContactConstraint
s that reached this stage.void
preSolveNotify(List<ContactListener> listeners)
Deprecated.Notifies the givenContactListener
s of the pre-solve event for allContactConstraint
s that reached this stage.void
queue(ContactConstraint constraint)
Deprecated.Queues a newContactConstraint
to be added to thisContactManager
.void
setWarmStartingEnabled(boolean flag)
Deprecated.Toggles warm starting.void
shift(Vector2 shift)
Deprecated.Translates the object to match the given coordinate shift.void
updateAndNotify(List<ContactListener> listeners, Settings settings)
Deprecated.Updates thisContactManager
with the queuedContactConstraint
s and notifying the givenContactListener
s of the respective events.
-
-
-
Constructor Detail
-
DefaultContactManager
public DefaultContactManager()
Deprecated.Default constructor.
-
DefaultContactManager
public DefaultContactManager(Capacity initialCapacity)
Deprecated.Full constructor.The initial capacity is used to help performance in the event that the developer knows the number of bodies the world will contain. The
ContactManager
will grow past the initial capacity if necessary.- Parameters:
initialCapacity
- the estimated number ofBody
s- Throws:
NullPointerException
- if initialCapacity is null
-
-
Method Detail
-
queue
public void queue(ContactConstraint constraint)
Deprecated.Description copied from interface:ContactManager
Queues a newContactConstraint
to be added to thisContactManager
.The
ContactManager.updateAndNotify(List, Settings)
method should be called after allContactConstraint
s have been queued.- Specified by:
queue
in interfaceContactManager
- Parameters:
constraint
- theContactConstraint
-
clear
public void clear()
Deprecated.Description copied from interface:ContactManager
Clears the contact manager.- Specified by:
clear
in interfaceContactManager
-
end
public boolean end(ContactConstraint contactConstraint)
Deprecated.Description copied from interface:ContactManager
Manually ends the contacts associated with the givenContactConstraint
.This method does not call the
ContactListener.end(ContactPoint)
method for the contacts in the givenContactConstraint
.- Specified by:
end
in interfaceContactManager
- Parameters:
contactConstraint
- theContactConstraint
- Returns:
- true if the
ContactConstraint
was found
-
shift
public void shift(Vector2 shift)
Deprecated.Description copied from interface:Shiftable
Translates the object to match the given coordinate shift.
-
updateAndNotify
public void updateAndNotify(List<ContactListener> listeners, Settings settings)
Deprecated.Description copied from interface:ContactManager
Updates thisContactManager
with the queuedContactConstraint
s and notifying the givenContactListener
s of the respective events.This method does not notify the
ContactListener.preSolve(ContactPoint)
orContactListener.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 aContactConstraint
do not continue to the next stage, theContactConstraint
itself will not continue.- Specified by:
updateAndNotify
in interfaceContactManager
- Parameters:
listeners
- theContactListener
to notifysettings
- the worldSettings
- See Also:
ContactListener
-
preSolveNotify
public void preSolveNotify(List<ContactListener> listeners)
Deprecated.Description copied from interface:ContactManager
Notifies the givenContactListener
s of the pre-solve event for allContactConstraint
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 aContactConstraint
do not continue to the next stage, theContactConstraint
itself will not continue.- Specified by:
preSolveNotify
in interfaceContactManager
- Parameters:
listeners
- theContactListener
to notify
-
postSolveNotify
public void postSolveNotify(List<ContactListener> listeners)
Deprecated.Description copied from interface:ContactManager
Notifies the givenContactListener
s of the post-solve event for allContactConstraint
s that reached this stage.- Specified by:
postSolveNotify
in interfaceContactManager
- Parameters:
listeners
- theContactListener
to notify
-
isWarmStartingEnabled
public boolean isWarmStartingEnabled()
Deprecated.Returns true if warm starting is enabled.- Returns:
- boolean
-
setWarmStartingEnabled
public void setWarmStartingEnabled(boolean flag)
Deprecated.Toggles warm starting.- Parameters:
flag
- true if warm starting should be enabled
-
getContactCount
public int getContactCount()
Deprecated.Description copied from interface:ContactManager
Returns the number of contact constraints in the manager.- Specified by:
getContactCount
in interfaceContactManager
- Returns:
- int
-
getQueueCount
public int getQueueCount()
Deprecated.Description copied from interface:ContactManager
Returns the number of contact constraints in the queue.- Specified by:
getQueueCount
in interfaceContactManager
- Returns:
- int
-
-