X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Clipper%2Fclipper.hxx;h=b9f0d1bed86bcf64061a72b7e3c15e17a558e2af;hb=58242933eb92eca020221556f884f075f5e96551;hp=79b7e16daa1a954f4430ea44a813fe811b750164;hpb=cac521c151576bb4e05a590c163249c4374ecbb0;p=flightgear.git diff --git a/Clipper/clipper.hxx b/Clipper/clipper.hxx index 79b7e16da..b9f0d1bed 100644 --- a/Clipper/clipper.hxx +++ b/Clipper/clipper.hxx @@ -52,6 +52,8 @@ typedef vector < gpc_polygon * > polylist; typedef polylist::iterator polylist_iterator; #define FG_MAX_AREAS 20 +#define EXTRA_SAFETY_CLIP +#define FG_MAX_VERTICES 100000 class point2d { public: @@ -66,22 +68,41 @@ public: }; -// Initialize Clipper (allocate and/or connect structures) -bool fgClipperInit(); +class FGClipper { +private: -// Load a polygon definition file -bool fgClipperLoadPolygons(const string& path); + gpc_vertex_list v_list; + // static gpc_polygon poly; + FGPolyList polys_in, polys_out; +public: + + // Constructor + FGClipper( void ); -// Do actually clipping work -bool fgClipperMaster(const point2d& min, const point2d& max); + // Destructor + ~FGClipper( void ); + + // Initialize Clipper (allocate and/or connect structures) + bool init(); + + // Load a polygon definition file + bool load_polys(const string& path); + + // Do actually clipping work + bool clip_all(const point2d& min, const point2d& max); +}; #endif // _CLIPPER_HXX // $Log$ +// Revision 1.2 1999/03/13 23:51:34 curt +// Renamed main.cxx to testclipper.cxx +// Converted clipper routines to a class FGClipper. +// // Revision 1.1 1999/03/01 15:39:39 curt // Initial revision. //