Stowy Physics Engine 0.1.0
|
A pure virtual struct that represents colliders. More...
#include <Collider.hpp>
Public Member Functions | |
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 | |
virtual Manifold | TestCollision (const Transform *transform, const Collider *collider, const Transform *colliderTransform) const =0 |
Tests the collision against a generic collider. | |
virtual Manifold | TestCollision (const Transform *transform, const BoxCollider *collider, const Transform *boxTransform) const =0 |
Tests the collision against a box collider. | |
virtual Manifold | TestCollision (const Transform *transform, const CircleCollider *collider, const Transform *circleTransform) const =0 |
Tests the collision against a circle collider. | |
virtual Manifold | TestCollision (const Transform *transform, const AabbCollider *collider, const Transform *aabbTransform) const =0 |
Tests the collision against a aabb collider. | |
virtual Vector2 | FindFurthestPoint (const Transform *transform, const Vector2 &direction) const =0 |
Find the furthest point in the specified direction. | |
virtual Vector2 | GetBoundingBoxSize () const =0 |
Gets the size of the box that surrounds the collider. | |
Public Attributes | |
Vector2 | center {} |
The center of the collider. | |
A pure virtual struct that represents colliders.
|
default |
|
defaultnoexcept |
|
virtualdefault |
|
default |
|
pure virtual |
Find the furthest point in the specified direction.
transform | The transform of this collider. |
direction | Direction in which to find the furthest point. |
Implemented in stw::BoxCollider, stw::CircleCollider, and stw::AabbCollider.
|
pure virtual |
Gets the size of the box that surrounds the collider.
Implemented in stw::BoxCollider, stw::CircleCollider, and stw::AabbCollider.
|
pure virtual |
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. |
Implemented in stw::CircleCollider, stw::AabbCollider, and stw::BoxCollider.
|
pure virtual |
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. |
Implemented in stw::BoxCollider, stw::CircleCollider, and stw::AabbCollider.
|
pure virtual |
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. |
Implemented in stw::BoxCollider, stw::CircleCollider, and stw::AabbCollider.
|
pure virtual |
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. |
Implemented in stw::BoxCollider, stw::CircleCollider, and stw::AabbCollider.
Vector2 stw::Collider::center {} |
The center of the collider.