Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 
002 ///////////////////////////////////////////////////////////////////////
003 //                                                                   //
004 // Class: PolygonTriangulator                                        //
005 //                                                                   //
006 // Description: Triangulates any (non-complex) 2D polygon.           //
007 //                                                                   //
008 // Author: Thomas Kittelmann (Thomas.Kittelmann@cern.ch), March 2007 //
009 //                                                                   //
010 // Notes:                                                            //
011 //                                                                   //
012 //     Actual algorithms are adapted from                            //
013 //     http://www.mema.ucl.ac.be/~wu/Poly2Tri/poly2tri.html          //
014 //     (see copyright notice in .src file)                           //
015 //                                                                   //
016 //     Main changes performed for the present incarnation are        //
017 //     interface & namespace changes, indentation, small             //
018 //     performance tweaks and removal of unused features.            //
019 //     Most importantly, got rid of static and globals so the class  //
020 //     can be reliably used more than once per process. Also, the    //
021 //     output triangles are sorted to preserve "handedness".         //
022 //                                                                   //
023 ///////////////////////////////////////////////////////////////////////
024 
025 
026 #ifndef POLYGONTRIANGULATOR_H
027 #define POLYGONTRIANGULATOR_H
028 
029 #include <vector>
030 #include <list>
031 
032 class PolygonTriangulator {
033 public:
034 
035   typedef std::vector<unsigned> Triangle;
036   typedef std::list<Triangle> Triangles;
037 
038   //When constructed it automatically performs the triangulation.
039   PolygonTriangulator(const std::vector<double>& polygon_xcoords,
040                       const std::vector<double>& polygon_ycoords);
041 
042 
043   // Access the result with this
044   const Triangles* triangles() const;
045 
046   // Output "handedness" (clockwise or anticlockwise order) is the
047   // same for all of the triangles as it were for the input points.
048 
049   //NB: If triangles().size()==0, something went wrong.
050 
051   ~PolygonTriangulator();
052 
053 private:
054   class Polygon;
055   Polygon * polygon;
056 };
057 
058 #endif

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!