Class CollisionComponent

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class CollisionComponent : public Component

Base class for collider components.

Subclassed by RigidBodyComponent, TriggerComponent

Public Functions

CollisionComponent(Entity &owner, int collisionGroup, int collisionMask)
virtual ~CollisionComponent()
virtual void handleHit(Hit *h)
void onRemove()

Perform operations prior to detachment from owning entity and destruction.

JSON::json getJSON() const

Get JSON representation of the component data needed to re-construct component from memory.

void draw()

Expose the component data with ImGui.

void displayCollisionLayers(unsigned int &collision)

Protected Functions

void detachCollisionObject()
void attachCollisionObject()

Protected Attributes

Ref<btCollisionObject> m_CollisionObject
unsigned int m_CollisionGroup
unsigned int m_CollisionMask