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

#include <nrt/Graphics/Shapes.H>

A 2D grid.

Definition at line 81 of file Shapes.H.

Inheritance diagram for nrt::graphics::Grid:
nrt::graphics::Shape

Public Member Functions

 Grid (size_t const nx_=10, size_t const ny_=10, 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. More...
 
virtual ~Grid ()
 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)
 Number of steps in X and Y. More...
 
- 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)
 Serialization.
 

Protected Attributes

size_t nx
 
size_t ny
 
- 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.
 

Constructor & Destructor Documentation

nrt::graphics::Grid::Grid ( size_t const  nx_ = 10,
size_t const  ny_ = 10,
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.

The grid spans between (-0.5, -0.5, 0) and (0.5, 0.5, 0) with nx and ny steps

Member Function Documentation

template<class Archive >
void nrt::graphics::Grid::serialize ( Archive &  ar)
inline

Number of steps in X and Y.

Serialization

Definition at line 103 of file Shapes.H.


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