CORGI
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Entity

Entity classes and functions. More...

Detailed Description

Entity classes and functions.

Classes

class  corgi::Entity
 The basic Entity class for CORGI. It contains an array of index values, which are used by Components for tracking their data associated with an Entity. It also contains a boolean for tracking if this Entity has been marked for deletion. More...
 

Typedefs

typedef int corgi::WorldTime
 A typedef that represents time in the game.
 
typedef uint16_t corgi::ComponentIndex
 A ComponentIndex is a value used to represent the location of a piece of ComponentData, normally inside of a VectorPool.
 
typedef uint16_t corgi::EntityIdType
 A EntityIdType is a value used to uniquely represent an entity in various internal structures. In general, CORGI users should avoid using this directly, and should instead refer to entities via EntityRefs.
 

Variables

const ComponentId corgi::kInvalidComponent = static_cast<ComponentId>(-1)
 A sentinel value to represent an invalid Component. More...
 
static const ComponentIndex corgi::kInvalidComponentIndex
 
static const EntityIdType corgi::kInvalidEntityId = static_cast<EntityIdType>(-1)
 A sentinel value to represent an invalid entity. More...
 
typedef uint16_t corgi::ComponentId
 This represents the ID of a Component. More...
 

Typedef Documentation

This represents the ID of a Component.

Note
Depending on kMaxComponentCount, this value is either an uint8_t, uint16_t, or uint32_t. (However, if you need an uint32_t, you are probably doing something odd.)

Variable Documentation

corgi::kInvalidComponent = static_cast<ComponentId>(-1)

A sentinel value to represent an invalid Component.

Note
Component IDs start at 1.
const ComponentIndex corgi::kInvalidComponentIndex
static
Initial value:
=
static_cast<ComponentIndex>(-1)
uint16_t ComponentIndex
A ComponentIndex is a value used to represent the location of a piece of ComponentData, normally inside of a VectorPool.
Definition: entity_common.h:59
corgi::kInvalidEntityId = static_cast<EntityIdType>(-1)
static

A sentinel value to represent an invalid entity.

Entities have a unique ID that is used reference them internally. This value represents an invalid entity. It is usually either used for uninitialized values, or to indicate a null return value.