Module org.dyn4j
Package org.dyn4j.world
Interface CollisionData<T extends CollisionBody<E>,E extends Fixture>
-
- Type Parameters:
T
- theCollisionBody
typeE
- theFixture
type
- All Superinterfaces:
BroadphaseCollisionData<T,E>
,ManifoldCollisionData<T,E>
,NarrowphaseCollisionData<T,E>
,Shiftable
- All Known Subinterfaces:
ContactCollisionData<T>
- All Known Implementing Classes:
WorldCollisionData
public interface CollisionData<T extends CollisionBody<E>,E extends Fixture> extends ManifoldCollisionData<T,E>, NarrowphaseCollisionData<T,E>, BroadphaseCollisionData<T,E>, Shiftable
Represents a container for all the collision information between aCollisionPair
.- Since:
- 4.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isBroadphaseCollision()
Returns true if theCollisionPair
is a broadphase collision.boolean
isManifoldCollision()
Returns true if theCollisionPair
is a manifold collision.boolean
isNarrowphaseCollision()
Returns true if theCollisionPair
is a narrowphase collision.void
reset()
Resets the data in this object to prepare for use in the next detection step.void
setBroadphaseCollision(boolean flag)
Set to true if theCollisionPair
was detected by theBroadphaseDetector
and it was allowed to continue to theNarrowphaseDetector
stage.void
setManifoldCollision(boolean flag)
Set to true if theCollisionPair
was detected by theManifoldSolver
.void
setNarrowphaseCollision(boolean flag)
Set to true if theCollisionPair
was detected by theNarrowphaseDetector
and it was allowed to continue to theManifoldSolver
stage.-
Methods inherited from interface BroadphaseCollisionData
getBody1, getBody2, getFixture1, getFixture2, getPair
-
Methods inherited from interface ManifoldCollisionData
getManifold
-
Methods inherited from interface NarrowphaseCollisionData
getPenetration
-
-
-
-
Method Detail
-
isBroadphaseCollision
boolean isBroadphaseCollision()
Returns true if theCollisionPair
is a broadphase collision.- Returns:
- boolean
- See Also:
setBroadphaseCollision(boolean)
-
setBroadphaseCollision
void setBroadphaseCollision(boolean flag)
Set to true if theCollisionPair
was detected by theBroadphaseDetector
and it was allowed to continue to theNarrowphaseDetector
stage.More specifically, set to true if all of the following conditions were met:
- The
CollisionPair
was detected by theBroadphaseDetector
or was detected in a prior iteration - The
CollisionPair
was confirmed to have theirAABB
s still overlapping - The
CollisionPair
was NOT filtered by theBroadphaseFilter
- The
CollisionPair
was NOT filtered by any of theCollisionListener.collision(BroadphaseCollisionData)
method calls
- Parameters:
flag
- true if the above conditions are met
- The
-
isNarrowphaseCollision
boolean isNarrowphaseCollision()
Returns true if theCollisionPair
is a narrowphase collision.- Returns:
- boolean
- See Also:
setNarrowphaseCollision(boolean)
-
setNarrowphaseCollision
void setNarrowphaseCollision(boolean flag)
Set to true if theCollisionPair
was detected by theNarrowphaseDetector
and it was allowed to continue to theManifoldSolver
stage.More specifically, set to true if all of the following conditions were met:
- The
CollisionPair
was detected by theNarrowphaseDetector
to be overlapping - The
CollisionPair
'sPenetration.getDepth()
is greater than zero - The
CollisionPair
was NOT filtered by any of theCollisionListener.collision(NarrowphaseCollisionData)
method calls
- Parameters:
flag
- true if the above conditions are met
- The
-
isManifoldCollision
boolean isManifoldCollision()
Returns true if theCollisionPair
is a manifold collision.- Returns:
- boolean
- See Also:
setManifoldCollision(boolean)
-
setManifoldCollision
void setManifoldCollision(boolean flag)
Set to true if theCollisionPair
was detected by theManifoldSolver
.More specifically, set to true if all of the following conditions were met:
- The
CollisionPair
was detected by theManifoldSolver
- The
CollisionPair
'sManifold
has at least one point - The
CollisionPair
was NOT filtered by any of theCollisionListener.collision(ManifoldCollisionData)
method calls
- Parameters:
flag
- true if the above conditions are met
- The
-
reset
void reset()
Resets the data in this object to prepare for use in the next detection step.
-
-