The ear clipping triangulation algorithm. More...
#include <pcl/surface/ear_clipping.h>
|
bool |
initCompute () override |
|
This method should get called before starting the actual computation. More...
|
|
void |
performProcessing (pcl::PolygonMesh &output) override |
|
The actual surface reconstruction method. More...
|
|
void |
triangulate (const Vertices &vertices, PolygonMesh &output) |
|
Triangulate one polygon. More...
|
|
float |
area (const Indices &vertices) |
|
Compute the signed area of a polygon. More...
|
|
template<typename T = pcl::index_t, std::enable_if_t<!std::is_same< T, std::uint32_t >::value, pcl::index_t > = 0> |
float |
area (const std::vector< std::uint32_t > &vertices) |
|
Compute the signed area of a polygon. More...
|
|
bool |
isEar (int u, int v, int w, const Indices &vertices) |
|
Check if the triangle (u,v,w) is an ear. More...
|
|
template<typename T = pcl::index_t, std::enable_if_t<!std::is_same< T, std::uint32_t >::value, pcl::index_t > = 0> |
bool |
isEar (int u, int v, int w, const std::vector< std::uint32_t > &vertices) |
|
Check if the triangle (u,v,w) is an ear. More...
|
|
bool |
isInsideTriangle (const Eigen::Vector3f &u, const Eigen::Vector3f &v, const Eigen::Vector3f &w, const Eigen::Vector3f &p) |
|
Check if p is inside the triangle (u,v,w). More...
|
|
float |
crossProduct (const Eigen::Vector2f &p1, const Eigen::Vector2f &p2) const |
|
Compute the cross product between 2D vectors. More...
|
|
virtual void |
deinitCompute () |
|
UnInitialize computation. More...
|
|
virtual std::string |
getClassName () const |
|
Abstract class get name method. More...
|
|
The ear clipping triangulation algorithm.
The code is inspired by Flavien Brebion implementation, which is in n^3 and does not handle holes.
- Author
- Nicolas Burrus
Definition at line 52 of file ear_clipping.h.
ConstPtr
Ptr
EarClipping()
pcl::EarClipping::EarClipping | ( | |
) | | | inline |
area() [1/2]
float pcl::EarClipping::area | ( | const Indices & | vertices |
) | | | protected |
Compute the signed area of a polygon.
- Parameters
-
[in] |
vertices |
the vertices representing the polygon |
area() [2/2]
template<typename T = pcl::index_t, std::enable_if_t<!std::is_same< T, std::uint32_t >::value, pcl::index_t > = 0>
float pcl::EarClipping::area | ( | const std::vector< std::uint32_t > & | vertices |
) | | | inlineprotected |
Compute the signed area of a polygon.
- Parameters
-
[in] |
vertices |
the vertices representing the polygon |
- Deprecated:
- Scheduled for removal in version 1 . 14 : "This method creates a useless copy of the vertices vector. Use area method which accepts Indices instead"
Definition at line 98 of file ear_clipping.h.
crossProduct()
float pcl::EarClipping::crossProduct | ( | const Eigen::Vector2f & |
p1, | | | const Eigen::Vector2f & |
p2 | | ) | |
const | | inlineprotected |
Compute the cross product between 2D vectors.
- Parameters
-
[in] |
p1 |
the first 2D vector |
[in] |
p2 |
the first 2D vector |
Definition at line 143 of file ear_clipping.h.
initCompute() [1/2]
virtual bool pcl::MeshProcessing::initCompute |
Initialize computation.
Must be called before processing starts.
initCompute() [2/2]
bool pcl::EarClipping::initCompute | ( | |
) | | | overrideprotectedvirtual |
This method should get called before starting the actual computation.
Reimplemented from pcl::MeshProcessing.
isEar() [1/2]
bool pcl::EarClipping::isEar | ( | int |
u, | | | int |
v, | | | int |
w, | | | const Indices & |
vertices | | ) | |
| | protected |
Check if the triangle (u,v,w) is an ear.
- Parameters
-
[in] |
u |
the first triangle vertex |
[in] |
v |
the second triangle vertex |
[in] |
w |
the third triangle vertex |
[in] |
vertices |
a set of input vertices |
isEar() [2/2]
template<typename T = pcl::index_t, std::enable_if_t<!std::is_same< T, std::uint32_t >::value, pcl::index_t > = 0>
bool pcl::EarClipping::isEar | ( | int |
u, | | | int |
v, | | | int |
w, | | | const std::vector< std::uint32_t > & |
vertices | | ) | |
| | inlineprotected |
Check if the triangle (u,v,w) is an ear.
- Parameters
-
[in] |
u |
the first triangle vertex |
[in] |
v |
the second triangle vertex |
[in] |
w |
the third triangle vertex |
[in] |
vertices |
a set of input vertices |
- Deprecated:
- Scheduled for removal in version 1 . 14 : "This method creates a useless copy of the vertices vector. Use isEar method which accepts Indices instead"
Definition at line 121 of file ear_clipping.h.
isInsideTriangle()
bool pcl::EarClipping::isInsideTriangle | ( | const Eigen::Vector3f & |
u, | | | const Eigen::Vector3f & |
v, | | | const Eigen::Vector3f & |
w, | | | const Eigen::Vector3f & |
p | | ) | |
| | protected |
Check if p is inside the triangle (u,v,w).
- Parameters
-
[in] |
u |
the first triangle vertex |
[in] |
v |
the second triangle vertex |
[in] |
w |
the third triangle vertex |
[in] |
p |
the point to check |
performProcessing()
The actual surface reconstruction method.
- Parameters
-
[out] |
output |
the output polygonal mesh |
Implements pcl::MeshProcessing.
triangulate()
Triangulate one polygon.
- Parameters
-
[in] |
vertices |
the set of vertices |
[out] |
output |
the resultant polygonal mesh |
input_mesh_
points_
a Pointer to the point cloud data.
Definition at line 63 of file ear_clipping.h.
The documentation for this class was generated from the following file: