![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <ManualSegmentationTools.h>#include <CVPointCloud.h>#include <GenericProgressCallback.h>#include <Polyline.h>#include <SimpleMesh.h>#include <cstdint>#include <map>
Go to the source code of this file.
Classes | |
| struct | InsideOutsideIndexes |
Functions | |
| bool | AddVertex (CCVector3d &P, PointCloud *vertices, unsigned &index) |
| bool | ComputeEdgePoint (const CCVector3d &A, unsigned iA, const CCVector3d &B, unsigned iB, unsigned &iCoutside, unsigned &iCinside, double planeCoord, unsigned char planeDim, PointCloud *outsideVertices, PointCloud *insideVertices) |
| bool | AddTriangle (unsigned iA, unsigned iB, unsigned iC, SimpleMesh *mesh, bool directOrder) |
| bool | MergeOldTriangles (GenericIndexedMesh *origMesh, GenericIndexedCloudPersist *origVertices, SimpleMesh *newMesh, PointCloud *newVertices, const std::vector< unsigned > &preservedTriangleIndexes, std::vector< unsigned > *origTriIndexesMap=nullptr) |
| bool | ImportSourceVertices (GenericIndexedCloudPersist *srcVertices, SimpleMesh *newMesh, PointCloud *newVertices) |
Variables | |
| const unsigned | c_origIndexFlag = 0x80000000 |
| const unsigned | c_srcIndexFlag = 0x40000000 |
| const unsigned | c_realIndexMask |
| const unsigned | c_defaultArrayGrowth = 1024 |
| static std::map< uint64_t, InsideOutsideIndexes > | s_edgePoint |
| bool AddTriangle | ( | unsigned | iA, |
| unsigned | iB, | ||
| unsigned | iC, | ||
| SimpleMesh * | mesh, | ||
| bool | directOrder | ||
| ) |
Definition at line 410 of file ManualSegmentationTools.cpp.
References cloudViewer::SimpleMesh::addTriangle(), c_defaultArrayGrowth, c_realIndexMask, cloudViewer::SimpleMesh::capacity(), cloudViewer::SimpleMesh::reserve(), and cloudViewer::SimpleMesh::size().
Referenced by cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), and cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane().
| bool AddVertex | ( | CCVector3d & | P, |
| PointCloud * | vertices, | ||
| unsigned & | index | ||
| ) |
Definition at line 348 of file ManualSegmentationTools.cpp.
References cloudViewer::PointCloudTpl< T >::addPoint(), c_defaultArrayGrowth, cloudViewer::PointCloudTpl< T >::capacity(), Vector3Tpl< PointCoordinateType >::fromArray(), cloudViewer::PointCloudTpl< T >::reserve(), cloudViewer::PointCloudTpl< T >::size(), and Tuple3Tpl< Type >::u.
Referenced by ComputeEdgePoint().
| bool ComputeEdgePoint | ( | const CCVector3d & | A, |
| unsigned | iA, | ||
| const CCVector3d & | B, | ||
| unsigned | iB, | ||
| unsigned & | iCoutside, | ||
| unsigned & | iCinside, | ||
| double | planeCoord, | ||
| unsigned char | planeDim, | ||
| PointCloud * | outsideVertices, | ||
| PointCloud * | insideVertices | ||
| ) |
Definition at line 362 of file ManualSegmentationTools.cpp.
References AddVertex(), InsideOutsideIndexes::insideIndex, InsideOutsideIndexes::outsideIndex, s_edgePoint, std::swap(), and Tuple3Tpl< Type >::u.
Referenced by cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), and cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane().
| bool ImportSourceVertices | ( | GenericIndexedCloudPersist * | srcVertices, |
| SimpleMesh * | newMesh, | ||
| PointCloud * | newVertices | ||
| ) |
Definition at line 558 of file ManualSegmentationTools.cpp.
References cloudViewer::PointCloudTpl< T >::addPoint(), c_realIndexMask, c_srcIndexFlag, cloudViewer::GenericIndexedCloud::getPoint(), cloudViewer::SimpleMesh::getTriangleVertIndexes(), cloudViewer::VerticesIndexes::i1, cloudViewer::VerticesIndexes::i2, cloudViewer::VerticesIndexes::i3, cloudViewer::PointCloudTpl< T >::reserve(), cloudViewer::PointCloud::resize(), cloudViewer::GenericCloud::size(), cloudViewer::PointCloudTpl< T >::size(), and cloudViewer::SimpleMesh::size().
Referenced by cloudViewer::ManualSegmentationTools::segmentMeshWithAABox().
| bool MergeOldTriangles | ( | GenericIndexedMesh * | origMesh, |
| GenericIndexedCloudPersist * | origVertices, | ||
| SimpleMesh * | newMesh, | ||
| PointCloud * | newVertices, | ||
| const std::vector< unsigned > & | preservedTriangleIndexes, | ||
| std::vector< unsigned > * | origTriIndexesMap = nullptr |
||
| ) |
Definition at line 435 of file ManualSegmentationTools.cpp.
References cloudViewer::PointCloudTpl< T >::addPoint(), cloudViewer::SimpleMesh::addTriangle(), c_origIndexFlag, c_realIndexMask, cloudViewer::GenericIndexedCloud::getPoint(), cloudViewer::SimpleMesh::getTriangleVertIndexes(), cloudViewer::GenericIndexedMesh::getTriangleVertIndexes(), cloudViewer::VerticesIndexes::i1, cloudViewer::VerticesIndexes::i2, cloudViewer::VerticesIndexes::i3, cloudViewer::SimpleMesh::reserve(), cloudViewer::PointCloudTpl< T >::reserve(), cloudViewer::SimpleMesh::resize(), cloudViewer::PointCloud::resize(), cloudViewer::GenericCloud::size(), cloudViewer::PointCloudTpl< T >::size(), and cloudViewer::SimpleMesh::size().
Referenced by cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), and cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane().
| const unsigned c_defaultArrayGrowth = 1024 |
Definition at line 337 of file ManualSegmentationTools.cpp.
Referenced by AddTriangle(), and AddVertex().
| const unsigned c_origIndexFlag = 0x80000000 |
Definition at line 332 of file ManualSegmentationTools.cpp.
Referenced by MergeOldTriangles(), cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), and cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane().
| const unsigned c_realIndexMask |
Definition at line 334 of file ManualSegmentationTools.cpp.
Referenced by AddTriangle(), ImportSourceVertices(), MergeOldTriangles(), cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), and cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane().
| const unsigned c_srcIndexFlag = 0x40000000 |
Definition at line 333 of file ManualSegmentationTools.cpp.
Referenced by ImportSourceVertices(), and cloudViewer::ManualSegmentationTools::segmentMeshWithAABox().
|
static |
Definition at line 346 of file ManualSegmentationTools.cpp.
Referenced by ComputeEdgePoint(), cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), and cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane().