# class hiro::draw::BillboardRenderer

## Overview

Renderer used for rendering images in 3D space. More…

    #include <BillboardRenderer.h>

    class BillboardRenderer: public hiro::draw::ElementRenderer {
    public:
        // construction

        BillboardRenderer();
        BillboardRenderer(const std::string& texture_filename);
        BillboardRenderer(const glw::PTexture2D& texture);
        BillboardRenderer(const hiro::draw::BillboardRenderer& source);
        BillboardRenderer(hiro::draw::BillboardRenderer&&);
        virtual ~BillboardRenderer();

        // methods

        BillboardRenderer& operator=(const hiro::draw::BillboardRenderer& source);
        BillboardRenderer& operator=(hiro::draw::BillboardRenderer&&);
        void SetTexture(const glw::PTexture2D& texture);
        glw::PTexture2D GetTexture() const;
        virtual bool IsCompatibileWithStyle(const hiro::draw::Style* style);

    protected:
        // methods

        virtual void OnRenderFaces();
    };

### Inherited Members

    public:
        // methods

        virtual bool IsCompatibileWithStyle(const hiro::draw::Style* style) = 0;
        ElementRenderer& operator=(const hiro::draw::ElementRenderer& source);
        ElementRenderer& operator=(hiro::draw::ElementRenderer&&);

    protected:
        // methods

        virtual void LoadRequiredShaderPrograms(glw::ProgramList* programs);
        virtual void Render(const std::string& program);
        virtual void OnRenderSimple();
        virtual void Render2D(const std::string& program);
        virtual void OnRenderSimple2D();
        virtual void FillTextRenderer(hiro::draw::TextRenderer* t_renderer);

        template <typename StyleType>
        const StyleType* GetStyle() const;

        const Scene* GetScene() const;
        virtual void LoadRequiredShaderPrograms(glw::ProgramList* programs);
        virtual void Render(const std::string& program);
        virtual void OnRenderPoints();
        virtual void OnRenderFaces();
        virtual void OnRenderNormals();
        void RenderPoints(const hiro::draw::PointsStyle& style, std::function<void(void)> render_func);
        void RenderFaces(const hiro::draw::FacesStyle& style, std::function<void(void)> render_func);
        void RenderNormals(const hiro::draw::NormalsStyle& style, std::function<void(void)> render_func);

## Detailed Documentation

Renderer used for rendering images in 3D space.

### Construction

    BillboardRenderer()

Creates a renderer with an empty image.

    BillboardRenderer(const std::string& texture_filename)

Creates a renderer with an image loaded from a file.

    BillboardRenderer(const glw::PTexture2D& texture)

Creates a renderer with an image stored in a provided texture.

### Methods

    void SetTexture(const glw::PTexture2D& texture)

Replaces currently set image with a new one.

    glw::PTexture2D GetTexture() const

Returns currently set texture.

    virtual bool IsCompatibileWithStyle(const hiro::draw::Style* style)

Test whether specified style is compatible with the object.

    virtual void OnRenderFaces()

Defines behavior on face rendering.