-
- All Superinterfaces:
Listener
- All Known Implementing Classes:
ContactAdapter
@Deprecated public interface ContactListener extends Listener
Deprecated.Deprecated in 4.0.0. Use the ContactListener in the world package instead.Represents an object that is notified of contact events.Implement this interface and register it with the
World
to be notified when contact events occur. Contact events occur after allCollisionListener
events have been raised.Modification of the
World
is permitted from any of these methods.Returning false from any of the listener methods will disable the whole contact constraint. Other
ContactListener
s will still be notified of this event and other contact events for this constraint. A disabled contact constraint will not be solved. Contact constraints disabled this way are only disabled for this timestep.If a body is to be removed, make sure to return false to disable the contact. Otherwise the contact between the bodies will still be resolved even if the body has been removed. If a body is removed you should check the remaining contacts for that body and return false from the those as well.
- Since:
- 1.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
begin(ContactPoint point)
Deprecated.Called when twoBodyFixture
s begin to overlap, generating a contact point.void
end(ContactPoint point)
Deprecated.Called when twoBodyFixture
s begin to separate.boolean
persist(PersistedContactPoint point)
Deprecated.Called when twoBodyFixture
s remain in contact.void
postSolve(SolvedContactPoint point)
Deprecated.Called after contacts have been solved.boolean
preSolve(ContactPoint point)
Deprecated.Called before contact constraints are solved.void
sensed(ContactPoint point)
Deprecated.As of 3.3.0 this is not called, use the other methods in the listener and check the sensor flag instead
-
-
-
Method Detail
-
sensed
@Deprecated void sensed(ContactPoint point)
Deprecated.As of 3.3.0 this is not called, use the other methods in the listener and check the sensor flag insteadCalled when a contact has been sensed between twoBody
s, where one or bothBody
'sBodyFixture
s are sensors.- Parameters:
point
- the contact point that was sensed
-
begin
boolean begin(ContactPoint point)
Deprecated.Called when twoBodyFixture
s begin to overlap, generating a contact point.- Parameters:
point
- the contact point that was added- Returns:
- boolean true if the contact should remain enabled
-
end
void end(ContactPoint point)
Deprecated.Called when twoBodyFixture
s begin to separate.- Parameters:
point
- the contact point that was removed
-
persist
boolean persist(PersistedContactPoint point)
Deprecated.Called when twoBodyFixture
s remain in contact.- Parameters:
point
- the persisted contact point- Returns:
- boolean true if the contact should remain enabled
-
preSolve
boolean preSolve(ContactPoint point)
Deprecated.Called before contact constraints are solved.- Parameters:
point
- the contact point- Returns:
- boolean true if the contact should remain enabled
-
postSolve
void postSolve(SolvedContactPoint point)
Deprecated.Called after contacts have been solved.- Parameters:
point
- the contact point that was solved
-
-