|
Stowy Physics Engine 0.1.0
|
A rotatable box collider. More...
#include <Collider.hpp>


Public Member Functions | |
| Manifold | TestCollision (const Transform *transform, const Collider *collider, const Transform *colliderTransform) const override |
| Tests the collision against a generic collider. | |
| Manifold | TestCollision (const Transform *transform, const BoxCollider *collider, const Transform *boxTransform) const override |
| Tests the collision against a box collider. | |
| Manifold | TestCollision (const Transform *transform, const CircleCollider *collider, const Transform *circleTransform) const override |
| Tests the collision against a circle collider. | |
| Manifold | TestCollision (const Transform *transform, const AabbCollider *collider, const Transform *circleTransform) const override |
| Tests the collision against a aabb collider. | |
| Vector2 | FindFurthestPoint (const Transform *transform, const Vector2 &direction) const override |
| Find the furthest point in the specified direction. | |
| std::array< Vector2, 4 > | GetTransformedVertices (const Transform &transform) const |
| Gets the transformed vertices of the box. | |
| std::array< Vector2, 4 > | GetVertices () const |
| Gets the untransformed vertices of the box. | |
| Vector2 | GetBoundingBoxSize () const override |
| Gets the size of the box that surrounds the collider. | |
Public Member Functions inherited from stw::Collider | |
| Collider ()=default | |
| Collider (Collider &&col) noexcept=default | |
| virtual | ~Collider ()=default |
| Collider & | operator= (Collider &&col)=default |
| Collider & | operator= (const Collider &col)=default |
| Collider (const Collider &col)=default | |
Static Public Member Functions | |
| static Projection | Project (const Vector2 &axis, const std::array< Vector2, 4 > &vertices) |
| static std::array< Vector2, 4 > | GetAxes (const std::array< Vector2, 4 > &vertices) |
Public Attributes | |
| float | halfWidth = 0 |
| Half of the width of the box. | |
| float | halfHeight = 0 |
| Half of the height of the box. | |
Public Attributes inherited from stw::Collider | |
| Vector2 | center {} |
| The center of the collider. | |
A rotatable box collider.
|
overridevirtual |
Find the furthest point in the specified direction.
| transform | The transform of this collider. |
| direction | Direction in which to find the furthest point. |
Implements stw::Collider.

|
static |

|
overridevirtual |
Gets the size of the box that surrounds the collider.
Implements stw::Collider.
| std::array< Vector2, 4 > stw::BoxCollider::GetTransformedVertices | ( | const Transform & | transform | ) | const |
Gets the transformed vertices of the box.
| transform | The transform to apply to the collider. |

| std::array< Vector2, 4 > stw::BoxCollider::GetVertices | ( | ) | const |
Gets the untransformed vertices of the box.

|
static |

|
overridevirtual |
Tests the collision against a aabb collider.
| transform | The transform of this collider. |
| collider | The circle collider to collide with. |
| aabbTransform | The transform of the collider to collide with. |
Implements stw::Collider.

|
overridevirtual |
Tests the collision against a box collider.
| transform | The transform of this collider. |
| collider | The box collider to collide with. |
| boxTransform | The transform of the collider to collide with. |
Implements stw::Collider.

|
overridevirtual |
Tests the collision against a circle collider.
| transform | The transform of this collider. |
| collider | The circle collider to collide with. |
| circleTransform | The transform of the collider to collide with. |
Implements stw::Collider.

|
overridevirtual |
Tests the collision against a generic collider.
| transform | The transform of this collider. |
| collider | The collider to collide with. |
| colliderTransform | The transform of the collider to collide with. |
Implements stw::Collider.

| float stw::BoxCollider::halfHeight = 0 |
Half of the height of the box.
| float stw::BoxCollider::halfWidth = 0 |
Half of the width of the box.