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

A sphere shape. More...

#include <collision_shape.h>

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

Static Public Member Functions

static std::unique_ptr< SphereShape > load (const StorageContainer &storage)
 Loads a sphere 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 = SPHERE_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 sphere shape.

Constructor & Destructor Documentation

SphereShape::SphereShape ( btScalar  radius)

Constructor.

Parameters
radiusThe sphere's radius

Member Function Documentation

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

Returns a pointer to the internal Bullet shape object.

Returns

Implements thrive::CollisionShape.

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

Loads a sphere shape.

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

Lua bindings.

Returns
StorageContainer SphereShape::storage ( ) const
overridevirtual

Serializes this sphere shape.

Returns

Implements thrive::CollisionShape.

Member Data Documentation

const ShapeType thrive::SphereShape::SHAPE_TYPE = SPHERE_SHAPE
static

The ShapeType associated with this class.


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