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

#include <nrt/Graphics/Shape.H>

Base class for a graphics shape.

Definition at line 58 of file Shape.H.

Inheritance diagram for nrt::graphics::Shape:
nrt::graphics::Axes nrt::graphics::Box nrt::graphics::Circle nrt::graphics::Cone nrt::graphics::Cylinder nrt::graphics::ExtrudedContour nrt::graphics::Grid nrt::graphics::Line nrt::graphics::PointCloud nrt::graphics::PointCloudNormals nrt::graphics::Polygon nrt::graphics::Rectangle nrt::graphics::SkeletonDefinition nrt::graphics::SkeletonPosture nrt::graphics::Sphere nrt::graphics::Text2D nrt::graphics::Text3D nrt::graphics::Textures

Public Member Functions

 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.
 
virtual void render (nrt::graphics::ShapeRenderer &sr) const =0
 Render this shape into a ShapeRenderer (e.g., OpenGL window) More...
 
bool expired () const
 Returns true if this shape is past its lifetime.
 
template<class Archive >
void serialize (Archive &ar)
 Serialization.
 

Protected Member Functions

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.
 

Protected Attributes

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.
 

Member Function Documentation


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