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

A capsule shape. Think cylinder with rounded caps. More...

#include <collision_shape.h>

Inheritance diagram for thrive::CapsuleShape:
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 capsule shape. More...
 
 CapsuleShape (CollisionShape::Axis axis, btScalar radius, btScalar height)
 Constructor. More...
 
- Public Member Functions inherited from thrive::CollisionShape
virtual ~CollisionShape ()=0
 Destructor.
 

Static Public Member Functions

static std::unique_ptr< CapsuleShape > load (const StorageContainer &storage)
 Loads a capsule 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 = CAPSULE_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 capsule shape. Think cylinder with rounded caps.

Constructor & Destructor Documentation

CapsuleShape::CapsuleShape ( CollisionShape::Axis  axis,
btScalar  radius,
btScalar  height 
)

Constructor.

Parameters
axisThe long axis of the capsule
radiusThe radius of the capsule
heightThe height of the capsule

Member Function Documentation

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

Returns a pointer to the internal Bullet shape object.

Returns

Implements thrive::CollisionShape.

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

Loads a capsule shape.

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

Lua bindings.

Returns
StorageContainer CapsuleShape::storage ( ) const
overridevirtual

Serializes this capsule shape.

Returns

Implements thrive::CollisionShape.

Member Data Documentation

const ShapeType thrive::CapsuleShape::SHAPE_TYPE = CAPSULE_SHAPE
static

The ShapeType associated with this class.


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