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

A component for a collision reactive entity. More...

#include <collision_system.h>

Inheritance diagram for thrive::CollisionComponent:
thrive::Component

Public Member Functions

 CollisionComponent ()
 Constructor.
 
 CollisionComponent (const std::string &collisionGroup)
 Constructor. More...
 
void addCollisionGroup (const std::string &group)
 Add a collision group Collision groups determine which CollisionFilter objects are notified when a collision involving this object occours. More...
 
void removeCollisionGroup (const std::string &group)
 Remove a collision group. More...
 
const std::vector< std::string > & getCollisionGroups ()
 
void load (const StorageContainer &storage) override
 Loads the component. More...
 
StorageContainer storage () const override
 Serializes the component. More...
 
- Public Member Functions inherited from thrive::Component
virtual ~Component ()=0
 Destructor.
 
bool isVolatile () const
 A volatile component is not serialized during a save. More...
 
EntityId owner () const
 The entity this component belongs to. More...
 
void setVolatile (bool isVolatile)
 Sets the volatile flag. More...
 
void setOwner (EntityId owner)
 Sets the component's owner. More...
 
virtual ComponentTypeId typeId () const =0
 The component's type id.
 
virtual std::string typeName () const =0
 The component's type name.
 

Static Public Member Functions

static luabind::scope luaBindings ()
 Lua bindings. More...
 
- Static Public Member Functions inherited from thrive::Component
static luabind::scope luaBindings ()
 Lua bindings. More...
 

Detailed Description

A component for a collision reactive entity.

Constructor & Destructor Documentation

CollisionComponent::CollisionComponent ( const std::string &  collisionGroup)

Constructor.

Parameters
collisionGroupInitial collision group that the containing entity should belong to. Collision groups determine which CollisionFilter objects are notified when a collision involving this object occours. More collision groups can be added with addCollisionGroup(group)

Member Function Documentation

void CollisionComponent::addCollisionGroup ( const std::string &  group)

Add a collision group Collision groups determine which CollisionFilter objects are notified when a collision involving this object occours.

Parameters
groupThe collision group to add.
void CollisionComponent::load ( const StorageContainer &  storage)
overridevirtual

Loads the component.

Parameters
storage

Implements thrive::Component.

luabind::scope CollisionComponent::luaBindings ( )
static

Lua bindings.

Exposes:

  • RigidBodyComponent()
  • m_collisionCallbackKey
Returns
void CollisionComponent::removeCollisionGroup ( const std::string &  group)

Remove a collision group.

Parameters
groupThe collision group to remove.
StorageContainer CollisionComponent::storage ( ) const
overridevirtual

Serializes the component.

Returns

Implements thrive::Component.


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