#include <SimplePolygon.hpp>
Public Types | |
typedef std::vector < ublas::fixed_vector< float_t, 2 > > | vertex_list_t |
Public Member Functions | |
SimplePolygon (const SimplePolygon &source) | |
SimplePolygon & | operator= (const SimplePolygon &source) |
const ublas::fixed_vector < float_t, 2 > & | vertex (size_t i) const |
size_t | n_vertices () const |
void | set_vertices (std::auto_ptr< vertex_list_t > vertices) |
const vertex_list_t & | vertices () const |
This class implements a simple polygon given by the list of its boundary vertices. For more complex polygons consisting of multiple contours and holes use Polygon.
imaging::SimplePolygon::SimplePolygon | ( | const SimplePolygon & | source | ) |
Copy constructor.
References _vertices.
SimplePolygon & imaging::SimplePolygon::operator= | ( | const SimplePolygon & | source | ) |
Copy assignement.
References _vertices.
const ublas::fixed_vector< float_t, 2 > & imaging::SimplePolygon::vertex | ( | size_t | i | ) | const |
Returns the i-th vertex of the polygon.
Referenced by imaging::compute_intersection_volume().
size_t imaging::SimplePolygon::n_vertices | ( | ) | const |
Returns the total number of vertices of the polygon.
Referenced by imaging::compute_intersection_volume().
void imaging::SimplePolygon::set_vertices | ( | std::auto_ptr< vertex_list_t > | vertices | ) |
Sets vertices as the vertices of the polygon.
const SimplePolygon::vertex_list_t & imaging::SimplePolygon::vertices | ( | ) | const |
Returns the vertices of the polygon.
Referenced by imaging::operator<<().