MeshLib Documentation
Loading...
Searching...
No Matches
Mesh Normals

Classes

struct  MR::MeshNormals
 

Typedefs

using MR::TriangleCornerNormals = std::array<Vector3f, 3>
 normals in three corner of a triangle
 

Functions

MRMESH_API FaceNormals MR::computePerFaceNormals (const Mesh &mesh)
 returns a vector with face-normal in every element for valid mesh faces
 
MRMESH_API void MR::computePerFaceNormals4 (const Mesh &mesh, Vector4f *faceNormals, size_t size)
 fills buffer with face-normals as Vector4f for valid mesh faces
 
MRMESH_API VertNormals MR::computePerVertNormals (const Mesh &mesh)
 returns a vector with vertex normals in every element for valid mesh vertices
 
MRMESH_API VertNormals MR::computePerVertPseudoNormals (const Mesh &mesh)
 
MRMESH_API MeshNormals MR::computeMeshNormals (const Mesh &mesh)
 computes both per-face and per-vertex normals more efficiently then just calling both previous functions
 
MRMESH_API Vector< TriangleCornerNormals, FaceId > MR::computePerCornerNormals (const Mesh &mesh, const UndirectedEdgeBitSet *creases)
 

Detailed Description

Typedef Documentation

◆ TriangleCornerNormals

using MR::TriangleCornerNormals = std::array<Vector3f, 3>

normals in three corner of a triangle

Function Documentation

◆ computeMeshNormals()

MRMESH_API MeshNormals MR::computeMeshNormals ( const Mesh & mesh)
nodiscard

computes both per-face and per-vertex normals more efficiently then just calling both previous functions

◆ computePerCornerNormals()

MRMESH_API Vector< TriangleCornerNormals, FaceId > MR::computePerCornerNormals ( const Mesh & mesh,
const UndirectedEdgeBitSet * creases )
nodiscard

returns a vector with corner normals in every element for valid mesh faces; corner normals of adjacent triangles are equal, unless they are separated by crease edges

◆ computePerFaceNormals()

MRMESH_API FaceNormals MR::computePerFaceNormals ( const Mesh & mesh)
nodiscard

returns a vector with face-normal in every element for valid mesh faces

◆ computePerFaceNormals4()

MRMESH_API void MR::computePerFaceNormals4 ( const Mesh & mesh,
Vector4f * faceNormals,
size_t size )

fills buffer with face-normals as Vector4f for valid mesh faces

◆ computePerVertNormals()

MRMESH_API VertNormals MR::computePerVertNormals ( const Mesh & mesh)
nodiscard

returns a vector with vertex normals in every element for valid mesh vertices

◆ computePerVertPseudoNormals()

MRMESH_API VertNormals MR::computePerVertPseudoNormals ( const Mesh & mesh)
nodiscard

returns a vector with vertex pseudonormals in every element for valid mesh vertices see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.107.9173&rep=rep1&type=pdf