Functions | |
void | GEOM_FADE25D::edgesToPolygons (std::vector< Edge2 > &vEdgesIn, std::vector< std::vector< Edge2 > > &vvPolygonsOut, std::vector< Edge2 > &vRemainingOut) |
Create polygons from a set of edges. More... | |
bool | GEOM_FADE25D::fillHole (Mesh3 *pMesh, std::vector< Edge2 > &vPolygonEdges, bool bWithRefine, bool bVerbose, std::vector< Point2 > &vCornersOut) |
Fill a hole in a 3D mesh with triangles (deprecated) More... | |
bool | GEOM_FADE25D::fillHole (std::vector< Point2 > &vMeshCorners, std::vector< Segment2 > &vPolygonSegments, bool bWithRefine, bool bVerbose, std::vector< Point2 > &vCornersOut) |
Fill a hole in a 3D mesh with triangles (deprecated) More... | |
bool | GEOM_FADE25D::fillHole (std::vector< std::pair< Segment2, Vector2 > > vPolygonSegments, bool bWithRefine, bool bVerbose, std::vector< Point2 > &vCornersOut) |
Fill a hole in a 3D mesh with triangles (deprecated) More... | |
double | GEOM_FADE25D::getArea25D (Point2 *p0, Point2 *p1, Point2 *p2) |
Get 2.5D area of a triangle. More... | |
double | GEOM_FADE25D::getArea2D (Point2 *p0, Point2 *p1, Point2 *p2) |
Get 2D area of a triangle. More... | |
void | GEOM_FADE25D::getBorders (const std::vector< Triangle2 * > &vT, std::vector< Segment2 > &vBorderSegmentsOut) |
Get Borders. More... | |
void | GEOM_FADE25D::getConnectedComponents (const std::vector< Triangle2 * > &vT, std::vector< std::vector< Triangle2 * > > &vvT) |
Get connected components. More... | |
void | GEOM_FADE25D::getDirectedEdges (const std::vector< Triangle2 * > &vT, std::vector< Edge2 > &vDirectedEdgesOut) |
Get directed edges The directed edges of vT are returned in vDirectedEdgesOut . Directed means that each edge (a,b) with two adjacent triangles in vT is returned twice, as edge(a,b) and edge(b,a). | |
Vector2 | GEOM_FADE25D::getNormalVector (const Point2 &p0, const Point2 &p1, const Point2 &p2, bool &bOK) |
Get normal vector. More... | |
Orientation2 | GEOM_FADE25D::getOrientation2 (const Point2 *p0, const Point2 *p1, const Point2 *p2) |
Get the orientation of three points. More... | |
Orientation2 | GEOM_FADE25D::getOrientation2_mt (const Point2 *p0, const Point2 *p1, const Point2 *p2) |
Get Orientation2 (MT) More... | |
void | GEOM_FADE25D::getUndirectedEdges (const std::vector< Triangle2 * > &vT, std::vector< Edge2 > &vUndirectedEdgesOut) |
Get undirected edges. More... | |
bool | GEOM_FADE25D::isSimplePolygon (std::vector< Segment2 > &vSegments) |
isSimplePolygon More... | |
void | GEOM_FADE25D::pointsToPolyline (std::vector< Point2 > &vInPoints, bool bClose, std::vector< Segment2 > &vOutSegments) |
Points-to-Polyline. More... | |
bool | GEOM_FADE25D::sortRing (std::vector< Segment2 > &vRing) |
Sort a vector of Segments. More... | |
bool | GEOM_FADE25D::sortRingCCW (std::vector< Segment2 > &vRing) |
Sort a vector of Segments. More... | |
void GEOM_FADE25D::edgesToPolygons | ( | std::vector< Edge2 > & | vEdgesIn, |
std::vector< std::vector< Edge2 > > & | vvPolygonsOut, | ||
std::vector< Edge2 > & | vRemainingOut | ||
) |
A number of methods in Fade returns an unorganized set of edges that delimit a certain area. But sometimes it is more beneficial to have these edges organized as a set of one or more polygons. This is the purpose of the present method.
[in] | vEdgesIn | is a vector of oriented edges |
[out] | vvPolygonsOut | contains one vector<Edge2> for each polygon found in the input data. |
[out] | vRemainingOut | is used to return unusable remaining edges |
The present function adds one vector<Edge2> to vvPolygonsOut
for each polygon found in vEdgesIn
. Each such polygon starts with the leftmost vertex (and when two or more vertices share the smallest x-coordiante then the one of them with the smallest y-coordinate is chosen). Edges that do not form a closed polygon are returned in vRemainingOut
.
bool GEOM_FADE25D::fillHole | ( | Mesh3 * | pMesh, |
std::vector< Edge2 > & | vPolygonEdges, | ||
bool | bWithRefine, | ||
bool | bVerbose, | ||
std::vector< Point2 > & | vCornersOut | ||
) |
This function was experimental and is now deprecated because 3D point cloud meshing has been moved to the WOF library.
[in] | pMesh | |
[in] | vPolygonEdges | are edges of the polygon to be triangulated. They must form a closed polygon in the mesh. |
[in] | bWithRefine | specifies if additional vertices shall be created (Note: bWithRefine=true is experimental, don't use currently) |
[in] | bVerbose | specifies if warnings shall be printed to stdout |
[out] | vCornersOut | contains the created fill triangles, 3 corners per triangle, counterclockwise oriented. |
bool GEOM_FADE25D::fillHole | ( | std::vector< Point2 > & | vMeshCorners, |
std::vector< Segment2 > & | vPolygonSegments, | ||
bool | bWithRefine, | ||
bool | bVerbose, | ||
std::vector< Point2 > & | vCornersOut | ||
) |
This function was experimental and is now deprecated because 3D point cloud meshing has been moved to the WOF library.
[in] | vMeshCorners | specifies the input mesh, 3 points per triangle in counterclockwise order. |
[in] | vPolygonSegments | are the edges of the closed polygon to be triangulated. |
[in] | bWithRefine | specifies if additional vertices shall be created (bWithRefine=true is experimental, don't use currently) |
[in] | bVerbose | specifies if warnings shall be printed to stdout |
[out] | vCornersOut | contains the created fill triangles, 3 corners per triangle, counterclockwise oriented. |
bool GEOM_FADE25D::fillHole | ( | std::vector< std::pair< Segment2, Vector2 > > | vPolygonSegments, |
bool | bWithRefine, | ||
bool | bVerbose, | ||
std::vector< Point2 > & | vCornersOut | ||
) |
This function was experimental and is now deprecated because 3D point cloud meshing has been moved to the WOF library.
[in] | vPolygonSegments | contains the segments of a closed, simple input polygon along with normal vectors. The segments are counterclockwise oriented and ordered with respect to the surface to be created. Check twice, the orientation is very important. The normal vectors point in the direction of the thought surface at the segment i.e., if a hole is filled, the normal vector of an adjecent triangle is taken but if a T-joint is filled the normal vector should be the average normal of the two triangles at the edge. |
[in] | bWithRefine | specifies if additional vertices shall be created. (bWithRefine=true is experimental, don't use currently) |
[in] | bVerbose | specifies if warnings shall be printed to stdout |
[out] | vCornersOut | contains the created fill triangles, 3 corners per triangle, counterclockwise oriented. |
Returns the area of the triangle defined by the three input points p0
, p1
, p2
.
[in] | p0,p1,p2 | are the corners of the triangle |
Returns the 2D area of the triangle defined by the three input points p0
, p1
, p2
.
[in] | p0,p1,p2 | are the corners of the triangle |
void GEOM_FADE25D::getBorders | ( | const std::vector< Triangle2 * > & | vT, |
std::vector< Segment2 > & | vBorderSegmentsOut | ||
) |
Computes the border of the triangles in vT
. The border consists of all edges having only one adjacent triangle in vT.
[in] | vT | are the input triangles |
[out] | vBorderSegmentsOut | is used to return all border segments |
void GEOM_FADE25D::getConnectedComponents | ( | const std::vector< Triangle2 * > & | vT, |
std::vector< std::vector< Triangle2 * > > & | vvT | ||
) |
This function partitions the triangles of vT
into connected components i.e., connected sets of triangles. A connection between two triangles exists when they share a common edge.
[in] | vT | Input triangles |
[out] | vvT | Output components |
Vector2 GEOM_FADE25D::getNormalVector | ( | const Point2 & | p0, |
const Point2 & | p1, | ||
const Point2 & | p2, | ||
bool & | bOK | ||
) |
Returns the normalized normal vector of the triangle defined by the three input points p0
, p1
, p2
.
[in] | p0,p1,p2 | When these points are counterclockwise (CCW) oriented then the resulting normal vector points towards the viewer. |
[out] | bOK | returns true for valid results. When the plane defined by p0 , p1 , p2 is degenerate, bOK returns false. |
Orientation2 GEOM_FADE25D::getOrientation2 | ( | const Point2 * | p0, |
const Point2 * | p1, | ||
const Point2 * | p2 | ||
) |
This function returns the exact orientation of the points p0
, p1
, p2
Possible values are
ORIENTATION2_COLLINEAR if p0
, p1
, p2
are located on a line,
ORIENTATION2_CCW if p0
, p1
, p2
are counterclockwise oriented
ORIENTATION2_CW if p0
, p1
, p2
are clockwise oriented
Not thread-safe but a bit faster than the thread-safe version
Orientation2 GEOM_FADE25D::getOrientation2_mt | ( | const Point2 * | p0, |
const Point2 * | p1, | ||
const Point2 * | p2 | ||
) |
This version is thread-safe.
void GEOM_FADE25D::getUndirectedEdges | ( | const std::vector< Triangle2 * > & | vT, |
std::vector< Edge2 > & | vUndirectedEdgesOut | ||
) |
The undirected edges of vT
are returned vUndirectedEdgesOut
.
bool GEOM_FADE25D::isSimplePolygon | ( | std::vector< Segment2 > & | vSegments | ) |
[in] | vSegments | specifies segments to be checked. Degenerate segments (0-length) are ignored. |
vSegments
contains a closed polygon without selfintersections. False otherwise. void GEOM_FADE25D::pointsToPolyline | ( | std::vector< Point2 > & | vInPoints, |
bool | bClose, | ||
std::vector< Segment2 > & | vOutSegments | ||
) |
Turns a vector of points (p0,p1,p2,...pm,pn) into a vector of segments ((p0,p1),(p1,p2),...,(pm,pn)). In case that bClose is true an additional segment (pn,p0) is constructed. Degenerate segments are ignored. Selfintersections of the polyline are not checked.
[in] | vInPoints | |
[in] | bClose | specifies whether a closing segment shall be constructed |
[out] | vOutSegments | is where the output segments are stored |
bool GEOM_FADE25D::sortRing | ( | std::vector< Segment2 > & | vRing | ) |
The segments in vRing are reoriented and sorted such that subsequent segments join at the endpoints.
bool GEOM_FADE25D::sortRingCCW | ( | std::vector< Segment2 > & | vRing | ) |
The segments in vRing are reoriented and sorted such that the resulting polygon is counterclockwise oriented and subsequent segments join at the endpoints.