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

A collection of Components for common game services. More...

Detailed Description

A collection of Components for common game services.

Classes

struct  corgi::component_library::AnimationData
 The Component data structure that corresponds to each Entity that is registered with the AnimationComponent. It contains all the information for each Entity's animation. More...
 
class  corgi::component_library::AnimationComponent
 A Component that provides an elegant way to handle Entity animation by interacting with the Motive animation library. More...
 
class  corgi::CameraInterface
 An interface for 3D cameras, allowing them to have position, facing field of view, etc. Libraries can use this to pass around generic cameras that the game itself can implement the logic for. More...
 
struct  corgi::component_library::CommonServicesData
 Holds the data that Components need (e.g. the input system, renderer, etc.). More...
 
class  corgi::component_library::CommonServicesComponent
 This is a unique Component, as no Entities will register with it and it contains no per-entity data. Its use is to provide a central location for other Components to easily access game services and managers (since Components themselves do not have direct access to the game state, but do have access to other Components). More...
 
class  corgi::component_library::DefaultEntityFactory
 Implementations of DefaultEntityFactory can be found in default_entity_factory.inc. More...
 
class  corgi::component_library::EntityFactory
 An EntityFactory builds Entities based on prototypes, using FlatBuffers to specify the raw data for Entities. More...
 
struct  corgi::component_library::SerializableGraphState
 Contains the graph state information, as well as the filename for serialization. More...
 
struct  corgi::component_library::GraphData
 Contains the data for each Entity registered with the GraphComponent. More...
 
class  corgi::component_library::GraphComponent
 Manages the event graphs for any Entity that wishes to utilize the event system. More...
 
struct  corgi::component_library::MetaData
 Holds specific metadata for an Entity. More...
 
class  corgi::component_library::MetaComponent
 A Component used to track the metadata about the Entities themselves. More...
 
struct  CollisionData
 Data describing which Entities were involed in a collision and where. More...
 
struct  RigidBodyData
 Data describing a single Bullet rigid body shape. More...
 
struct  PhysicsData
 Data for scene object Components. More...
 
class  PhysicsComponent
 The Component that manages the physics for every Entity that registers with it. More...
 
struct  corgi::component_library::RenderMeshData
 The per-Entity mesh and shader data. More...
 
struct  corgi::component_library::RenderlistEntry
 Struct used for keeping track of and sorting our render lists. More...
 
class  corgi::component_library::RenderMeshComponent
 A Component that handles the rendering of each Entities mesh that is registered with this Component. More...
 
struct  corgi::component_library::TransformData
 Holds all transform data for Entities, such as position, scale, and orientation. More...
 
class  corgi::component_library::TransformComponent
 A Component that handles the transformations for every Entity that registers with it. More...
 

Typedefs

typedef void(* CollisionCallback )(CollisionData *collision_data, void *user_data)
 A function pointer for the callback after a collision.
 

Functions

bool corgi::component_library::GetMaxMinPositionsForEntity (corgi::EntityRef &entity, corgi::EntityManager &entity_manager, mathfu::vec3 *max, mathfu::vec3 *min)
 Get the minimum and maximum positions of an Entity, based on its and its children's rendermeshes. More...
 

Variables

static const int kMaxPhysicsBodies = 5
 The maximum number of physics bodies per Entity.
 
static const float kDefaultPhysicsGravity = -9.8f
 The constant for gravity.
 
static const int kDefaultPhysicsMaxSteps = 5
 The default number of max steps to advance per frame.
 

Function Documentation

bool corgi::component_library::GetMaxMinPositionsForEntity ( corgi::EntityRef entity,
corgi::EntityManager entity_manager,
mathfu::vec3 *  max,
mathfu::vec3 *  min 
)

Get the minimum and maximum positions of an Entity, based on its and its children's rendermeshes.

Parameters
[in]entityAn EntityRef reference to the Entity whose minimum and maximum positions should be returned through the min and max parameters.
[in]entity_managerAn EntityManager reference to the EntityManager reponsible for managing this Entity.
[out]maxA mathfu::vec3 pointer that is used to capture the output value of the maximum Entity position.
[out]minA mathfu::vec3 pointer that is used to capture the output value of the minimum Entity position.
Returns
Returns true if min and max were set successfully. Otherwise it returns false.