33 #if GEOM_PSEUDO3D==GEOM_TRUE
34 namespace GEOM_FADE25D {
35 #elif GEOM_PSEUDO3D==GEOM_FALSE
36 namespace GEOM_FADE2D {
38 #error GEOM_PSEUDO3D is not defined
57 class ConstraintGraph2;
80 std::vector<Triangle2*>*
pvCC;
95 Zone2(Dt2* pDt_,ZoneLocation zoneLoc_);
99 Zone2(Dt2* pDt_,ZoneLocation zoneLoc_,
const std::vector<ConstraintGraph2*>& vConstraintGraphs_);
101 Zone2(Dt2* pDt_,
const std::vector<ConstraintGraph2*>& vConstraintGraphs_,ZoneLocation zoneLoc_,std::vector<Point2>& vStartPoints);
124 bool save(
const char* filename);
144 bool save(std::ostream& stream);
203 void show(
const char* postscriptFilename,
bool bShowFull,
bool bWithConstraints)
const;
218 #if GEOM_PSEUDO3D==GEOM_TRUE
225 void showGeomview(
const char* filename,
const char* color)
const;
232 void showGeomview(Visualizer3* pVis,
const char* color)
const;
235 void analyzeAngles(
const char* name=
"");
249 void smoothing(
int numIterations=2);
321 void optimizeValleysAndRidges(
double tolerance2D,
double lowerThreshold25D);
349 bool assignDt2(Dt2* pDt_);
395 Dt2* getDelaunayTriangulation()
const;
453 #if GEOM_PSEUDO3D==GEOM_TRUE
461 double getArea25D()
const;
483 void optMode_standard_sub(std::vector<Triangle2*>& vT,std::vector<Triangle2*>& vChangedT);
485 void optMode_standard();
487 double optMode_prioq(
double noEdgeBelowDih,
bool bWithProgress);
489 void getEdgesForOptimization(
double noEdgeBelowDegree,std::vector<Edge2>& vEdges);
491 void optMode_simulatedAnnealing();
493 void optMode_simulatedAnnealing_sub(std::vector<Edge2>& vUniqueEdges,
double temperature);
499 void getTriangles_RESULT(std::vector<Triangle2*>& vTriangles)
const;
501 void initWorkspace(
bool bInside,std::vector<Triangle2*>& vWorkspace)
const;
503 void bfsFromWorkspace(std::vector<Triangle2*>& vWorkspace,std::vector<Triangle2*>& vTriangles)
const;
505 Zone2* ctbz_treatCC(std::vector<Triangle2*>& vOneCC);
510 Progress* pZoneProgress;
512 ZoneLocation zoneLoc;
561 #pragma warning(push)
562 #pragma warning(disable:4251)
564 std::vector<ConstraintGraph2*> vConstraintGraphs;
565 std::vector<Point2> vStartPoints;
566 std::vector<Zone2*> vInputZones;
Zone2 * zoneSymmetricDifference(Zone2 *pZone0, Zone2 *pZone1)
Compute the symmetric difference of two zones.
Zone2 * zoneDifference(Zone2 *pZone0, Zone2 *pZone1)
Compute the difference of two zones.
Zone2 * zoneUnion(Zone2 *pZone0, Zone2 *pZone1)
Compute the union of two zones.
Zone2 * zoneIntersection(Zone2 *pZone0, Zone2 *pZone1)
Compute the intersection of two zones.
OptimizationMode
Definition: Zone2.h:49
@ OPTMODE_STANDARD
Fastest optimization mode.
Definition: Zone2.h:50
@ OPTMODE_BEST
Best quality but quite time consuming.
Definition: Zone2.h:52
@ OPTMODE_BETTER
Considerably better quality and still fast.
Definition: Zone2.h:51
Bbox2 is an axis aligned 2D bounding box.
Definition: Bbox2.h:37
ConstraintGraph2 is a set of Constraint Edges (ConstraintSegment2)
Definition: ConstraintGraph2.h:52
MsgBase, a base class for message subscriber classes.
Definition: MsgBase.h:47
User-defined peel predicate.
Definition: UserPredicates.h:60
User-defined predicate (deprecated)
Definition: UserPredicates.h:39
Visualizer2 is a general Postscript writer. It draws the objects Point2, Segment2,...
Definition: Visualizer2.h:56
Zone2 is a certain defined area of a triangulation.
Definition: Zone2.h:92
friend Zone2 * peelOffIf(Zone2 *pZone, UserPredicateT *pPredicate, bool bVerbose)
Peel off border triangles (deprecated)
ConstraintGraph2 * getConstraintGraph() const
Get the associated constraint.
void show(const char *postscriptFilename, bool bShowFull, bool bWithConstraints) const
Postscript visualization.
bool save(std::ostream &stream)
Save the zone.
Bbox2 getBoundingBox() const
Compute the bounding box.
void getBoundaryEdges(std::vector< Edge2 > &vEdges) const
Compute the boundary edges.
double getArea2D() const
Get 2D Area.
void writeObj(const char *outFilename) const
Write the zone to *.obj Writes the triangles of the present Zone2 to an *.obj file (The *....
size_t numberOfConstraintGraphs() const
Get a the number of ConstraintGraph2 objects.
friend Zone2 * zoneIntersection(Zone2 *pZone0, Zone2 *pZone1)
Compute the intersection of two zones.
void getTriangles(std::vector< Triangle2 * > &vTriangles_) const
Get the triangles of the zone.
void getComponentPolygons(std::vector< CompPolygon > &vCompPolygons) const
Get connected components and their boundary polygons.
void show(Visualizer2 *pVisualizer, bool bShowFull, bool bWithConstraints) const
Postscript visualization.
void subscribe(MsgType msgType, MsgBase *pMsg)
Register a message receiver.
void getBoundarySegments(std::vector< Segment2 > &vSegments) const
Compute the boundary segments.
void getConstraintGraphs(std::vector< ConstraintGraph2 * > &vConstraintGraphs_) const
Get the associated constraint graphs.
friend Zone2 * zoneSymmetricDifference(Zone2 *pZone0, Zone2 *pZone1)
Compute the symmetric difference of two zones.
ZoneLocation getZoneLocation() const
Get the zone location.
void getVertices(std::vector< Point2 * > &vVertices_) const
Get the vertices of the zone.
void exportZone(FadeExport &fadeExport, bool bWithCustomIndices) const
Export triangles from a zone.
friend Zone2 * zoneUnion(Zone2 *pZone0, Zone2 *pZone1)
Compute the union of two zones.
void unsubscribe(MsgType msgType, MsgBase *pMsg)
Unregister a message receiver.
void debug(const char *name="")
Development function.
size_t getNumberOfTriangles() const
Get the number of triangles.
friend Zone2 * peelOffIf(Zone2 *pZone, bool bAvoidSplit, PeelPredicateTS *pPredicate)
Peel off border triangles.
bool save(const char *filename)
Save the zone.
Zone2 * convertToBoundedZone()
Convert a zone to a bounded zone.
void unifyGrid(double tolerance)
void statistics(const char *s) const
void getBorderEdges(std::vector< Edge2 > &vBorderEdgesOut) const
Get border edges.
friend Zone2 * zoneDifference(Zone2 *pZone0, Zone2 *pZone1)
Compute the difference of two zones.
Connected component with boundary- and hole polygons.
Definition: Zone2.h:74
std::vector< std::vector< Edge2 > > * pvvHolePolygons
Sorted hole polygons.
Definition: Zone2.h:82
std::vector< Edge2 > * pvOuterPolygon
Sorted outer polygon.
Definition: Zone2.h:81
std::vector< Triangle2 * > * pvCC
One connected component of triangles (connection is meant along edges, not just vertices)
Definition: Zone2.h:80
FadeExport is a simple struct to export triangulation data.
Definition: FadeExport.h:43