Thrive
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
thrive::BoxShape Class Reference

A simple box shape. More...

#include <collision_shape.h>

Inheritance diagram for thrive::BoxShape:
thrive::CollisionShape

Public Member Functions

btCollisionShape * bulletShape () const override
 Returns a pointer to the internal Bullet shape object. More...
 
ShapeType shapeType () const override
 The shape's type.
 
StorageContainer storage () const override
 Serializes this box shape. More...
 
 BoxShape (const Ogre::Vector3 &extents)
 Constructor. More...
 
- Public Member Functions inherited from thrive::CollisionShape
virtual ~CollisionShape ()=0
 Destructor.
 

Static Public Member Functions

static std::unique_ptr< BoxShape > load (const StorageContainer &storage)
 Loads the box shape. More...
 
static luabind::scope luaBindings ()
 Lua bindings. More...
 
- Static Public Member Functions inherited from thrive::CollisionShape
static std::unique_ptr< CollisionShape > load (const StorageContainer &storage)
 Loads a shape from a storage container. More...
 
static luabind::scope luaBindings ()
 Lua bindings. More...
 

Static Public Attributes

static const ShapeType SHAPE_TYPE = BOX_SHAPE
 The ShapeType associated with this class. More...
 

Additional Inherited Members

- Public Types inherited from thrive::CollisionShape
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.
 

Detailed Description

A simple box shape.

Constructor & Destructor Documentation

BoxShape::BoxShape ( const Ogre::Vector3 &  extents)

Constructor.

Parameters
extentsThe side lengths of the box

Member Function Documentation

btCollisionShape* thrive::BoxShape::bulletShape ( ) const
inlineoverridevirtual

Returns a pointer to the internal Bullet shape object.

Returns

Implements thrive::CollisionShape.

std::unique_ptr< BoxShape > BoxShape::load ( const StorageContainer &  storage)
static

Loads the box shape.

Parameters
storage
Returns
luabind::scope BoxShape::luaBindings ( )
static

Lua bindings.

Returns
StorageContainer BoxShape::storage ( ) const
overridevirtual

Serializes this box shape.

Returns

Implements thrive::CollisionShape.

Member Data Documentation

const ShapeType thrive::BoxShape::SHAPE_TYPE = BOX_SHAPE
static

The ShapeType associated with this class.


The documentation for this class was generated from the following files: