22 #ifndef FIFE_INSTANCERENDERER_H 23 #define FIFE_INSTANCERENDERER_H 41 class InstanceDeleteListener;
59 std::string
getName() {
return "InstanceRenderer"; }
63 void addOutlined(
Instance* instance, int32_t r, int32_t g, int32_t b, int32_t width, int32_t threshold = 1);
std::map< Instance *, AreaInfo > InstanceToAreas_t
ImagePtr getMultiColorOverlay(const RenderItem &vc, OverlayColors *colors=0)
Abstract interface for all the renderbackends.
std::vector< RenderItem * > RenderList
void addOutlined(Instance *instance, int32_t r, int32_t g, int32_t b, int32_t width, int32_t threshold=1)
Marks given instance to be outlined with given parameters.
std::map< Instance *, OutlineInfo > InstanceToOutlines_t
InstanceToEffects_t m_assigned_instances
OutlineInfo(InstanceRenderer *r)
Image * bindColoring(ColoringInfo &info, RenderItem &vc, Camera *cam)
void removeInstance(Instance *instance)
Removes instance from all effects.
InstanceRenderer(RenderBackend *renderbackend, int32_t position)
constructor.
Interface to class owning the renderers Used to get correct subclass of renderer in scripting side (v...
RenderBackend * getRenderBackend() const
Provides access point to the RenderBackend.
std::list< std::string > m_unlit_groups
InstanceToOutlines_t m_instance_outlines
RendererBase * clone()
Makes copy of this renderer.
void removeAllIgnoreLight()
Removes all groups(Namespaces)
void removeOutlined(Instance *instance)
Removes instance from outlining list.
Camera describes properties of a view port shown in the main screen Main screen can have multiple cam...
void check()
Timer callback, tried to remove old effect images.
InstanceDeleteListener * m_delete_listener
void addIgnoreLight(const std::list< std::string > &groups)
Add groups(Namespaces) into a list.
bool needColorBinding()
Returns true if coloring need binding, otherwise false.
bool m_need_bind_coloring
RenderBackend * m_renderbackend
void removeIgnoreLight(const std::list< std::string > &groups)
Removes groups(Namespaces) from the list.
InstanceToAreas_t m_instance_areas
std::map< Instance *, ColoringInfo > InstanceToColoring_t
Base class for all view renderers View renderer renders one aspect of the view shown on screen...
bool isValidImage(const ImagePtr &image)
void renderAlreadySorted(Camera *cam, Layer *layer, RenderList &instances)
virtual ~InstanceRenderer()
Destructor.
void render(Camera *cam, Layer *layer, RenderList &instances)
This method is called by the view to ask renderer to draw its rendering aspect based on given paramet...
void addColored(Instance *instance, int32_t r, int32_t g, int32_t b, int32_t a=128)
Marks given instance to be colored with given parameters.
std::string getName()
Name of the renderer.
uint32_t getRemoveInterval() const
Gets the interval in seconds (default is 60).
void renderOverlay(RenderDataType type, RenderItem *item, uint8_t const *coloringColor, bool recoloring)
void renderUnsorted(Camera *cam, Layer *layer, RenderList &instances)
void removeTransparentArea(Instance *instance)
Removes instance form area list.
void removeAllTransparentAreas()
Removes all transparent areas.
void addTransparentArea(Instance *instance, const std::list< std::string > &groups, uint32_t w, uint32_t h, uint8_t trans, bool front=true)
Marks given instance to have a transparent area with given parameters.
std::map< Instance *, Effect > InstanceToEffects_t
InstanceRenderer * renderer
void reset()
Removes all stuff.
void removeAllOutlines()
Removes all outlines.
static InstanceRenderer * getInstance(IRendererContainer *cnt)
Gets instance for interface access.
std::list< std::string > groups
void setRemoveInterval(uint32_t interval)
Sets the interval in seconds (default is 60).
ImagesToCheck_t m_check_images
void removeAllColored()
Removes all coloring.
Image * bindMultiOutline(OutlineInfo &info, RenderItem &vc, Camera *cam)
void addToCheck(const ImagePtr &image)
Add properly old ImagePtr into a check list.
void removeFromCheck(const ImagePtr &image)
An Instance is an "instantiation" of an Object at a Location.
void removeColored(Instance *instance)
Removes instance from coloring list.
InstanceToColoring_t m_instance_colorings
InstanceRenderer * renderer
std::list< s_image_entry > ImagesToCheck_t
Image * bindOutline(OutlineInfo &info, RenderItem &vc, Camera *cam)
Binds new outline (if needed) to the instance's OutlineInfo.