HIRO_DRAW
Computer Graphics Structures library
hiro::draw::SkeletonRenderer Class Reference

Skeleton visualization with possibility to change poses. More...

Inheritance diagram for hiro::draw::SkeletonRenderer:
[legend]

Public Member Functions

 SkeletonRenderer (const cogs::Skeleton &skeleton)
 Creates a renderer with the specified skeleton.
 
 SkeletonRenderer (const hiro::draw::SkeletonRenderer &source)=delete
 
SkeletonRenderer & operator= (const hiro::draw::SkeletonRenderer &source)=delete
 
 SkeletonRenderer (hiro::draw::SkeletonRenderer &&) noexcept=delete
 
SkeletonRenderer & operator= (hiro::draw::SkeletonRenderer &&) noexcept=delete
 
void SetPose (const cogs::SkeletonPose &skelpose)
 Changes the pose in which the skeleton will be rendered.
 
- Public Member Functions inherited from hiro::draw::ElementRenderer
 ElementRenderer (const hiro::draw::ElementRenderer &source)=delete
 
ElementRenderer & operator= (const hiro::draw::ElementRenderer &source)=delete
 
 ElementRenderer (hiro::draw::ElementRenderer &&) noexcept=delete
 
ElementRenderer & operator= (hiro::draw::ElementRenderer &&) noexcept=delete
 

Data Fields

const uint32_t BONE_COUNT
 Number of bones in the skeleton.
 

Protected Member Functions

bool IsCompatibileWithStyle (const hiro::draw::Style *style) override
 Test whether specified style is compatible with object.
 
void OnRenderSimple () override
 Renders the skeleton in the line mode.
 
virtual void OnRenderFaces () override
 Renders the skeleton in the polygonal mode.
 
- Protected Member Functions inherited from hiro::draw::ElementRenderer
 ElementRenderer ()
 Protected constructor, since this class should serve only as a base class.
 
void LoadRequiredShaderPrograms (glw::ProgramList *programs) override
 Loads shader programs required by this renderer.
 
void Render (const std::string &program) override
 Specifies what happens during render.
 
virtual void OnRenderPoints ()
 Override if you wish to render points. Use the method RenderPoints to actually render.
 
virtual void OnRenderNormals ()
 Override if you wish to render normals. Use the method RenderNormals to actually render.
 
void RenderPoints (const hiro::draw::PointsStyle &style, std::function< void(void)> render_func)
 Prepares shader according to the style and renders points using the specified render_func.
 
void RenderFaces (const hiro::draw::FacesStyle &style, std::function< void(void)> render_func)
 Prepares shader according to the style and renders faces using the specified render_func.
 
void RenderNormals (const hiro::draw::NormalsStyle &style, std::function< void(void)> render_func)
 Prepares shader according to the style and renders normals using the specified render_func.
 
- Protected Member Functions inherited from hiro::draw::Renderer
virtual void Render2D (const std::string &program)
 Override this method to specify custom rendering behavior in 2D rendering pass.
 
virtual void OnRenderSimple2D ()
 Provides the possibility to render shapes using a simple color shader. More...
 
virtual void FillTextRenderer (hiro::draw::TextRenderer *t_renderer)
 Override this method to define texts to be rendered.
 
template<typename StyleType >
const StyleType * GetStyle () const
 Obtain currently set object style of specific type. Can be used only in Update-Render stage!
 
const Scene * GetScene () const
 

Detailed Description

Skeleton visualization with possibility to change poses.