SimplePolygon.hpp

00001 // This file is part of the imaging2 class library.
00002 //
00003 // University of Innsbruck, Infmath Imaging, 2009.
00004 // http://infmath.uibk.ac.at
00005 //
00006 // All rights reserved.
00007 
00008 
00009 #ifndef POLYTOPE_SIMPLEPOLYGON_H
00010 #define POLYTOPE_SIMPLEPOLYGON_H
00011 
00012 #include <core/imaging2.hpp>
00013 
00014 namespace imaging
00015 {
00021   class SimplePolygon
00022   {
00023     std::auto_ptr< std::vector< ublas::fixed_vector<float_t, 2> > > _vertices;
00024     
00025     public:
00026     typedef std::vector< ublas::fixed_vector<float_t, 2> > vertex_list_t;
00027     
00028     SimplePolygon();
00029     
00031     SimplePolygon(const SimplePolygon & source);
00032     
00034     SimplePolygon & operator=(const SimplePolygon & source);
00035     
00037     const ublas::fixed_vector<float_t, 2> & vertex(size_t i) const;
00038     
00040     size_t n_vertices() const;
00041     
00043     void set_vertices(std::auto_ptr<vertex_list_t> vertices);
00044     
00046     const vertex_list_t & vertices() const;
00047   };
00048   
00053   float_t compute_intersection_volume(const SimplePolygon & poly_a, const SimplePolygon & poly_b);
00054 }
00055 
00056 #endif

Generated on Tue Feb 10 10:01:30 2009 for imaging2 by  doxygen 1.5.5