Module org.dyn4j
Package org.dyn4j.collision
Interface CollisionPair<T extends CollisionBody<E>,E extends Fixture>
-
- Type Parameters:
T
- theCollisionBody
typeE
- theFixture
type
- All Superinterfaces:
Copyable<CollisionPair<T,E>>
- All Known Implementing Classes:
AbstractCollisionPair
,BasicCollisionPair
public interface CollisionPair<T extends CollisionBody<E>,E extends Fixture> extends Copyable<CollisionPair<T,E>>
Represents a collision between twoCollisionBody
'sFixture
s.- Since:
- 4.0.0
- Version:
- 4.0.0
- Author:
- WBittle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getBody(CollisionBody<?> body)
Returns the body that matches the given body.T
getBody1()
Returns the firstCollisionBody
.T
getBody2()
Returns the secondCollisionBody
.E
getFixture(CollisionBody<?> body)
Returns the fixture for the body that matches the given body.E
getFixture1()
Returns the firstFixture
.E
getFixture2()
Returns the secondFixture
.T
getOtherBody(CollisionBody<?> body)
Returns the body that does not match the given body.E
getOtherFixture(CollisionBody<?> body)
Returns the fixture for the body that does not match the given body.
-
-
-
Method Detail
-
getBody1
T getBody1()
Returns the firstCollisionBody
.- Returns:
- E
-
getBody2
T getBody2()
Returns the secondCollisionBody
.- Returns:
- E
-
getBody
T getBody(CollisionBody<?> body)
Returns the body that matches the given body.If the given body is neither body1 or body2, null is returned.
- Parameters:
body
- the body- Returns:
- T
-
getFixture
E getFixture(CollisionBody<?> body)
Returns the fixture for the body that matches the given body.If the given body is neither body1 or body2, null is returned.
- Parameters:
body
- the body- Returns:
- E
-
getOtherBody
T getOtherBody(CollisionBody<?> body)
Returns the body that does not match the given body.If the given body is neither body1 or body2, null is returned.
- Parameters:
body
- the body- Returns:
- T
-
getOtherFixture
E getOtherFixture(CollisionBody<?> body)
Returns the fixture for the body that does not match the given body.If the given body is neither body1 or body2, null is returned.
- Parameters:
body
- the body- Returns:
- E
-
-