MeshLib C Docs
Loading...
Searching...
No Matches
MRPointCloudMakeNormals.h File Reference
#include <MRCMesh/MREnums.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct MR_AllLocalTriangulations MR_AllLocalTriangulations
 
typedef struct MR_Buffer_MR_VertId MR_Buffer_MR_VertId
 
typedef struct MR_PointCloud MR_PointCloud
 
typedef struct MR_VertCoords MR_VertCoords
 
typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float
 
typedef struct MR_std_optional_MR_VertCoords MR_std_optional_MR_VertCoords
 

Functions

MRC_API MR_std_optional_MR_VertCoordsMR_makeUnorientedNormals_4_float (const MR_PointCloud *pointCloud, float radius, const MR_std_function_bool_from_float *progress, const MR_OrientNormals *orient)
 Makes normals for valid points of given point cloud by directing them along the normal of best plane through the neighbours.
 
MRC_API MR_std_optional_MR_VertCoordsMR_makeUnorientedNormals_4_MR_AllLocalTriangulations (const MR_PointCloud *pointCloud, const MR_AllLocalTriangulations *triangs, const MR_std_function_bool_from_float *progress, const MR_OrientNormals *orient)
 Makes normals for valid points of given point cloud by averaging neighbor triangle normals weighted by triangle's angle \triangs triangulation neighbours of each point.
 
MRC_API MR_std_optional_MR_VertCoordsMR_makeUnorientedNormals_5 (const MR_PointCloud *pointCloud, const MR_Buffer_MR_VertId *closeVerts, int32_t numNei, const MR_std_function_bool_from_float *progress, const MR_OrientNormals *orient)
 Makes normals for valid points of given point cloud by directing them along the normal of best plane through the neighbours.
 
MRC_API bool MR_orientNormals_4_float (const MR_PointCloud *pointCloud, MR_VertCoords *normals, float radius, const MR_std_function_bool_from_float *progress)
 Select orientation of given normals to make directions of close points consistent;.
 
MRC_API bool MR_orientNormals_4_MR_AllLocalTriangulations (const MR_PointCloud *pointCloud, MR_VertCoords *normals, const MR_AllLocalTriangulations *triangs, const MR_std_function_bool_from_float *progress)
 Select orientation of given normals to make directions of close points consistent;.
 
MRC_API bool MR_orientNormals_5 (const MR_PointCloud *pointCloud, MR_VertCoords *normals, const MR_Buffer_MR_VertId *closeVerts, int32_t numNei, const MR_std_function_bool_from_float *progress)
 Select orientation of given normals to make directions of close points consistent;.
 
MRC_API MR_std_optional_MR_VertCoordsMR_makeOrientedNormals_float (const MR_PointCloud *pointCloud, float radius, const MR_std_function_bool_from_float *progress)
 Makes normals for valid points of given point cloud; directions of close points are selected to be consistent;.
 
MRC_API MR_std_optional_MR_VertCoordsMR_makeOrientedNormals_MR_AllLocalTriangulations (const MR_PointCloud *pointCloud, MR_AllLocalTriangulations *triangs, const MR_std_function_bool_from_float *progress)
 Makes normals for valid points of given point cloud; directions of close points are selected to be consistent; \triangs triangulation neighbours of each point, which are oriented during the call as well.
 
MRC_API MR_VertCoordsMR_makeNormals (const MR_PointCloud *pointCloud, const int32_t *avgNeighborhoodSize)
 Makes consistent normals for valid points of given point cloud.
 

Typedef Documentation

◆ MR_AllLocalTriangulations

◆ MR_Buffer_MR_VertId

◆ MR_PointCloud

typedef struct MR_PointCloud MR_PointCloud

◆ MR_std_function_bool_from_float

◆ MR_std_optional_MR_VertCoords

◆ MR_VertCoords

typedef struct MR_VertCoords MR_VertCoords

Function Documentation

◆ MR_makeNormals()

MRC_API MR_VertCoords * MR_makeNormals ( const MR_PointCloud * pointCloud,
const int32_t * avgNeighborhoodSize )

Makes consistent normals for valid points of given point cloud.

Parameters
avgNeighborhoodSizeavg num of neighbors of each individual point Generated from function MR::makeNormals. Parameter pointCloud can not be null. It is a single object. Parameter avgNeighborhoodSize has a default argument: 48, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_VertCoords_Destroy() to free it when you're done using it.

◆ MR_makeOrientedNormals_float()

MRC_API MR_std_optional_MR_VertCoords * MR_makeOrientedNormals_float ( const MR_PointCloud * pointCloud,
float radius,
const MR_std_function_bool_from_float * progress )

Makes normals for valid points of given point cloud; directions of close points are selected to be consistent;.

Parameters
radiusof neighborhood to consider
Returns
nullopt if progress returned false Generated from function MR::makeOrientedNormals. Parameter pointCloud can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_VertCoords_Destroy() to free it when you're done using it.

◆ MR_makeOrientedNormals_MR_AllLocalTriangulations()

MRC_API MR_std_optional_MR_VertCoords * MR_makeOrientedNormals_MR_AllLocalTriangulations ( const MR_PointCloud * pointCloud,
MR_AllLocalTriangulations * triangs,
const MR_std_function_bool_from_float * progress )

Makes normals for valid points of given point cloud; directions of close points are selected to be consistent; \triangs triangulation neighbours of each point, which are oriented during the call as well.

Returns
nullopt if progress returned false Generated from function MR::makeOrientedNormals. Parameter pointCloud can not be null. It is a single object. Parameter triangs can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_VertCoords_Destroy() to free it when you're done using it.

◆ MR_makeUnorientedNormals_4_float()

MRC_API MR_std_optional_MR_VertCoords * MR_makeUnorientedNormals_4_float ( const MR_PointCloud * pointCloud,
float radius,
const MR_std_function_bool_from_float * progress,
const MR_OrientNormals * orient )

Makes normals for valid points of given point cloud by directing them along the normal of best plane through the neighbours.

Parameters
radiusof neighborhood to consider
orientOrientNormals::Smart here means orientation from best fit plane
Returns
nullopt if progress returned false Generated from function MR::makeUnorientedNormals. Parameter pointCloud can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Parameter orient has a default argument: OrientNormals::Smart, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_VertCoords_Destroy() to free it when you're done using it.

◆ MR_makeUnorientedNormals_4_MR_AllLocalTriangulations()

MRC_API MR_std_optional_MR_VertCoords * MR_makeUnorientedNormals_4_MR_AllLocalTriangulations ( const MR_PointCloud * pointCloud,
const MR_AllLocalTriangulations * triangs,
const MR_std_function_bool_from_float * progress,
const MR_OrientNormals * orient )

Makes normals for valid points of given point cloud by averaging neighbor triangle normals weighted by triangle's angle \triangs triangulation neighbours of each point.

Parameters
orientOrientNormals::Smart here means orientation from normals of neigbour triangles
Returns
nullopt if progress returned false Generated from function MR::makeUnorientedNormals. Parameter pointCloud can not be null. It is a single object. Parameter triangs can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Parameter orient has a default argument: OrientNormals::Smart, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_VertCoords_Destroy() to free it when you're done using it.

◆ MR_makeUnorientedNormals_5()

MRC_API MR_std_optional_MR_VertCoords * MR_makeUnorientedNormals_5 ( const MR_PointCloud * pointCloud,
const MR_Buffer_MR_VertId * closeVerts,
int32_t numNei,
const MR_std_function_bool_from_float * progress,
const MR_OrientNormals * orient )

Makes normals for valid points of given point cloud by directing them along the normal of best plane through the neighbours.

Parameters
closeVertsa buffer where for every valid point #i its neighbours are stored at indices [i*numNei; (i+1)*numNei)
orientOrientNormals::Smart here means orientation from best fit plane
Returns
nullopt if progress returned false Generated from function MR::makeUnorientedNormals. Parameter pointCloud can not be null. It is a single object. Parameter closeVerts can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Parameter orient has a default argument: OrientNormals::Smart, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_VertCoords_Destroy() to free it when you're done using it.

◆ MR_orientNormals_4_float()

MRC_API bool MR_orientNormals_4_float ( const MR_PointCloud * pointCloud,
MR_VertCoords * normals,
float radius,
const MR_std_function_bool_from_float * progress )

Select orientation of given normals to make directions of close points consistent;.

Parameters
radiusof neighborhood to consider
Returns
false if progress returned false Generated from function MR::orientNormals. Parameter pointCloud can not be null. It is a single object. Parameter normals can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it.

◆ MR_orientNormals_4_MR_AllLocalTriangulations()

MRC_API bool MR_orientNormals_4_MR_AllLocalTriangulations ( const MR_PointCloud * pointCloud,
MR_VertCoords * normals,
const MR_AllLocalTriangulations * triangs,
const MR_std_function_bool_from_float * progress )

Select orientation of given normals to make directions of close points consistent;.

Parameters
radiusof neighborhood to consider
Returns
false if progress returned false Unlike simple orientNormals this method constructs local triangulations around each point (with most neighbours within given radius and all neighbours within 2*radius) and considers all triangulation neighbors and not other points from the ball around each point. Generated from function MR::orientNormals. Parameter pointCloud can not be null. It is a single object. Parameter normals can not be null. It is a single object. Parameter triangs can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it.

◆ MR_orientNormals_5()

MRC_API bool MR_orientNormals_5 ( const MR_PointCloud * pointCloud,
MR_VertCoords * normals,
const MR_Buffer_MR_VertId * closeVerts,
int32_t numNei,
const MR_std_function_bool_from_float * progress )

Select orientation of given normals to make directions of close points consistent;.

Parameters
closeVertsa buffer where for every valid point #i its neighbours are stored at indices [i*numNei; (i+1)*numNei)
Returns
false if progress returned false Generated from function MR::orientNormals. Parameter pointCloud can not be null. It is a single object. Parameter normals can not be null. It is a single object. Parameter closeVerts can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it.