|
Thrive
|
Wrapper for Bullet's collision shapes. More...
#include <collision_shape.h>
Public Types | |
| enum | Axis : uint8_t { AXIS_X = 0, AXIS_Y = 1, AXIS_Z = 2 } |
| Enumeration for the 3 axes. More... | |
| enum | ShapeType : uint8_t { EMPTY_SHAPE = 0, BOX_SHAPE = 1, CAPSULE_SHAPE = 2, COMPOUND_SHAPE = 3, CONE_SHAPE = 4, CYLINDER_SHAPE = 5, SPHERE_SHAPE = 6 } |
| Enumeration for the currently supported shape types. More... | |
| using | Ptr = std::shared_ptr< CollisionShape > |
| Convenience typedef. | |
Public Member Functions | |
| virtual | ~CollisionShape ()=0 |
| Destructor. | |
| virtual btCollisionShape * | bulletShape () const =0 |
| Returns a pointer to the internal Bullet shape object. More... | |
| virtual ShapeType | shapeType () const =0 |
| The shape's type. | |
| virtual StorageContainer | storage () const =0 |
| Serializes the shape into a storage container. More... | |
Static Public Member Functions | |
| static std::unique_ptr< CollisionShape > | load (const StorageContainer &storage) |
| Loads a shape from a storage container. More... | |
| static luabind::scope | luaBindings () |
| Lua bindings. More... | |
Wrapper for Bullet's collision shapes.
Wrapping the native Bullet shape classes makes it more convenient to serialize them and bind them to scripts. It also allows us to offer a more convenient interface.
| enum thrive::CollisionShape::Axis : uint8_t |
Enumeration for the 3 axes.
Some shapes require an axis for orientation, such as the cylinder shape.
| enum thrive::CollisionShape::ShapeType : uint8_t |
Enumeration for the currently supported shape types.
Used for deserializing a shape
|
pure virtual |
Returns a pointer to the internal Bullet shape object.
Implemented in thrive::SphereShape, thrive::EmptyShape, thrive::CylinderShape, thrive::ConeShape, thrive::CompoundShape, thrive::CapsuleShape, and thrive::BoxShape.
|
static |
Loads a shape from a storage container.
| storage | The storage of the shape |
|
static |
|
pure virtual |
Serializes the shape into a storage container.
Implemented in thrive::SphereShape, thrive::EmptyShape, thrive::CylinderShape, thrive::ConeShape, thrive::CompoundShape, thrive::CapsuleShape, and thrive::BoxShape.
1.8.10