190 m_animation(animation),
344 std::vector<GenericRendererElementInfo*>::const_iterator info_it =
m_groups[group].begin();
345 for (;info_it !=
m_groups[group].end(); ++info_it) {
353 std::map<std::string, std::vector<GenericRendererElementInfo*> >::iterator it =
m_groups.begin();
354 for (; it !=
m_groups.end(); ++it) {
355 std::vector<GenericRendererElementInfo*>::const_iterator info_it = it->second.begin();
356 for (;info_it != it->second.end(); ++info_it) {
368 std::map<std::string, std::vector<GenericRendererElementInfo*> >::iterator group_it =
m_groups.begin();
369 for(; group_it !=
m_groups.end(); ++group_it) {
370 std::vector<GenericRendererElementInfo*>::const_iterator info_it = group_it->second.begin();
371 for (;info_it != group_it->second.end(); ++info_it) {
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
Abstract interface for all the renderbackends.
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
std::vector< RenderItem * > RenderList
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
T h
Height of the rectangle.
GenericRendererTriangleInfo(RendererNode n1, RendererNode n2, RendererNode n3, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
GenericRendererLineInfo(RendererNode n1, RendererNode n2, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
GenericRendererTextInfo(RendererNode n, IFont *font, std::string text, bool zoomed=true)
Point getCalculatedPoint(Camera *cam, Layer *layer, const bool zoomed=false)
void removeAll()
Removes all elements.
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
Interface to class owning the renderers Used to get correct subclass of renderer in scripting side (v...
static Logger _log(LM_AUDIO)
virtual Image * getAsImageMultiline(const std::string &text)=0
Gets given text as Image.
virtual RendererBase * getRenderer(const std::string &renderername)=0
Returns renderer with given name.
void addAnimation(const std::string &group, RendererNode n, AnimationPtr animation, bool zoomed=true)
Adds an animation.
Camera describes properties of a view port shown in the main screen Main screen can have multiple cam...
static TimeManager * instance()
virtual void drawVertex(const Point &p, const uint8_t size, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
Draws a quad that represents a vertex with given RGBA.
virtual uint32_t getLightingModel() const =0
Gets the current light model.
virtual void drawTriangle(const Point &p1, const Point &p2, const Point &p3, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
Draws triangle between given points with given RGBA.
bool intersects(const RectType< T > &rect) const
Check whether two rectangles share some area.
RenderBackend * m_renderbackend
virtual void changeRenderInfos(RenderDataType type, uint16_t elements, int32_t src, int32_t dst, bool light, bool stentest, uint8_t stenref, GLConstants stenop, GLConstants stenfunc, OverlayType otype=OVERLAY_TYPE_NONE)=0
Dirty helper function to change the render infos.
GenericRendererResizeInfo(RendererNode n, ImagePtr image, int32_t width, int32_t height, bool zoomed=true)
ImagePtr getFrameByTimestamp(uint32_t timestamp)
Gets the frame image that matches the given timestamp.
uint32_t getHeight() const
Base class for all view renderers View renderer renders one aspect of the view shown on screen...
void reset()
Resets the renderer.
GenericRendererVertexInfo(RendererNode center, int32_t size, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
GenericRenderer(RenderBackend *renderbackend, int32_t position)
Constructor.
void addTriangle(const std::string &group, RendererNode n1, RendererNode n2, RendererNode n3, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Adds a triangle.
virtual bool putPixel(int32_t x, int32_t y, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
Writes pixel to given position.
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
virtual void drawLine(const Point &p1, const Point &p2, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
Draws line between given points with given RGBA.
virtual void setEnabled(bool enabled)
Enables renderer.
double getZoom() const
Gets camera zoom.
void addLine(const std::string &group, RendererNode n1, RendererNode n2, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Adds a line.
static GenericRenderer * getInstance(IRendererContainer *cnt)
Gets instance for interface access.
const Rect & getViewPort() const
Gets the viewport for camera in pixel coordinates.
GenericRendererQuadInfo(RendererNode n1, RendererNode n2, RendererNode n3, RendererNode n4, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
void addQuad(const std::string &group, RendererNode n1, RendererNode n2, RendererNode n3, RendererNode n4, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Adds a quad.
GenericRendererPointInfo(RendererNode n, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Pure abstract Font interface.
virtual void render(const Rect &rect, uint8_t alpha=255, uint8_t const *rgb=0)=0
Renders itself to the current render target (main screen or attached destination image) at the rectan...
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
std::map< std::string, std::vector< GenericRendererElementInfo * > > m_groups
A map that holds the groups together with the appended render elements.
void addVertex(const std::string &group, RendererNode n, int32_t size, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Adds a vertex.
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...
RendererBase * clone()
Makes copy of this renderer.
void resizeImage(const std::string &group, RendererNode n, ImagePtr image, int32_t width, int32_t height, bool zoomed=true)
Adds an image with another size.
GenericRendererAnimationInfo(RendererNode n, AnimationPtr animation, bool zoomed=true)
void addText(const std::string &group, RendererNode n, IFont *font, const std::string &text, bool zoomed=true)
Adds text.
GenericRendererImageInfo(RendererNode n, ImagePtr image, bool zoomed=true)
uint32_t scaleTime(float multiplier, uint32_t ticks)
Utility function to calculate time scaling.
void render(Camera *cam, Layer *layer, RenderList &instances, RenderBackend *renderbackend)
uint32_t getDuration() const
Gets the total duration for the whole animation.
void addImage(const std::string &group, RendererNode n, ImagePtr image, bool zoomed=true)
Adds an image.
T w
Width of the rectangle.
void addPoint(const std::string &group, RendererNode n, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Adds a point.
uint32_t getWidth() const
virtual ~GenericRenderer()
Destructor.
virtual void drawQuad(const Point &p1, const Point &p2, const Point &p3, const Point &p4, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0
Draws quad between given points with given RGBA.