34 #if GEOM_PSEUDO3D==GEOM_TRUE
35 namespace GEOM_FADE25D {
36 #elif GEOM_PSEUDO3D==GEOM_FALSE
37 namespace GEOM_FADE2D {
39 #error GEOM_PSEUDO3D is not defined
58 class ConstraintGraph2;
84 std::vector<Triangle2*>*
pvCC;
99 Zone2(Dt2* pDt_,ZoneLocation zoneLoc_);
103 Zone2(Dt2* pDt_,ZoneLocation zoneLoc_,
const std::vector<ConstraintGraph2*>& vConstraintGraphs_);
105 Zone2(Dt2* pDt_,
const std::vector<ConstraintGraph2*>& vConstraintGraphs_,ZoneLocation zoneLoc_,std::vector<Point2>& vStartPoints);
128 bool save(
const char* filename);
148 bool save(std::ostream& stream);
207 void show(
const char* filename,
bool bShowFull,
bool bWithConstraints)
const;
243 #if GEOM_PSEUDO3D==GEOM_TRUE
260 void analyzeAngles(
const char* name=
"");
347 void optimizeValleysAndRidges(
double tolerance2D,
double lowerThreshold25D);
375 bool assignDt2(Dt2* pDt_);
421 Dt2* getDelaunayTriangulation()
const;
441 void getBoundaryEdges(std::vector<Edge2>& vEdges)
const;
477 #if GEOM_PSEUDO3D==GEOM_TRUE
502 #if GEOM_PSEUDO3D==GEOM_TRUE
510 bool writePly(
const char* filename,
bool bASCII=
false)
const;
518 bool writePly(std::ostream& os,
bool bASCII=
false)
const;
532 void optMode_standard_sub(std::vector<Triangle2*>& vT,std::vector<Triangle2*>& vChangedT);
534 void optMode_standard();
536 double optMode_prioq(
double noEdgeBelowDih,
bool bWithProgress);
538 void getEdgesForOptimization(
double noEdgeBelowDegree,std::vector<Edge2>& vEdges);
540 void optMode_simulatedAnnealing();
542 void optMode_simulatedAnnealing_sub(std::vector<Edge2>& vUniqueEdges,
double temperature);
545 void removeConstraintEdges(std::vector<Edge2>& vEdges)
const;
550 void getTriangles_RESULT(std::vector<Triangle2*>& vTriangles)
const;
552 void initWorkspace(
bool bInside,std::vector<Triangle2*>& vWorkspace)
const;
554 void bfsFromWorkspace(std::vector<Triangle2*>& vWorkspace,std::vector<Triangle2*>& vTriangles)
const;
556 Zone2* ctbz_treatCC(std::vector<Triangle2*>& vOneCC);
561 Progress* pZoneProgress;
563 ZoneLocation zoneLoc;
613 #pragma warning(push)
614 #pragma warning(disable:4251)
617 std::vector<ConstraintGraph2*> vConstraintGraphs;
618 std::vector<Point2> vStartPoints;
619 std::vector<Zone2*> vInputZones;
VtkColor
Enumeration of colors used by the VTKWriter.
Definition: VtkWriter.h:39
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:50
@ OPTMODE_BEST
Best quality but quite time consuming.
Definition: Zone2.h:53
@ OPTMODE_STANDARD
Fastest optimization mode.
Definition: Zone2.h:51
@ OPTMODE_BETTER
Considerably better quality and still fast.
Definition: Zone2.h:52
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 PDF- and Postscript writer.
Definition: Visualizer2.h:54
Visualizer3 is a 3D scene writer for the Geomview viewer.
Definition: Visualizer3.h:37
A writer for the VTK file format.
Definition: VtkWriter.h:62
Zone2 is a certain defined area of a triangulation.
Definition: Zone2.h:96
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- and PDF-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.
bool writePly(std::ostream &os, bool bASCII=false) const
Write the zone to a *.ply file.
void showVtk(VtkWriter *pVtk, VtkColor zoneColor, VtkColor nonZoneColor=VTK_TRANSPARENT, VtkColor constraintColor=VTK_TRANSPARENT) const
VTK visualization.
Zone2 * convertToBoundedZone()
Convert a zone to a bounded zone.
void showVtk(const char *filename, VtkColor zoneColor, VtkColor nonZoneColor=VTK_TRANSPARENT, VtkColor constraintColor=VTK_TRANSPARENT) const
VTK visualization.
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.
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 show(const char *filename, bool bShowFull, bool bWithConstraints) const
Postscript- and PDF-visualization.
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.
bool writePly(const char *filename, bool bASCII=false) const
Write the zone to a *.ply file.
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:78
std::vector< std::vector< Edge2 > > * pvvHolePolygons
Ordered hole polygons.
Definition: Zone2.h:86
std::vector< Edge2 > * pvOuterPolygon
Ordered outer polygon.
Definition: Zone2.h:85
std::vector< Triangle2 * > * pvCC
Connected component of triangles (connection along edges, not just vertices)
Definition: Zone2.h:84
FadeExport is a simple struct to export triangulation data.
Definition: FadeExport.h:43