MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / normals

Method normals

source/MRMesh/MRMeshOrPoints.cpp:86–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86std::function<Vector3f(VertId)> MeshOrPoints::normals() const
87{
88 return std::visit( overloaded{
89 []( const MeshPart & mp ) -> std::function<Vector3f(VertId)>
90 {
91 return [&mesh = mp.mesh]( VertId v ) { return mesh.pseudonormal( v ); };
92 },
93 []( const PointCloudPart & pcp ) -> std::function<Vector3f(VertId)>
94 {
95 return !pcp.cloud.hasNormals() ? std::function<Vector3f(VertId)>{} : [&normals = pcp.cloud.normals]( VertId v ) { return normals[v]; };
96 }
97 }, var_ );
98}
99
100std::function<float(VertId)> MeshOrPoints::weights() const
101{

Callers 2

updatePointPairsFunction · 0.80
updateGroupPairsFunction · 0.80

Calls 2

pseudonormalMethod · 0.80
hasNormalsMethod · 0.80

Tested by

no test coverage detected