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

Function computePerFaceNormals

source/MRMesh/MRMeshNormals.cpp:13–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11{
12
13FaceNormals computePerFaceNormals( const Mesh & mesh )
14{
15 MR_TIMER;
16 std::vector<Vector3f> res( mesh.topology.faceSize() );
17 BitSetParallelFor( mesh.topology.getValidFaces(), [&]( FaceId f )
18 {
19 res[f] = mesh.normal( f );
20 } );
21 return res;
22}
23
24void computePerFaceNormals4( const Mesh & mesh, Vector4f* faceNormals, size_t size )
25{

Callers 4

TestFaceNormalsMethod · 0.85
EMSCRIPTEN_BINDINGSFunction · 0.85
meshDenoiseViaNormalsFunction · 0.85

Calls 3

BitSetParallelForFunction · 0.85
faceSizeMethod · 0.80
normalMethod · 0.80

Tested by 1

TestFaceNormalsMethod · 0.68