-
- All Superinterfaces:
Shiftable
,Translatable
- All Known Implementing Classes:
AbstractBounds
,AxisAlignedBounds
public interface Bounds extends Translatable, Shiftable
Represents theBounds
of a simulation.By default all bounds are
Translatable
but notRotatable
.Though not part of the bounds contract, a bounds object should only return true from the
isOutside(CollisionBody)
method when aCollisionBody
is fully outside the bounds.- Since:
- 1.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vector2
getTranslation()
Returns the translation of the bounds.boolean
isOutside(CollisionBody<?> body)
Returns true if the givenCollisionBody
is fully outside the bounds.boolean
isOutside(AABB aabb)
Returns true if the givenAABB
is fully outside the bounds.-
Methods inherited from interface Translatable
translate, translate
-
-
-
-
Method Detail
-
getTranslation
Vector2 getTranslation()
Returns the translation of the bounds.- Returns:
Vector2
- Since:
- 3.2.0
-
isOutside
boolean isOutside(CollisionBody<?> body)
Returns true if the givenCollisionBody
is fully outside the bounds.If the
CollisionBody
contains zeroFixture
s thenCollisionBody
is considered to be outside the bounds.- Parameters:
body
- theCollisionBody
to test- Returns:
- boolean true if outside the bounds
-
-