- Object
-
- CollisionAdapter
-
- All Implemented Interfaces:
CollisionListener
,Listener
@Deprecated public class CollisionAdapter extends Object implements CollisionListener, Listener
Deprecated.Deprecated in 4.0.0. Use the CollisionListenerAdapter in the world package instead.Convenience class for implementing theCollisionListener
interface.This class can be used to implement only the methods desired instead of all the methods contained in the
CollisionListener
interface.By default this class allows processing to continue for all collision events.
- Since:
- 1.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Constructor Description CollisionAdapter()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
collision(Body body1, BodyFixture fixture1, Body body2, BodyFixture fixture2)
Deprecated.Called when twoBodyFixture
s are colliding as determined by theBroadphaseDetector
.boolean
collision(Body body1, BodyFixture fixture1, Body body2, BodyFixture fixture2, Manifold manifold)
Deprecated.Called when twoBodyFixture
s are colliding and a contactManifold
has been found.boolean
collision(Body body1, BodyFixture fixture1, Body body2, BodyFixture fixture2, Penetration penetration)
Deprecated.Called when twoBodyFixture
s are colliding as determined by theNarrowphaseDetector
.boolean
collision(ContactConstraint contactConstraint)
Deprecated.Called after aContactConstraint
has been created for a collision.
-
-
-
Method Detail
-
collision
public boolean collision(Body body1, BodyFixture fixture1, Body body2, BodyFixture fixture2)
Deprecated.Description copied from interface:CollisionListener
Called when twoBodyFixture
s are colliding as determined by theBroadphaseDetector
. *Body
objects can have manyConvex
Shape
s that make up their geometry. Because of this, this method may be called multiple times if two multi-fixturedBody
s are colliding.This method is called when the two
BodyFixture
's expandedAABB
s are overlapping. Visually the bodies may not appear to be colliding (which is a valid case). If you need to make sure theBody
s are colliding, and not just their AABBs, use theCollisionListener.collision(Body, BodyFixture, Body, BodyFixture, Penetration)
method.Return false from this method to stop processing of this collision. Other
CollisionListener
s will still be notified of this event, however, no further collision or contact events will occur for this pair.The
CollisionListener.collision(Body, BodyFixture, Body, BodyFixture, Penetration)
method is next in the sequence of collision events.- Specified by:
collision
in interfaceCollisionListener
- Parameters:
body1
- the firstBody
fixture1
- the firstBody
'sBodyFixture
body2
- the secondBody
fixture2
- the secondBody
'sBodyFixture
- Returns:
- boolean true if processing should continue for this collision
-
collision
public boolean collision(Body body1, BodyFixture fixture1, Body body2, BodyFixture fixture2, Manifold manifold)
Deprecated.Description copied from interface:CollisionListener
Called when twoBodyFixture
s are colliding and a contactManifold
has been found.Body
objects can have manyConvex
Shape
s that make up their geometry. Because of this, this method may be called multiple times if two multi-fixturedBody
s are colliding.Modification of the
Manifold
object is allowed. TheManifold
is used to create contact constraints.Return false from this method to stop processing of this collision. Other
CollisionListener
s will still be notified of this event, however, no further collision or contact events will occur for this pair.The
CollisionListener.collision(ContactConstraint)
method is next in the sequence of collision events.- Specified by:
collision
in interfaceCollisionListener
- Parameters:
body1
- the firstBody
fixture1
- the firstBody
'sBodyFixture
body2
- the secondBody
fixture2
- the secondBody
'sBodyFixture
manifold
- the contactManifold
for the collision- Returns:
- boolean true if processing should continue for this collision
-
collision
public boolean collision(Body body1, BodyFixture fixture1, Body body2, BodyFixture fixture2, Penetration penetration)
Deprecated.Description copied from interface:CollisionListener
Called when twoBodyFixture
s are colliding as determined by theNarrowphaseDetector
.Body
objects can have manyConvex
Shape
s that make up their geometry. Because of this, this method may be called multiple times if two multi-fixturedBody
s are colliding.Modification of the
Penetration
object is allowed. ThePenetration
object passed will be used to generate the contact manifold in theManifoldSolver
.Return false from this method to stop processing of this collision. Other
CollisionListener
s will still be notified of this event, however, no further collision or contact events will occur for this pair.The
CollisionListener.collision(Body, BodyFixture, Body, BodyFixture, Manifold)
method is next in the sequence of collision events.- Specified by:
collision
in interfaceCollisionListener
- Parameters:
body1
- the firstBody
fixture1
- the firstBody
'sBodyFixture
body2
- the secondBody
fixture2
- the secondBody
'sBodyFixture
penetration
- thePenetration
between theShape
s- Returns:
- boolean true if processing should continue for this collision
-
collision
public boolean collision(ContactConstraint contactConstraint)
Deprecated.Description copied from interface:CollisionListener
Called after aContactConstraint
has been created for a collision.Body
objects can have manyConvex
Shape
s that make up their geometry. Because of this, this method may be called multiple times if two multi-fixturedBody
s are colliding.Modification of the friction and restitution (both computed using the
CoefficientMixer
and sensor fields is allowed.Setting the tangent velocity of the
ContactConstraint
can create a conveyor effect.Return false from this method to stop processing of this collision. Other
CollisionListener
s will still be notified of this event, however, no further collision or contact events will occur for this pair.This is the last collision event before contact processing (via
ContactListener
s) occur.- Specified by:
collision
in interfaceCollisionListener
- Parameters:
contactConstraint
- the contact constraint- Returns:
- boolean true if processing should continue for this collision
-
-