Module technology.sola.engine
Interface ColliderShape<T extends Shape>
- Type Parameters:
T
- the type ofShape
- All Known Implementing Classes:
ColliderShapeAABB
,ColliderShapeCircle
,ColliderShapeTriangle
ColliderShape contains methods and data needed for geometric
Shape
s for collision calculations.-
Method Summary
Modifier and TypeMethodDescriptionvoid
debugRender
(Renderer renderer, TransformComponent transformComponent, float offsetX, float offsetY) Renders debug information for the collider shape.getBoundingBox
(TransformComponent transformComponent, float offsetX, float offsetY) Returns the bounding box for thisColliderShape
.getShape
(TransformComponent transformComponent, float offsetX, float offsetY) Gets the geometricShape
for this collider shape.type()
Gets theColliderType
of this collider.
-
Method Details
-
type
ColliderType type()Gets theColliderType
of this collider.- Returns:
- the
ColliderType
of this collider
-
getBoundingBox
Returns the bounding box for thisColliderShape
.- Parameters:
transformComponent
- theTransformComponent
of the entityoffsetX
- the x offset of the collideroffsetY
- the y offset of the collider- Returns:
- the bounding box
-
getShape
Gets the geometricShape
for this collider shape.- Parameters:
transformComponent
- theTransformComponent
for theEntity
offsetX
- the x offset off the collideroffsetY
- the y offset of the collider- Returns:
- the geometric
Shape
-
debugRender
void debugRender(Renderer renderer, TransformComponent transformComponent, float offsetX, float offsetY) Renders debug information for the collider shape.- Parameters:
renderer
- theRenderer
transformComponent
- theEntity
'sTransformComponent
offsetX
- the collider shape x-axis offsetoffsetY
- the collider shape y-axis offset
-