contrib/gel/gtrl/gtrl_triangulation.h
Go to the documentation of this file.
00001 // This is gel/gtrl/gtrl_triangulation.h
00002 #ifndef gtrl_triangulation_h_
00003 #define gtrl_triangulation_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author crossge@crd.ge.com
00010 
00011 #include <gtrl/gtrl_polygon.h>
00012 #include <gtrl/gtrl_triangle.h>
00013 
00014 //: triangulates holeless polygons
00015 
00016 class gtrl_triangulation
00017 {
00018  public:
00019   // constructors / destructors
00020   gtrl_triangulation( gtrl_polygon poly);
00021 
00022   // implementation
00023   void run();
00024   vcl_vector<gtrl_triangle_sptr> get_triangles() const { return tris_; }
00025   vcl_vector<gtrl_vertex_sptr> get_points() const { return pts_; }
00026 
00027  protected:
00028   gtrl_polygon poly_;
00029 
00030   vcl_vector<gtrl_triangle_sptr> tris_;
00031   vcl_vector<gtrl_vertex_sptr>   pts_;
00032 };
00033 
00034 #endif // gtrl_triangulation_h_