Several point cloud re-projection algorithms ("developpee", translation, rotation, etc.)
More...
#include <PointProjectionTools.h>
|
static PointCloud * | developCloudOnCylinder (GenericCloud *cloud, PointCoordinateType radius, unsigned char dim=2, CCVector3 *center=nullptr, GenericProgressCallback *progressCb=nullptr) |
| Develops a cylinder-shaped point cloud around its main axis. More...
|
|
static PointCloud * | developCloudOnCone (GenericCloud *cloud, unsigned char dim, PointCoordinateType baseRadius, float alpha, const CCVector3 ¢er, GenericProgressCallback *progressCb=nullptr) |
| Develops a cone-shaped point cloud around its main axis. More...
|
|
static PointCloud * | applyTransformation (GenericCloud *cloud, Transformation &trans, GenericProgressCallback *progressCb=nullptr) |
| Applies a geometrical transformation to a point cloud. More...
|
|
static PointCloud * | applyTransformation (GenericIndexedCloud *cloud, Transformation &trans, GenericProgressCallback *progressCb=nullptr) |
| Applies a geometrical transformation to an indexed point cloud. More...
|
|
static GenericIndexedMesh * | computeTriangulation (GenericIndexedCloudPersist *cloud, TRIANGULATION_TYPES type, PointCoordinateType maxEdgeLength, unsigned char dim, std::string &outputErrorStr) |
| Computes a 2.5D Delaunay triangulation. More...
|
|
static bool | extractConvexHull2D (std::vector< IndexedCCVector2 > &points, std::list< IndexedCCVector2 * > &hullPoints) |
| Determines the convex hull of a set of points. More...
|
|
static bool | extractConcaveHull2D (std::vector< IndexedCCVector2 > &points, std::list< IndexedCCVector2 * > &hullPoints, PointCoordinateType maxSquareLength=0) |
| Determines the 'concave' hull of a set of points. More...
|
|
static bool | segmentIntersect (const CCVector2 &A, const CCVector2 &B, const CCVector2 &C, const CCVector2 &D) |
| Returns true if the AB and CD segments intersect each other.
|
|
|
static constexpr int | IGNORE_MAX_EDGE_LENGTH = 0 |
|
Several point cloud re-projection algorithms ("developpee", translation, rotation, etc.)
◆ applyTransformation() [1/2]
Applies a geometrical transformation to a point cloud.
- Parameters
-
cloud | the point cloud to be "transformed" |
trans | the geometrical transformation |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
- Returns
- the "transformed" cloud
◆ applyTransformation() [2/2]
Applies a geometrical transformation to an indexed point cloud.
- Parameters
-
cloud | the point cloud to be "transformed" |
trans | the geometrical transformation |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
- Returns
- the "transformed" cloud
◆ computeTriangulation()
Computes a 2.5D Delaunay triangulation.
The triangulation can be either computed on the points projected in the XY plane (by default), or projected on the best least-square fitting plane. The triangulation is in 2D (in the plane) but the 3D points are connected, so it's a kind of 2.5D triangulation (that may present however several topological aberrations ;).
- Parameters
-
cloud | a point cloud |
type | the triangulation strategy |
maxEdgeLength | max edge length for output triangles (IGNORE_MAX_EDGE_LENGTH = ignored) |
dim | projection dimension (for axis-aligned meshes) |
outputErrorStr | error (if any) |
- Returns
- a mesh
◆ developCloudOnCone()
Develops a cone-shaped point cloud around its main axis.
Generates a "developpee" of a cone-shaped point cloud. WARNING: this method uses the cloud global iterator
- Parameters
-
cloud | the point cloud to be developed |
dim | the dimension along which the cone axis is aligned (X=0, Y=1, Z=2) |
baseRadius | the radius of the base of the cone |
alpha | the angle of the cone "opening" |
center | the 3D point corresponding to the intersection between the cone axis and its base |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
- Returns
- the "developed" cloud
◆ developCloudOnCylinder()
Develops a cylinder-shaped point cloud around its main axis.
Generates a "developpee" of a cylinder-shaped point cloud. WARNING: this method uses the cloud global iterator
- Parameters
-
cloud | the point cloud to be developed |
radius | the cylinder radius |
dim | the dimension along which the cylinder axis is aligned (X=0, Y=1, Z=2) |
center | a 3D point (as a 3 values array) belonging to the cylinder axis |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
- Returns
- the "developed" cloud
◆ extractConcaveHull2D()
bool PointProjectionTools::extractConcaveHull2D |
( |
std::vector< IndexedCCVector2 > & |
points, |
|
|
std::list< IndexedCCVector2 * > & |
hullPoints, |
|
|
PointCoordinateType |
maxSquareLength = 0 |
|
) |
| |
|
static |
Determines the 'concave' hull of a set of points.
Inspired from JIN-SEO PARK AND SE-JONG OH, "A New Concave Hull Algorithm
and Concaveness Measure for n-dimensional Datasets", 2012 Calls extractConvexHull2D (see associated warnings).
- Parameters
-
points | input set of points |
hullPoints | output points (on the convex hull) |
maxSquareLength | maximum square length (ignored if <= 0, in which case the method simply returns the convex hull!) |
- Returns
- success
◆ extractConvexHull2D()
Determines the convex hull of a set of points.
Returns a list of points on the convex hull in counter-clockwise order. Implementation of Andrew's monotone chain 2D convex hull algorithm. Asymptotic complexity: O(n log n). (retrieved from http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain) WARNING: the input 'points' set will be sorted!
- Parameters
-
points | input set of points |
hullPoints | output points (on the convex hull) |
- Returns
- success
The documentation for this class was generated from the following files:
- PointProjectionTools.h
- PointProjectionTools.cpp