DelaunayTriangulation class Provides Delaunay triangulation utilities using CGAL.
More...
#include <delaunay_triangulation.h>
|
| static std::vector< int > | compute (const std::vector< cv::Point2f > &points) |
| | Compute Delaunay triangulation of 2D points Matches MATLAB: DT = delaunayTriangulation(P)
|
| |
| static std::vector< int > | filterByEdgeLength (const std::vector< int > &faces, const std::vector< cv::Point2f > &vertices, double max_edge_threshold) |
| | Filter irregular triangles by edge length Matches MATLAB: F(EdgeLengthsMax > threshold, :) = [].
|
| |
| static std::vector< double > | computeEdgeLengths (const std::vector< int > &faces, const std::vector< cv::Point2f > &vertices) |
| | Compute edge lengths for all triangles Matches MATLAB: patchEdgeLengths(F, V)
|
| |
| static std::vector< int > | flipOrientation (const std::vector< int > &faces) |
| | Flip triangle orientation Matches MATLAB: F = F(:, [1 3 2])
|
| |
| static std::vector< cv::Point2f > | computeCentroids (const std::vector< int > &faces, const std::vector< cv::Point2f > &vertices) |
| | Compute face centroids.
|
| |
| static std::vector< double > | computeAreas (const std::vector< int > &faces, const std::vector< cv::Point2f > &vertices) |
| | Compute face areas.
|
| |
DelaunayTriangulation class Provides Delaunay triangulation utilities using CGAL.
Definition at line 18 of file delaunay_triangulation.h.
◆ compute()
| std::vector< int > cppxdic::DelaunayTriangulation::compute |
( |
const std::vector< cv::Point2f > & |
points | ) |
|
|
static |
Compute Delaunay triangulation of 2D points Matches MATLAB: DT = delaunayTriangulation(P)
- Parameters
-
| points | Vector of 2D points |
- Returns
- Faces as flat vector [v1, v2, v3, v1, v2, v3, ...]
Definition at line 23 of file delaunay_triangulation.cpp.
◆ computeAreas()
| std::vector< double > cppxdic::DelaunayTriangulation::computeAreas |
( |
const std::vector< int > & |
faces, |
|
|
const std::vector< cv::Point2f > & |
vertices |
|
) |
| |
|
static |
Compute face areas.
- Parameters
-
| faces | Faces (flat vector) |
| vertices | Vertex positions |
- Returns
- Area for each triangle
Definition at line 226 of file delaunay_triangulation.cpp.
◆ computeCentroids()
| std::vector< cv::Point2f > cppxdic::DelaunayTriangulation::computeCentroids |
( |
const std::vector< int > & |
faces, |
|
|
const std::vector< cv::Point2f > & |
vertices |
|
) |
| |
|
static |
Compute face centroids.
- Parameters
-
| faces | Faces (flat vector) |
| vertices | Vertex positions |
- Returns
- Centroid for each triangle
Definition at line 187 of file delaunay_triangulation.cpp.
◆ computeEdgeLengths()
| std::vector< double > cppxdic::DelaunayTriangulation::computeEdgeLengths |
( |
const std::vector< int > & |
faces, |
|
|
const std::vector< cv::Point2f > & |
vertices |
|
) |
| |
|
static |
Compute edge lengths for all triangles Matches MATLAB: patchEdgeLengths(F, V)
- Parameters
-
| faces | Faces (flat vector) |
| vertices | Vertex positions |
- Returns
- Edge lengths (3 per triangle: [e1, e2, e3, e1, e2, e3, ...])
Definition at line 123 of file delaunay_triangulation.cpp.
◆ filterByEdgeLength()
| std::vector< int > cppxdic::DelaunayTriangulation::filterByEdgeLength |
( |
const std::vector< int > & |
faces, |
|
|
const std::vector< cv::Point2f > & |
vertices, |
|
|
double |
max_edge_threshold |
|
) |
| |
|
static |
Filter irregular triangles by edge length Matches MATLAB: F(EdgeLengthsMax > threshold, :) = [].
- Parameters
-
| faces | Input faces (flat vector) |
| vertices | Vertex positions |
| max_edge_threshold | Maximum edge length threshold |
- Returns
- Filtered faces
Definition at line 64 of file delaunay_triangulation.cpp.
◆ flipOrientation()
| std::vector< int > cppxdic::DelaunayTriangulation::flipOrientation |
( |
const std::vector< int > & |
faces | ) |
|
|
static |
Flip triangle orientation Matches MATLAB: F = F(:, [1 3 2])
- Parameters
-
- Returns
- Faces with flipped orientation
Definition at line 167 of file delaunay_triangulation.cpp.
The documentation for this class was generated from the following files: