CCCoreLib 31 May 2022
CloudCompare Core algorithms
|
A generic mesh with index-based vertex access. More...
#include <GenericIndexedMesh.h>
Public Member Functions | |
~GenericIndexedMesh () override=default | |
Default destructor. | |
virtual GenericTriangle * | _getTriangle (unsigned triangleIndex)=0 |
Returns the ith triangle. More... | |
virtual VerticesIndexes * | getTriangleVertIndexes (unsigned triangleIndex)=0 |
Returns the indexes of the vertices of a given triangle. More... | |
virtual void | getTriangleVertices (unsigned triangleIndex, CCVector3 &A, CCVector3 &B, CCVector3 &C) const =0 |
Returns the vertices of a given triangle. More... | |
virtual VerticesIndexes * | getNextTriangleVertIndexes ()=0 |
Returns the indexes of the vertices of the next triangle (relatively to the global iterator position) More... | |
virtual bool | normalsAvailable () const |
Returns whether normals are available. More... | |
virtual bool | interpolateNormals (unsigned triIndex, const CCVector3 &P, CCVector3 &N) |
Interpolates normal(s) inside a given triangle. More... | |
Public Member Functions inherited from CCCoreLib::GenericMesh | |
virtual | ~GenericMesh ()=default |
Default destructor. | |
virtual unsigned | size () const =0 |
Returns the number of triangles. More... | |
virtual void | forEach (genericTriangleAction action)=0 |
Fast iteration mechanism. More... | |
virtual void | getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax)=0 |
Returns the mesh bounding-box. More... | |
virtual void | placeIteratorAtBeginning ()=0 |
Places the mesh iterator at the beginning. More... | |
virtual GenericTriangle * | _getNextTriangle ()=0 |
Returns the next triangle (relatively to the global iterator position) More... | |
Additional Inherited Members | |
Public Types inherited from CCCoreLib::GenericMesh | |
using | genericTriangleAction = std::function< void(GenericTriangle &)> |
Generic function to apply to a triangle (used by foreach) | |
A generic mesh with index-based vertex access.
Implements the GenericMesh interface.
|
pure virtual |
Returns the ith triangle.
Virtual method to request a triangle with a specific index. The returned object can be temporary.
triangleIndex | of the requested triangle (between 0 and the mesh size-1) |
Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.
|
pure virtual |
Returns the indexes of the vertices of the next triangle (relatively to the global iterator position)
Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.
|
pure virtual |
Returns the vertices of a given triangle.
[in] | triangleIndex | index of the triangle (between 0 and the size(mesh)-1) |
[out] | A | first vertex |
[out] | B | second vertex |
[out] | C | third vertex |
Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.
|
pure virtual |
Returns the indexes of the vertices of a given triangle.
triangleIndex | index of the triangle (between 0 and size(mesh)-1) |
Implemented in CCCoreLib::Delaunay2dMesh, and CCCoreLib::SimpleMesh.
|
inlinevirtual |
Interpolates normal(s) inside a given triangle.
This method should be ideally overriden by the child class if normals are supported
[in] | triIndex | triangle index |
[in] | P | point where to interpolate (should be inside the triangle!) |
[out] | N | interpolated normal |
Reimplemented in CCCoreLib::SimpleMesh.
|
inlinevirtual |
Returns whether normals are available.
Reimplemented in CCCoreLib::SimpleMesh.