iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::graphics::SkeletonDefinition Class Reference

#include <nrt/Graphics/Shapes.H>

An articulated skeleton structural definition.

To avoid sending over and over the structural details of a skeleton, the SkeletonDefinition shape should be used jointly with the SkeletonPosture shape. You should only render a SkeletonDefinition shape once (i.e., not in your main display loop, but before it), giving it a unique name, and the ShapeRenderer will create an optimized rendering for it and will remember it. In your main display loop, you would then render for every frame a SkeletonPosture (using the same unique name), which just contains the joint angles for your previously defined SkeletonDefinition.

Definition at line 533 of file Shapes.H.

Inheritance diagram for nrt::graphics::SkeletonDefinition:

Public Member Functions

 SkeletonDefinition (std::string const &name_="Unknown", nrt::graphics::mocap::Skeleton const &skeleton_=nrt::graphics::mocap::Skeleton())
virtual ~SkeletonDefinition ()
 Virtual destructor for safe inheritance.
virtual void render (nrt::graphics::ShapeRenderer &sr) const
 Render this shape into a ShapeRenderer (e.g., OpenGL window)
template<class Archive >
void serialize (Archive &ar)
- Public Member Functions inherited from nrt::graphics::Shape
 Shape (Eigen::Affine3f const &frame_=Eigen::Affine3f::Identity(), nrt::Duration const &lifetime_=nrt::forev(), nrt::graphics::Pen const &pen_=nrt::graphics::Pen(), nrt::graphics::Brush const &brush_=nrt::graphics::Brush())
 Constructor using a lifetime duration.
 Shape (Eigen::Affine3f const &frame_, nrt::Time const &endtime_, nrt::graphics::Pen const &pen_=nrt::graphics::Pen(), nrt::graphics::Brush const &brush_=nrt::graphics::Brush())
 Constructor using an end-of-life time point.
virtual ~Shape ()
 Virtual destructor for safe inheritance.
bool expired () const
 Returns true if this shape is past its lifetime.
template<class Archive >
void serialize (Archive &ar)

Protected Attributes

std::string name
nrt::graphics::mocap::Skeleton skeleton
- Protected Attributes inherited from nrt::graphics::Shape
Eigen::Affine3f frame
 Coordinate frame of this shape.
nrt::Time endtime
 Time after which this shape should be discarded.
nrt::graphics::Pen pen
 Pen to use to draw edges.
nrt::graphics::Brush brush
 Brush to use to draw surfaces.

Additional Inherited Members

- Protected Member Functions inherited from nrt::graphics::Shape
bool prerender (nrt::graphics::ShapeRenderer &sr) const
 Set frame, pen, brush, etc, return false if dead.
void postrender (nrt::graphics::ShapeRenderer &sr) const
 End rendering of a given shape.

The documentation for this class was generated from the following file: