A Component that provides an elegant way to handle Entity animation by interacting with the Motive animation library.
|
virtual | ~AnimationComponent () |
| Deconstructor of the Animation component.
|
|
virtual void | UpdateAllEntities (corgi::WorldTime delta_time) |
| Updates all Motivators in the AnimationData, as well as, any other Motivators that were initialized with AnimationComponent's MotiveEngine. More...
|
|
virtual void | AddFromRawData (corgi::EntityRef &entity, const void *data) |
| Deserialize a flat binary buffer to create and populate an Entity from raw data. More...
|
|
virtual RawDataUniquePtr | ExportRawData (const corgi::EntityRef &entity) const |
| Serializes an AnimationComponent's data for a given Entity. More...
|
|
void | Animate (const corgi::EntityRef &entity, const motive::RigAnim &anim) |
| Begin playback of a given RigAnim on a given Entity. More...
|
|
bool | AnimateFromTable (const corgi::EntityRef &entity, int anim_idx) |
| Query the AnimTable for an animation and then play it. More...
|
|
bool | HasAnim (const corgi::EntityRef &entity, int anim_idx) const |
| Check if a certain animation exists with a given index in the AnimTable for a given Entity. More...
|
|
motive::MotiveTime | AnimLength (const corgi::EntityRef &entity, int anim_idx) const |
| Get the length of an Entity's animation, given an animation index. More...
|
|
int | LastAnimIdx (const corgi::EntityRef &entity) const |
| Get the index of the last animation that was played. More...
|
|
motive::MotiveEngine & | engine () |
| Get a reference to the engine that can be used for external Motivators as well. For the greatest efficiency, there should only be one MotiveEngine. More...
|
|
const motive::MotiveEngine & | engine () const |
| Get a const reference to the engine that can be used for external Motivators as well. For the greatest efficiency, there should only be one MotiveEngine. More...
|
|
motive::AnimTable & | anim_table () |
| Get a reference to the animation table that is queried when AnimateFromTable() is called. More...
|
|
const motive::AnimTable & | anim_table () const |
| Get a const reference to the animation table that is queried when AnimateFromTable() is called. More...
|
|
| Component () |
| Construct a Component without an EntityManager.
|
|
virtual | ~Component () |
| Destructor for a Component.
|
|
virtual void | AddEntityGenerically (EntityRef &entity) |
| Provides an alternate way to add Entities if you do not care about the returned data structure, and if you do not feel like casting the BaseComponent into something more specific. More...
|
|
AnimationData * | AddEntity (EntityRef &entity, AllocationLocation alloc_location) |
| Adds an Entity to the list that this Component is tracking. More...
|
|
AnimationData * | AddEntity (EntityRef &entity) |
| Adds an Entity to the list that this Component is tracking. More...
|
|
virtual void | RemoveEntity (EntityRef &entity) |
| Removes an Entity from the list of Entities. More...
|
|
virtual EntityIterator | RemoveEntity (EntityIterator iter) |
| Removes an Entity from the list of Entities. More...
|
|
virtual EntityIterator | begin () |
| Gets an iterator that will iterate over every Entity associated with the Component, starting from the beginning. More...
|
|
virtual EntityIterator | end () |
| Gets an iterator that points to the end of the list of all entites in the Component. More...
|
|
virtual bool | HasDataForEntity (const EntityRef &entity) |
| Checks if this component contains any data associated with the supplied entity.
|
|
virtual void * | GetComponentDataAsVoid (const EntityRef &entity) |
| Gets the data for a given Entity as a void pointer. More...
|
|
virtual const void * | GetComponentDataAsVoid (const EntityRef &entity) const |
| Gets the data for a given Entity as a const void pointer. More...
|
|
AnimationData * | GetComponentData (size_t data_index) |
| Gets the Component data stored at a given index. More...
|
|
AnimationData * | GetComponentData (const EntityRef &entity) |
| Gets the data for a given Entity. More...
|
|
const AnimationData * | GetComponentData (size_t data_index) const |
| Gets the Component data stored at a given index. More...
|
|
const AnimationData * | GetComponentData (const EntityRef &entity) const |
| Gets the data for a given Entity. More...
|
|
virtual void | ClearComponentData () |
| Clears all tracked Component data.
|
|
ComponentDataType * | Data (const EntityRef &entity) |
| A utility function for retrieving the Component data for an Entity from a specific Component. More...
|
|
ComponentDataType * | Data (const EntityRef &entity) const |
| A utility function for retrieving the Component data for an Entity from a specific Component. More...
|
|
bool | IsRegisteredWithComponent (const EntityRef &entity) |
| A utility function for checking if an entity is registered with a particular component. More...
|
|
ComponentDataType * | GetComponent () |
| A utility function for retrieving a reference to a specific Component object, by type. More...
|
|
virtual void | Init () |
| Override this function with code that should be executed when the Component is added to the EntityManager. (This typically happens once, at the beginning of the game before any Entities are added.)
|
|
virtual void | InitEntity (EntityRef &) |
| Override this function with code that should be executed when an Entity is added to the Component.
|
|
virtual void | Cleanup () |
| Override this function with any code that executes when this Component is removed from the EntityManager. (i.e. Usually when the game/state is over and everything is shutting down.)
|
|
virtual void | CleanupEntity (EntityRef &) |
| Override this function with any code that needs to be executed when an Entity is removed from this Component.
|
|
virtual void | SetEntityManager (EntityManager *entity_manager) |
| Set the EntityManager for this Component. More...
|
|
virtual void | SetComponentIdOnDataType (ComponentId id) |
| Sets the Component ID on the data type. More...
|
|
virtual | ~ComponentInterface () |
| A destructor for the Component interface.
|
|