![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <PointProjectionTools.h>


Classes | |
| class | IndexedCCVector2 |
| Indexed 2D vector. More... | |
| struct | Transformation |
| A scaled geometrical transformation (scale + rotation + translation) More... | |
Static Public Member Functions | |
| 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) |
| Applys 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) |
| Applys a geometrical transformation to a single point. 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. More... | |
Static Public Attributes | |
| static constexpr int | IGNORE_MAX_EDGE_LENGTH = 0 |
Several point cloud re-projection algorithms ("developpee", translation, rotation, etc.)
Definition at line 34 of file PointProjectionTools.h.
|
static |
Applys a geometrical transformation to a point cloud.
| 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) |
Definition at line 165 of file PointProjectionTools.cpp.
References cloudViewer::PointCloudTpl< T >::addPoint(), cloudViewer::PointProjectionTools::Transformation::apply(), count, cloudViewer::GenericCloud::getNextPoint(), cloudViewer::NormalizedProgress::oneStep(), cloudViewer::GenericCloud::placeIteratorAtBeginning(), cloudViewer::PointCloudTpl< T >::reserve(), cloudViewer::GenericProgressCallback::setInfo(), cloudViewer::GenericProgressCallback::setMethodTitle(), cloudViewer::GenericCloud::size(), cloudViewer::GenericProgressCallback::start(), cloudViewer::GenericProgressCallback::stop(), cloudViewer::GenericProgressCallback::textCanBeEdited(), and cloudViewer::GenericProgressCallback::update().
Referenced by cloudViewer::FPCSRegistrationTools::FilterCandidates(), and cloudViewer::ICPRegistrationTools::Register().
|
static |
Applies a geometrical transformation to an indexed point cloud.
| 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) |
Definition at line 210 of file PointProjectionTools.cpp.
References cloudViewer::PointCloud::addNormal(), cloudViewer::PointCloudTpl< T >::addPoint(), cloudViewer::PointProjectionTools::Transformation::apply(), count, cloudViewer::GenericIndexedCloud::getNormal(), cloudViewer::GenericIndexedCloud::getPoint(), cloudViewer::GenericIndexedCloud::normalsAvailable(), cloudViewer::NormalizedProgress::oneStep(), cloudViewer::GenericCloud::placeIteratorAtBeginning(), cloudViewer::PointProjectionTools::Transformation::R, cloudViewer::PointCloudTpl< T >::reserve(), cloudViewer::PointCloud::reserveNormals(), cloudViewer::GenericProgressCallback::setInfo(), cloudViewer::GenericProgressCallback::setMethodTitle(), cloudViewer::GenericCloud::size(), cloudViewer::GenericProgressCallback::start(), cloudViewer::GenericProgressCallback::stop(), cloudViewer::GenericProgressCallback::textCanBeEdited(), and cloudViewer::GenericProgressCallback::update().
|
static |
Applys a geometrical transformation to a single point.
| P | the point |
| trans | the geometrical transformation |
| cloud | a point cloud |
| type | the triangulation strategy |
| maxEdgeLength | max edge length for output triangles (0 = ignored) |
| dim | projection dimension (for axis-aligned meshes) |
| errorStr | error (if any) [optional] |
Definition at line 275 of file PointProjectionTools.cpp.
References cloudViewer::Delaunay2dMesh::buildMesh(), count, cloudViewer::DELAUNAY_2D_AXIS_ALIGNED, cloudViewer::DELAUNAY_2D_BEST_LS_PLANE, cloudViewer::Neighbourhood::DO_NOT_DUPLICATE_VERTICES, cloudViewer::GenericIndexedCloud::getPoint(), cloudViewer::Delaunay2dMesh::linkMeshWith(), cloudViewer::GenericCloud::placeIteratorAtBeginning(), cloudViewer::Delaunay2dMesh::removeTrianglesWithEdgesLongerThan(), cloudViewer::GenericCloud::size(), cloudViewer::Delaunay2dMesh::size(), cloudViewer::Neighbourhood::triangulateOnPlane(), type, Tuple3Tpl< Type >::u, cloudViewer::Delaunay2dMesh::USE_ALL_POINTS, Tuple3Tpl< Type >::x, and X.
Referenced by ccRasterizeTool::generateMesh(), CommandRasterize::process(), and CommandVolume25D::process().
|
static |
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
| 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) |
Definition at line 87 of file PointProjectionTools.cpp.
References cloudViewer::PointCloudTpl< T >::addPoint(), count, cloudViewer::DegreesToRadians(), cloudViewer::GenericCloud::getNextPoint(), cloudViewer::NormalizedProgress::oneStep(), cloudViewer::GenericCloud::placeIteratorAtBeginning(), cloudViewer::PointCloudTpl< T >::reserve(), cloudViewer::GenericProgressCallback::setInfo(), cloudViewer::GenericProgressCallback::setMethodTitle(), cloudViewer::GenericCloud::size(), cloudViewer::GenericProgressCallback::start(), cloudViewer::GenericProgressCallback::stop(), cloudViewer::GenericProgressCallback::textCanBeEdited(), Tuple3Tpl< Type >::u, and cloudViewer::GenericProgressCallback::update().
|
static |
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
| 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) |
Definition at line 25 of file PointProjectionTools.cpp.
References cloudViewer::PointCloudTpl< T >::addPoint(), count, cloudViewer::GenericCloud::getBoundingBox(), cloudViewer::GenericCloud::getNextPoint(), cloudViewer::NormalizedProgress::oneStep(), cloudViewer::GenericCloud::placeIteratorAtBeginning(), cloudViewer::PointCloudTpl< T >::reserve(), cloudViewer::GenericProgressCallback::setInfo(), cloudViewer::GenericProgressCallback::setMethodTitle(), cloudViewer::GenericCloud::size(), cloudViewer::GenericProgressCallback::start(), cloudViewer::GenericProgressCallback::stop(), cloudViewer::GenericProgressCallback::textCanBeEdited(), Tuple3Tpl< Type >::u, and cloudViewer::GenericProgressCallback::update().
|
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).
| 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!) |
at least one of the new segments must be smaller than the initial one!
Definition at line 564 of file PointProjectionTools.cpp.
References extractConvexHull2D(), FindNearestCandidate(), cloudViewer::PointProjectionTools::IndexedCCVector2::index, Edge::itA, max(), min(), Edge::nearestPointIndex, POINT_FROZEN, POINT_NOT_USED, POINT_USED, points, segmentIntersect(), Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by contourPoly(), and contourPoly2().
|
static |
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!
| points | input set of points |
| hullPoints | output points (on the convex hull) |
Definition at line 355 of file PointProjectionTools.cpp.
References cross(), LexicographicSort(), ParallelSort, and points.
Referenced by ccContourExtractor::ExtractConcaveHull2D(), and extractConcaveHull2D().
|
static |
Returns true if the AB and CD segments intersect each other.
Definition at line 422 of file PointProjectionTools.cpp.
References abs(), Vector2Tpl< Type >::cross(), Vector2Tpl< Type >::dot(), and Vector2Tpl< Type >::norm().
Referenced by extractConcaveHull2D().
|
staticconstexpr |
Definition at line 36 of file PointProjectionTools.h.