113 const std::string& getId()
const;
117 void setId(
const std::string&
id);
140 bool hasInstances()
const;
157 void removeInstance(
Instance* instance);
161 void deleteInstance(
Instance* instance);
165 const std::vector<Instance*>& getInstances()
const;
169 std::vector<Instance*> getInstances(
const std::string&
id);
175 std::vector<Instance*> getInstancesAt(
Location& loc,
bool use_exactcoordinates=
false);
180 std::list<Instance*> getInstancesIn(
Rect& rec);
203 std::vector<Instance*> getInstancesInCircleSegment(
const ModelCoordinate& center,
uint16_t radius, int32_t sangle, int32_t eangle);
207 Instance* getInstance(
const std::string& identifier);
211 void setInstancesVisible(
bool vis);
216 void setLayerTransparency(
uint8_t transparency);
220 uint8_t getLayerTransparency();
232 float getZOffset()
const;
243 bool cellContainsBlockingInstance(
const ModelCoordinate& cellCoordinate);
250 std::vector<Instance*> getBlockingInstances(
const ModelCoordinate& cellCoordinate);
255 void toggleInstancesVisible();
260 bool areInstancesVisible()
const;
291 void setWalkable(
bool walkable);
303 void setInteract(
bool interact,
const std::string&
id);
313 const std::string& getWalkableId();
318 void addInteractLayer(
Layer* layer);
323 const std::vector<Layer*>& getInteractLayers();
328 void removeInteractLayer(
Layer* layer);
332 void createCellCache();
341 void destroyCellCache();
360 std::vector<Instance*>& getChangedInstances();
366 void setInstanceActivityStatus(
Instance* instance,
bool active);
373 void setStatic(
bool stati);
SortingStrategy m_sortingStrategy
sorting strategy for rendering
std::vector< LayerChangeListener * > m_changeListeners
listeners for layer changes
bool m_walkable
is walkable true/false
bool m_static
true if layer is static
InstanceTree * m_instanceTree
The instance tree.
A CellCache is an abstract depiction of one or a few layers and contains additional information...
Base class for all fife classes Used e.g.
CellGrid * m_grid
layer's cellgrid
bool m_instancesVisibility
if true the instances are visibility otherwise they are skipped during rendering
CellCache * m_cellCache
pointer to cellcache
virtual void onInstanceDelete(Layer *layer, Instance *instance)=0
Called when some instance gets deleted on layer.
std::set< Instance * > m_activeInstances
all the active instances on this layer
uint8_t m_transparency
transparency, value 0 means total visible, 128 semi-transparent and 255 invisibility ...
bool m_changed
true if layer (or it's instance) information was changed during previous update round ...
Listener interface for changes happening on a layer.
virtual void onLayerChanged(Layer *layer, std::vector< Instance *> &changedInstances)=0
Called when some instance is changed on layer.
std::string m_id
string identifier
bool m_interact
is interact true/false
PathingStrategy
Defines how pathing can be performed on this layer.
std::vector< Instance * > m_instances
all the instances on this layer
std::vector< Layer * > m_interacts
all assigned interact layers
virtual ~LayerChangeListener()
virtual void onInstanceCreate(Layer *layer, Instance *instance)=0
Called when some instance gets created on layer.
PathingStrategy m_pathingStrategy
pathing strategy for the layer
Map * m_map
pointer to map
An Instance is an "instantiation" of an Object at a Location.
std::string m_walkableId
walkable id
std::vector< Instance * > m_changedInstances
holds changed instances after each update