![]() |
Calamity Engine 1.0.0
A cross-platform 2D game engine written in C++ and SDL3.
|
#include <definitions.hpp>
Public Member Functions | |
| virtual | ~Shape ()=default |
| void | applyMaterial (const Material &material) |
| Shape * | setSensor (bool sensor) |
| template<class Archive > | |
| void | save (Archive &ar) const |
| template<class Archive > | |
| void | load (Archive &ar) |
Public Attributes | |
| b2ShapeDef | shapeDef |
| Vector2 | origin |
Protected Member Functions | |
| void | postLoad () |
The base Shape class defines properties which are inherited by all Shapes, such as BoxShape, CircleShape, CapsuleShape and PolygonShape.
This class has two notable properties:
You can also set a shape to be a sensor, which means that it will not cause physical collisions but will still trigger collision events and mouse hover events:
For more insight regarding sensors, the button example utilizes sensors for its buttons!
|
virtualdefault |
| void Shape::applyMaterial | ( | const Material & | material | ) |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
| Vector2 Shape::origin |
| b2ShapeDef Shape::shapeDef |