# class hiro::draw::SkeletonRenderer

## Overview

Skeleton visualization with possibility to change poses. More…

    #include <SkeletonRenderer.h>

    class SkeletonRenderer: public hiro::draw::ElementRenderer {
    public:
        // fields

        const uint32_t BONE_COUNT;

        // construction

        SkeletonRenderer(const cogs::Skeleton& skeleton);
        SkeletonRenderer(const hiro::draw::SkeletonRenderer& source);
        SkeletonRenderer(hiro::draw::SkeletonRenderer&&);
        virtual ~SkeletonRenderer();

        // methods

        SkeletonRenderer& operator=(const hiro::draw::SkeletonRenderer& source);
        SkeletonRenderer& operator=(hiro::draw::SkeletonRenderer&&);
        void SetPose(const cogs::SkeletonPose& skelpose);

    protected:
        // methods

        virtual bool IsCompatibileWithStyle(const hiro::draw::Style* style);
        virtual void OnRenderSimple();
        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

Skeleton visualization with possibility to change poses.

### Fields

    const uint32_t BONE_COUNT

Number of bones in the skeleton.

### Construction

    SkeletonRenderer(const cogs::Skeleton& skeleton)

Creates a renderer with the specified skeleton.

### Methods

    void SetPose(const cogs::SkeletonPose& skelpose)

Changes the pose in which the skeleton will be rendered.

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

Test whether specified style is compatible with object.

    virtual void OnRenderSimple()

Renders the skeleton in the line mode.

    virtual void OnRenderFaces()

Renders the skeleton in the polygonal mode.