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);
172 void getOffsetBoundary(
double offset,std::vector<Segment2>& vOffsetBoundary,
double mergeAngleDeg=10.0,
double angleStepDeg=20.0);
219 void show(
const char* filename,
bool bShowFull,
bool bWithConstraints)
const;
255 #if GEOM_PSEUDO3D==GEOM_TRUE
272 void analyzeAngles(
const char* name=
"");
359 void optimizeValleysAndRidges(
double tolerance2D,
double lowerThreshold25D);
387 bool assignDt2(Dt2* pDt_);
433 Dt2* getDelaunayTriangulation()
const;
453 void getBoundaryEdges(std::vector<Edge2>& vEdges)
const;
489 #if GEOM_PSEUDO3D==GEOM_TRUE
514 #if GEOM_PSEUDO3D==GEOM_TRUE
522 bool writePly(
const char* filename,
bool bASCII=
false)
const;
530 bool writePly(std::ostream& os,
bool bASCII=
false)
const;
540 void optMode_standard_sub(std::vector<Triangle2*>& vT,std::vector<Triangle2*>& vChangedT);
542 void optMode_standard();
544 double optMode_prioq(
double noEdgeBelowDih,
bool bWithProgress);
546 void getEdgesForOptimization(
double noEdgeBelowDegree,std::vector<Edge2>& vEdges);
548 void optMode_simulatedAnnealing();
550 void optMode_simulatedAnnealing_sub(std::vector<Edge2>& vUniqueEdges,
double temperature);
552 void removeConstraintEdges(std::vector<Edge2>& vEdges)
const;
556 void getTriangles_RESULT(std::vector<Triangle2*>& vTriangles)
const;
558 void initWorkspace(
bool bInside,std::set<std::pair<Point2*,Point2*> >& sNoGrowEdges,std::vector<Triangle2*>& vWorkspace)
const;
560 void bfsFromWorkspace(std::vector<Triangle2*>& vWorkspace,std::set<std::pair<Point2*,Point2*> >& sNoGrowEdges,std::vector<Triangle2*>& vTriangles)
const;
562 Zone2* ctbz_treatCC(std::vector<Triangle2*>& vOneCC);
567 Progress* pZoneProgress;
569 ZoneLocation zoneLoc;
612 #pragma warning(push)
613 #pragma warning(disable:4251)
616 std::vector<ConstraintGraph2*> vConstraintGraphs;
617 std::vector<Point2> vStartPoints;
618 std::vector<Zone2*> vInputZones;
VtkColor
Enumeration of colors used by the VTKWriter.
Definition: VtkWriter.h:39
Zone2 * zoneUnion(Zone2 *pZone0, Zone2 *pZone1)
Computes the union of two Zone2 objects.
Zone2 * zoneDifference(Zone2 *pZone0, Zone2 *pZone1)
Computes the difference between two Zone2 objects.
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)
Computes the symmetric difference between two Zone2 objects.
Zone2 * zoneIntersection(Zone2 *pZone0, Zone2 *pZone1)
Computes the intersection of two Zone2 objects.
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)
Computes the intersection of two Zone2 objects.
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)
Computes the symmetric difference between two Zone2 objects.
size_t numberOfConstraintGraphs() const
Get a the number of ConstraintGraph2 objects.
friend Zone2 * zoneUnion(Zone2 *pZone0, Zone2 *pZone1)
Computes the union of two Zone2 objects.
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 getOffsetBoundary(double offset, std::vector< Segment2 > &vOffsetBoundary, double mergeAngleDeg=10.0, double angleStepDeg=20.0)
Get the boundary of an offset shape.
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)
Computes the difference between two Zone2 objects.
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