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;
83 std::vector<Triangle2*>*
pvCC;
98 Zone2(Dt2* pDt_,ZoneLocation zoneLoc_);
102 Zone2(Dt2* pDt_,ZoneLocation zoneLoc_,
const std::vector<ConstraintGraph2*>& vConstraintGraphs_);
104 Zone2(Dt2* pDt_,
const std::vector<ConstraintGraph2*>& vConstraintGraphs_,ZoneLocation zoneLoc_,std::vector<Point2>& vStartPoints);
127 bool save(
const char* filename);
147 bool save(std::ostream& stream);
206 void show(
const char* postscriptFilename,
bool bShowFull,
bool bWithConstraints)
const;
221 #if GEOM_PSEUDO3D==GEOM_TRUE
238 void analyzeAngles(
const char* name=
"");
325 void optimizeValleysAndRidges(
double tolerance2D,
double lowerThreshold25D);
353 bool assignDt2(Dt2* pDt_);
399 Dt2* getDelaunayTriangulation()
const;
457 #if GEOM_PSEUDO3D==GEOM_TRUE
491 void optMode_standard_sub(std::vector<Triangle2*>& vT,std::vector<Triangle2*>& vChangedT);
493 void optMode_standard();
495 double optMode_prioq(
double noEdgeBelowDih,
bool bWithProgress);
497 void getEdgesForOptimization(
double noEdgeBelowDegree,std::vector<Edge2>& vEdges);
499 void optMode_simulatedAnnealing();
501 void optMode_simulatedAnnealing_sub(std::vector<Edge2>& vUniqueEdges,
double temperature);
504 void removeConstraintEdges(std::vector<Edge2>& vEdges)
const;
509 void getTriangles_RESULT(std::vector<Triangle2*>& vTriangles)
const;
511 void initWorkspace(
bool bInside,std::vector<Triangle2*>& vWorkspace)
const;
513 void bfsFromWorkspace(std::vector<Triangle2*>& vWorkspace,std::vector<Triangle2*>& vTriangles)
const;
515 Zone2* ctbz_treatCC(std::vector<Triangle2*>& vOneCC);
520 Progress* pZoneProgress;
522 ZoneLocation zoneLoc;
572 #pragma warning(push)
573 #pragma warning(disable:4251)
576 std::vector<ConstraintGraph2*> vConstraintGraphs;
577 std::vector<Point2> vStartPoints;
578 std::vector<Zone2*> vInputZones;
Zone2 * zoneUnion(Zone2 *pZone0, Zone2 *pZone1)
Compute the union of two zones.
Zone2 * zoneDifference(Zone2 *pZone0, Zone2 *pZone1)
Compute the difference of two zones.
OptimizationMode
Definition: Zone2.h:49
@ OPTMODE_BEST
Best quality but quite time consuming.
Definition: Zone2.h:52
@ OPTMODE_STANDARD
Fastest optimization mode.
Definition: Zone2.h:50
@ OPTMODE_BETTER
Considerably better quality and still fast.
Definition: Zone2.h:51
Zone2 * zoneSymmetricDifference(Zone2 *pZone0, Zone2 *pZone1)
Compute the symmetric difference of two zones.
Zone2 * zoneIntersection(Zone2 *pZone0, Zone2 *pZone1)
Compute the intersection of two zones.
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
Visualizer3 is a 3D scene writer for the Geomview viewer.
Definition: Visualizer3.h:37
Zone2 is a certain defined area of a triangulation.
Definition: Zone2.h:95
void getTriangles(std::vector< Triangle2 * > &vTriangles_) const
Get the triangles of the zone.
void subscribe(MsgType msgType, MsgBase *pMsg)
Register a message receiver.
friend Zone2 * peelOffIf(Zone2 *pZone, UserPredicateT *pPredicate, bool bVerbose)
Peel off border triangles (deprecated)
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.
ConstraintGraph2 * getConstraintGraph() const
Get the associated constraint.
Bbox2 getBoundingBox() const
Compute the bounding box.
void writeObj(const char *outFilename) const
Write the zone to *.obj Writes the triangles of the present Zone2 to an *.obj file (The *....
void getComponentPolygons(std::vector< CompPolygon > &vCompPolygons) const
Get connected components and their boundary polygons.
bool save(std::ostream &stream)
Save the zone.
ZoneLocation getZoneLocation() const
Get the zone location.
void unifyGrid(double tolerance)
void getConstraintGraphs(std::vector< ConstraintGraph2 * > &vConstraintGraphs_) const
Get the associated constraint graphs.
void show(Visualizer2 *pVisualizer, bool bShowFull, bool bWithConstraints) const
Postscript visualization.
void exportZone(FadeExport &fadeExport, bool bWithCustomIndices) const
Export triangles from a zone.
friend Zone2 * zoneIntersection(Zone2 *pZone0, Zone2 *pZone1)
Compute the intersection of two zones.
void showGeomview(const char *filename, const char *color) const
Geomview visualization.
double getArea2D() const
Get 2D Area.
void getVertices(std::vector< Point2 * > &vVertices_) const
Get the vertices of the zone.
Zone2 * convertToBoundedZone()
Convert a zone to a bounded zone.
double getArea25D() const
Get 2.5D Area.
void getBorderEdges(std::vector< Edge2 > &vBorderEdgesOut) const
Get border edges.
void showGeomview(Visualizer3 *pVis, const char *color) const
Geomview visualization.
friend Zone2 * zoneSymmetricDifference(Zone2 *pZone0, Zone2 *pZone1)
Compute the symmetric difference of two zones.
void getBoundaryEdges(std::vector< Edge2 > &vEdges) const
Compute the boundary edges.
void show(const char *postscriptFilename, bool bShowFull, bool bWithConstraints) const
Postscript visualization.
size_t numberOfConstraintGraphs() const
Get a the number of ConstraintGraph2 objects.
friend Zone2 * zoneUnion(Zone2 *pZone0, Zone2 *pZone1)
Compute the union of two zones.
void statistics(const char *s) const
friend Zone2 * peelOffIf(Zone2 *pZone, bool bAvoidSplit, PeelPredicateTS *pPredicate)
Peel off border triangles.
bool save(const char *filename)
Save the zone.
void getBoundarySegments(std::vector< Segment2 > &vSegments) const
Compute the boundary segments.
void smoothing(int numIterations=2, bool bWithXY=true)
Smoothing.
void slopeValleyRidgeOptimization(OptimizationMode om=OPTMODE_BETTER)
Optimize Slopes, Valleys and Ridges.
friend Zone2 * zoneDifference(Zone2 *pZone0, Zone2 *pZone1)
Compute the difference of two zones.
Connected component with boundary- and hole polygons.
Definition: Zone2.h:77
std::vector< std::vector< Edge2 > > * pvvHolePolygons
Ordered hole polygons.
Definition: Zone2.h:85
std::vector< Edge2 > * pvOuterPolygon
Ordered outer polygon.
Definition: Zone2.h:84
std::vector< Triangle2 * > * pvCC
Connected component of triangles (connection along edges, not just vertices)
Definition: Zone2.h:83
FadeExport is a simple struct to export triangulation data.
Definition: FadeExport.h:43