#include <MRCMisc/exports.h>
#include <stdbool.h>
Go to the source code of this file.
◆ MR_meshToDensePointCloud()
Converts the mesh or its part in a point cloud dense enough to stop any ball of given radius: no ball of the radius can pass through the sampled surface without touching at least one point of the cloud, because every point of that surface is within the radius from some point of the cloud. The cloud consists of 1) all vertices of the sampled faces, having the same ids as in the mesh; 2) samples inside every triangle that its own vertices cannot cover, and on the edges of it. A triangle needs no samples at all, however long its edges are, if every point of it is within the radius from one of its vertices, as in a sliver with the third vertex near the longest edge. Please note that the number of samples grows as 1/radius^2.
- Parameters
-
| mp | the mesh or the part of it to be covered; nothing outside the part is sampled |
| saveNormals | if true then the normals of the cloud are set as well: the normals of the mesh vertices, and their interpolation in the samples on the edges and inside the triangles Generated from function MR::meshToDensePointCloud. Parameter mp can not be null. It is a single object. Parameter saveNormals has a default argument: true, pass a null pointer to use it. Parameter cb is a single object. Parameter cb has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_PointCloud_std_string_Destroy() to free it when you're done using it. |
◆ MR_meshToPointCloud()
Mesh to PointCloud Generated from function MR::meshToPointCloud. Parameter mesh can not be null. It is a single object. Parameter saveNormals has a default argument: true, pass a null pointer to use it. Parameter verts defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_PointCloud_Destroy() to free it when you're done using it.