MeshLib C++ Docs
Loading...
Searching...
No Matches
MRPointCloudMakeNormals.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MREnums.h"
5#include <optional>
6
7namespace MR
8{
9
15[[nodiscard]] MRMESH_API std::optional<VertNormals> makeUnorientedNormals( const PointCloud& pointCloud,
16 float radius, const ProgressCallback & progress = {}, OrientNormals orient = OrientNormals::Smart );
17
23[[nodiscard]] MRMESH_API std::optional<VertNormals> makeUnorientedNormals( const PointCloud& pointCloud,
24 const AllLocalTriangulations& triangs, const ProgressCallback & progress = {}, OrientNormals orient = OrientNormals::Smart );
25
31[[nodiscard]] MRMESH_API std::optional<VertNormals> makeUnorientedNormals( const PointCloud& pointCloud,
32 const Buffer<VertId> & closeVerts, int numNei, const ProgressCallback & progress = {}, OrientNormals orient = OrientNormals::Smart );
33
38MRMESH_API bool orientNormals( const PointCloud& pointCloud, VertNormals& normals, float radius,
39 const ProgressCallback & progress = {} );
40
48MRMESH_API bool orientNormals( const PointCloud& pointCloud, VertNormals& normals, const AllLocalTriangulations& triangs,
49 const ProgressCallback & progress = {} );
50
55MRMESH_API bool orientNormals( const PointCloud& pointCloud, VertNormals& normals, const Buffer<VertId> & closeVerts, int numNei,
56 const ProgressCallback & progress = {} );
57
62[[nodiscard]] MRMESH_API std::optional<VertNormals> makeOrientedNormals( const PointCloud& pointCloud,
63 float radius, const ProgressCallback & progress = {} );
64
69[[nodiscard]] MRMESH_API std::optional<VertNormals> makeOrientedNormals( const PointCloud& pointCloud,
70 AllLocalTriangulations& triangs, const ProgressCallback & progress = {} );
71
75//[[deprecated( "use makeOrientedNormals(...) instead" )]]
76MRMESH_API VertNormals makeNormals( const PointCloud& pointCloud, int avgNeighborhoodSize = 48 );
77
78} //namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:68
std::vector<V>-like container that is 1) resized without initialization of its elements,...
Definition MRBuffer.h:54
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:600
MRMESH_API std::optional< VertNormals > makeOrientedNormals(const PointCloud &pointCloud, float radius, const ProgressCallback &progress={})
Makes normals for valid points of given point cloud; directions of close points are selected to be co...
MRMESH_API VertNormals makeNormals(const PointCloud &pointCloud, int avgNeighborhoodSize=48)
Makes consistent normals for valid points of given point cloud.
MRMESH_API bool orientNormals(const PointCloud &pointCloud, VertNormals &normals, float radius, const ProgressCallback &progress={})
Select orientation of given normals to make directions of close points consistent;.
MRMESH_API std::optional< VertNormals > makeUnorientedNormals(const PointCloud &pointCloud, float radius, const ProgressCallback &progress={}, OrientNormals orient=OrientNormals::Smart)
Makes normals for valid points of given point cloud by directing them along the normal of best plane ...
OrientNormals
the method how to choose between two opposite normal orientations
Definition MREnums.h:31
triangulations for all points, with easy access by VertId
Definition MRLocalTriangulations.h:48
Definition MRMesh/MRPointCloud.h:16