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

Script version of the EntityFilter. More...

#include <script_entity_filter.h>

Classes

struct  Implementation
 

Public Member Functions

 ScriptEntityFilter (luabind::object componentTypes, bool recordChanges)
 Constructor. More...
 
 ScriptEntityFilter (luabind::object componentTypes)
 Constructor. More...
 
 ~ScriptEntityFilter ()
 Destructor.
 
const std::unordered_set< EntityId > & addedEntities ()
 Returns the set of added entities. More...
 
void clearChanges ()
 Clears added and removed entities from this filter.
 
bool containsEntity (EntityId id) const
 Checks for an entity id. More...
 
const std::unordered_set< EntityId > & entities ()
 The set of entities that are contained in this filter.
 
void init (GameState *gameState)
 Initializes this filter.
 
const std::unordered_set< EntityId > & removedEntities ()
 The set of removed entities. More...
 
void shutdown ()
 Shuts this filter down.
 

Static Public Member Functions

static luabind::scope luaBindings ()
 Lua bindings. More...
 

Detailed Description

Script version of the EntityFilter.

Constructor & Destructor Documentation

ScriptEntityFilter::ScriptEntityFilter ( luabind::object  componentTypes,
bool  recordChanges 
)

Constructor.

Parameters
componentTypesA Lua table containing the Lua class objects of the components that should be filtered for
recordChangesIf true, this entity filter will keep track of the entities added and removed during a frame.
ScriptEntityFilter::ScriptEntityFilter ( luabind::object  componentTypes)

Constructor.

This is the same as the other constructor, but with recordChanges as false.

Parameters
componentTypesA Lua table containing the Lua class objects of the components that should be filtered for

Member Function Documentation

const std::unordered_set< EntityId > & ScriptEntityFilter::addedEntities ( )

Returns the set of added entities.

Be sure to call clearChanges() once you have processed all added and removed entities.

bool ScriptEntityFilter::containsEntity ( EntityId  id) const

Checks for an entity id.

Parameters
idThe id to check for
Returns
true if the entity is contained in this filter, false otherwise.
luabind::scope ScriptEntityFilter::luaBindings ( )
static
const std::unordered_set< EntityId > & ScriptEntityFilter::removedEntities ( )

The set of removed entities.

Be sure to call clearChanges() once you have processed all added and removed entities.


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