Blender V4.5
blender::bke::mesh::CornerNormalSpaceArray Struct Reference

#include <BKE_mesh.hh>

Public Attributes

Mutex build_mutex
Vector< CornerNormalSpacespaces
Array< int > corner_space_indices
Vector< Array< int > > corners_by_space
bool create_corners_by_space = false

Detailed Description

Storage for corner fan coordinate spaces for an entire mesh.

Definition at line 152 of file BKE_mesh.hh.

Member Data Documentation

◆ build_mutex

Mutex blender::bke::mesh::CornerNormalSpaceArray::build_mutex

Results are added from multiple threads. The lock is an easy way to parallelize adding results for each corner fan. This method means the order of spaces in the spaces vector and corners_by_face is non-deterministic. That shouldn't affect the final output for the user though.

Definition at line 159 of file BKE_mesh.hh.

Referenced by blender::bke::mesh::handle_fan_result_and_custom_normals().

◆ corner_space_indices

Array<int> blender::bke::mesh::CornerNormalSpaceArray::corner_space_indices

The index of the data in the spaces array for each face corner (the array size is the same as Mesh::corners_num). Rare -1 values define face corners without a coordinate space.

Definition at line 172 of file BKE_mesh.hh.

Referenced by apply_weights_vertex_normal(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::bke::mesh::handle_fan_result_and_custom_normals(), blender::bke::mesh::mesh_normals_corner_custom_set(), and blender::bke::mesh::normals_calc_corners().

◆ corners_by_space

Vector<Array<int> > blender::bke::mesh::CornerNormalSpaceArray::corners_by_space

A map containing the face corners that make up each space, in the order that they were processed (winding around a vertex).

Definition at line 178 of file BKE_mesh.hh.

Referenced by blender::bke::mesh::handle_fan_result_and_custom_normals(), blender::bke::mesh::mesh_normals_corner_custom_set(), and blender::bke::mesh::normals_calc_corners().

◆ create_corners_by_space

bool blender::bke::mesh::CornerNormalSpaceArray::create_corners_by_space = false

Whether to create the above map when calculating normals.

Definition at line 180 of file BKE_mesh.hh.

Referenced by blender::bke::mesh::handle_fan_result_and_custom_normals(), blender::bke::mesh::mesh_normals_corner_custom_set(), and blender::bke::mesh::normals_calc_corners().

◆ spaces

Vector<CornerNormalSpace> blender::bke::mesh::CornerNormalSpaceArray::spaces

The normal coordinate spaces, potentially shared between multiple face corners in a smooth fan connected to a vertex (and not per face corner). Depending on the mesh (the amount of sharing / number of sharp edges / size of each fan), there may be many fewer spaces than face corners, so they are stored in a separate vector.

Definition at line 166 of file BKE_mesh.hh.

Referenced by apply_weights_vertex_normal(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::bke::mesh::handle_fan_result_and_custom_normals(), blender::bke::mesh::mesh_normals_corner_custom_set(), and blender::bke::mesh::normals_calc_corners().


The documentation for this struct was generated from the following file: