xc
GTSSurfaceIntersection.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. PĂ©rez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //GTSSurfaceIntersection.h
22 //C++ wrapper para la clase GtsFace de la biblioteca GTS.
23 
24 #ifndef GTS_SURFACEINTERSECTION_H
25 #define GTS_SURFACEINTERSECTION_H
26 
27 #include "gts.h"
28 #include <string>
29 
30 class GTSSurface;
31 
33  {
34  GtsSurfaceInter *si;
35 
36  bool borrar;
37 
38  void borra(void);
39 
40  protected:
41  GtsSurfaceInter const *get_const_ptr(void) const
42  { return si; }
43  GtsSurfaceInter *get_ptr(void)
44  { return si; }
45  GTSSurface bool_op(const std::string &operation,GTSSurface &s2) const;
46 
47  public:
48 
49  GTSSurfaceIntersection(GtsSurfaceInter *f= nullptr);
50  GTSSurfaceIntersection(GtsSurfaceInterClass *klass,
51  GTSSurface &s1, GTSSurface &s2);
54 
55  void Write(FILE *fp);
56 
57  bool Check(bool &closed) const;
58 
59  void InterBoolean(GTSSurface &surface,GtsBooleanOperation op) const;
60 
62 
63  friend GTSSurface BoolOp(const GTSSurfaceIntersection &si,GTSSurface &s1, GTSSurface &s2,const std::string &str_op,bool check_self_intersection,bool verbose);
64  };
65 
66 GTSSurface BoolOp(const GTSSurfaceIntersection &,GTSSurface &, GTSSurface &,const std::string &,bool check_self_intersection,bool verbose= false);
67 
68 #endif
Definition: GTSSurfaceIntersection.h:32
void InterBoolean(GTSSurface &surface, GtsBooleanOperation op) const
Append to the surface argument the part defined by THIS and the op.
Definition: GTSSurfaceIntersection.cc:96
Definition: GTSSurface.h:38