Fade2.5D Documentation pages v1.86
Delaunay Features
CutAndFill.h
1 // Copyright (C) Geom Software e.U, Bernhard Kornberger, Graz/Austria
2 //
3 // This file is part of the Fade2D library. The student license is free
4 // of charge and covers personal non-commercial research. Licensees
5 // holding a commercial license may use this file in accordance with
6 // the Commercial License Agreement.
7 //
8 // This software is provided AS IS with NO WARRANTY OF ANY KIND,
9 // INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
10 // FOR A PARTICULAR PURPOSE.
11 //
12 // Please contact the author if any conditions of this licensing are
13 // not clear to you.
14 //
15 // Author: Bernhard Kornberger, bkorn (at) geom.at
16 // http://www.geom.at
17 #pragma once
18 #include "common.h"
19 #include "MsgBase.h"
20 
21 #include "CAF_Component.h"
22 
23 #if GEOM_PSEUDO3D==GEOM_TRUE
24  namespace GEOM_FADE25D {
25 
26 class Zone2; // FWD;
27 class CutAndFillImpl; // FWD
28 class Visualizer2; // FWD
29 class Fade_2D; // FWD
41 class CLASS_DECLSPEC CutAndFill
42 {
43 public:
52  CutAndFill(Zone2* pZoneBefore,Zone2* pZoneAfter,double ignoreThreshold=1e-3);
53  CutAndFill();
54  ~CutAndFill();
55 
70  bool getDiffZone( Zone2*& pDiffZone,
71  std::map<Point2*,std::pair<double,double> >& mVtx2BeforeAfter);
72 
86  void subscribe(MsgType msgType,MsgBase* pMsg);
87 
94  void unsubscribe(MsgType msgType,MsgBase* pMsg);
95 
107  size_t getNumberOfComponents() const;
108 
113  CAF_Component* getComponent(size_t ith) const;
114 
124  bool go();
125 
134  void show(Visualizer2* pVis) const;
135 
136 protected:
137 
138  CutAndFillImpl* pCAFI;
139 private:
140  CutAndFill(const CutAndFill& ):pCAFI(NULL)
141  {
142  // Never reached
143  }
144  CutAndFill& operator=(const CutAndFill& )
145  {
146  pCAFI=NULL;
147  return *this;
148  }
149 };
150 
151 } // Namespace Fade25D only
152 
153 #elif GEOM_PSEUDO3D==GEOM_FALSE
154 #else
155  #error GEOM_PSEUDO3D is not defined
156 #endif
157 
158 
GEOM_FADE25D::MsgBase
MsgBase, a base class for message subscriber classes.
Definition: MsgBase.h:45
CAF_Component.h
GEOM_FADE25D::CutAndFill
CutAndFill computes the volume(s) between two overlapping surfaces.
Definition: CutAndFill.h:41
GEOM_FADE25D::Visualizer2
Visualizer2 is a general Postscript writer. It draws the objects Point2, Segment2,...
Definition: Visualizer2.h:54
GEOM_FADE25D::CAF_Component
CAF_Component stands for CUT AND FILL COMPONENT. It represents a connected area of the surface.
Definition: CAF_Component.h:58
GEOM_FADE25D::Point2
Point.
Definition: Point2.h:40
GEOM_FADE25D::Zone2
Zone2 is a certain defined area of a triangulation.
Definition: Zone2.h:60