main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
3 changed files with 7 additions and 11 deletions
Showing only changes of commit 17a53d6647 - Show all commits

View File

@ -323,16 +323,14 @@ void BKE_mesh_recalc_looptri(const struct MLoop *mloop,
/* *** mesh_normals.cc *** */
/**
* Returns the normals for each vertex, which is defined as the weighted average of the normals
* from a vertices surrounding faces, or the normalized position of vertices connected to no faces.
* \warning May still return null if the mesh is empty.
* See #Mesh::vert_normals().
* \warning May return null if the mesh is empty.
*/
const float (*BKE_mesh_vert_normals_ensure(const struct Mesh *mesh))[3];
/**
* Return the normal direction of every polygon, which is defined by the winding direction of its
* corners.
* \warning May still return null if the mesh is empty or has no polygons.
* See #Mesh::poly_normals().
* \warning May return null if the mesh is empty or has no polygons.
*/
const float (*BKE_mesh_poly_normals_ensure(const struct Mesh *mesh))[3];

View File

@ -100,7 +100,6 @@ static void add_v3_v3_atomic(float r[3], const float a[3])
* Related to managing normals but not directly related to calculating normals.
* \{ */
float (*BKE_mesh_vert_normals_for_write(Mesh *mesh))[3]
{
if (mesh->runtime->vert_normals == nullptr) {

View File

@ -279,13 +279,12 @@ typedef struct Mesh {
void loose_edges_tag_none() const;
/**
* Normal direction of every polygon, which is defined by the winding direction of its corners.
* Normal direction of polygons, defined by positions and the winding direction of face corners.
*/
blender::Span<blender::float3> poly_normals() const;
/**
* Normal direction for each vertex, which is defined as the weighted average of the normals
* from a vertices surrounding faces, or the normalized position of vertices connected to no
* faces.
* Normal direction of vertices, defined as the weighted average of face normals
* surrounding each vertex and the normalized position for loose vertices.
*/
blender::Span<blender::float3> vert_normals() const;
#endif