|
FIFE
2008.0
|
#include <layer.h>


Public Member Functions | |
| Layer (const std::string &identifier, Map *map, CellGrid *grid) | |
| ~Layer () | |
| const std::string & | getId () const |
| void | setId (const std::string &id) |
| Map * | getMap () const |
| CellGrid * | getCellGrid () const |
| void | setCellGrid (CellGrid *grid) |
| InstanceTree * | getInstanceTree (void) const |
| bool | hasInstances () const |
| Instance * | createInstance (Object *object, const ModelCoordinate &p, const std::string &id="") |
| Instance * | createInstance (Object *object, const ExactModelCoordinate &p, const std::string &id="") |
| bool | addInstance (Instance *instance, const ExactModelCoordinate &p) |
| void | deleteInstance (Instance *object) |
| const std::vector< Instance * > & | getInstances () const |
| std::vector< Instance * > | getInstances (const std::string &id) |
| std::vector< Instance * > | getInstancesAt (Location &loc, bool use_exactcoordinates=false) |
| Instance * | getInstance (const std::string &identifier) |
| void | setInstancesVisible (bool vis) |
| void | setLayerTransparency (uint8_t transparency) |
| uint8_t | getLayerTransparency () |
| void | getMinMaxCoordinates (ModelCoordinate &min, ModelCoordinate &max, const Layer *layer=0) const |
| bool | cellContainsBlockingInstance (const ModelCoordinate &cellCoordinate) |
| void | toggleInstancesVisible () |
| bool | areInstancesVisible () const |
| bool | update () |
| void | setPathingStrategy (PathingStrategy strategy) |
| PathingStrategy | getPathingStrategy () const |
| void | addChangeListener (LayerChangeListener *listener) |
| void | removeChangeListener (LayerChangeListener *listener) |
| bool | isChanged () |
| std::vector< Instance * > & | getChangedInstances () |
Public Member Functions inherited from FIFE::ResourceClass | |
| const ResourceLocation & | getResourceLocation () |
| virtual void | setResourceLocation (const ResourceLocation &location) |
| int | getPoolId () |
Public Member Functions inherited from FIFE::FifeClass | |
| fifeid_t | getFifeId () |
| virtual void | addRef () |
| virtual void | decRef () |
| virtual unsigned int | getRefCount () |
Public Member Functions inherited from FIFE::IReferenceCounted | |
| virtual void | addRef ()=0 |
| virtual void | decRef ()=0 |
| virtual unsigned int | getRefCount ()=0 |
| FIFE::Layer::Layer | ( | const std::string & | identifier, |
| Map * | map, | ||
| CellGrid * | grid | ||
| ) |
| void FIFE::Layer::addChangeListener | ( | LayerChangeListener * | listener | ) |
| bool FIFE::Layer::addInstance | ( | Instance * | instance, |
| const ExactModelCoordinate & | p | ||
| ) |
Add a valid instance at a specific position. This is temporary. It will be moved to a higher level later so that we can ensure that each Instance only lives in one layer.
Definition at line 91 of file layer.cpp.
References FIFE::Instance::isActive(), and FIFE::Instance::setLocation().
|
inline |
| bool FIFE::Layer::cellContainsBlockingInstance | ( | const ModelCoordinate & | cellCoordinate | ) |
| Instance * FIFE::Layer::createInstance | ( | Object * | object, |
| const ModelCoordinate & | p, | ||
| const std::string & | id = "" |
||
| ) |
| Instance * FIFE::Layer::createInstance | ( | Object * | object, |
| const ExactModelCoordinate & | p, | ||
| const std::string & | id = "" |
||
| ) |
Add an instance of an object at a specific position
Definition at line 70 of file layer.cpp.
References FIFE::Instance::isActive().
| void FIFE::Layer::deleteInstance | ( | Instance * | object | ) |
|
inline |
Get the Cellgrid
Definition at line 120 of file layer.h.
Referenced by FIFE::Camera::getCellImageDimensions(), and FIFE::CellSelectionRenderer::render().

|
inline |
|
inline |
| Instance * FIFE::Layer::getInstance | ( | const std::string & | identifier | ) |
|
inline |
| std::vector< Instance * > FIFE::Layer::getInstances | ( | const std::string & | id | ) |
| std::vector< Instance * > FIFE::Layer::getInstancesAt | ( | Location & | loc, |
| bool | use_exactcoordinates = false |
||
| ) |
|
inline |
| uint8_t FIFE::Layer::getLayerTransparency | ( | ) |
|
inline |
| void FIFE::Layer::getMinMaxCoordinates | ( | ModelCoordinate & | min, |
| ModelCoordinate & | max, | ||
| const Layer * | layer = 0 |
||
| ) | const |
Retrieves the minimum/maximum coordinates of instances on the layer.
| min | A reference to a ModelCoordinate that will hold the minimum coordinate. |
| max | A reference to a ModelCoordinate that will hold the maximum coordinate. |
| layer | A pointer to another layer that can be used to cast coordinates bettween layers. |
|
inline |
Gets pathing strategy for the layer
| bool FIFE::Layer::hasInstances | ( | ) | const |
|
inline |
| void FIFE::Layer::removeChangeListener | ( | LayerChangeListener * | listener | ) |
|
inline |
|
inline |
| void FIFE::Layer::setInstancesVisible | ( | bool | vis | ) |
| void FIFE::Layer::setLayerTransparency | ( | uint8_t | transparency | ) |
|
inline |
Sets pathing strategy for the layer
| void FIFE::Layer::toggleInstancesVisible | ( | ) |
| bool FIFE::Layer::update | ( | ) |