Module technology.sola.engine
Interface ColliderShape<T extends Shape>
- Type Parameters:
T- the type ofShape
- All Known Implementing Classes:
ColliderShapeAABB,ColliderShapeCircle,ColliderShapeConvexPolygon,ColliderShapeTriangle
ColliderShape contains methods and data needed for geometric
Shapes for collision calculations.-
Method Summary
Modifier and TypeMethodDescriptionvoiddebugRender(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 geometricShapefor this collider shape.type()Gets theColliderTypeof this collider.
-
Method Details
-
type
ColliderType type()Gets theColliderTypeof this collider.- Returns:
- the
ColliderTypeof this collider
-
getBoundingBox
Returns the bounding box for thisColliderShape.- Parameters:
transformComponent- theTransformComponentof the entityoffsetX- the x offset of the collideroffsetY- the y offset of the collider- Returns:
- the bounding box
-
getShape
Gets the geometricShapefor this collider shape.- Parameters:
transformComponent- theTransformComponentfor theEntityoffsetX- 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- theRenderertransformComponent- theEntity'sTransformComponentoffsetX- the collider shape x-axis offsetoffsetY- the collider shape y-axis offset
-