Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/mesh_boolean_convert.cc
| Show First 20 Lines • Show All 292 Lines • ▼ Show 20 Lines | static IMesh meshes_to_imesh(Span<const Mesh *> meshes, | ||||
| * -- see the comment for the `clean_obmat` function, above. */ | * -- see the comment for the `clean_obmat` function, above. */ | ||||
| const float4x4 inv_target_mat = clean_obmat(target_transform).inverted(); | const float4x4 inv_target_mat = clean_obmat(target_transform).inverted(); | ||||
| /* For each input `Mesh`, make `Vert`s and `Face`s for the corresponding | /* For each input `Mesh`, make `Vert`s and `Face`s for the corresponding | ||||
| * `MVert`s and `MPoly`s, and keep track of the original indices (using the | * `MVert`s and `MPoly`s, and keep track of the original indices (using the | ||||
| * concatenating offset scheme) inside the `Vert`s and `Face`s. | * concatenating offset scheme) inside the `Vert`s and `Face`s. | ||||
| * When making `Face`s, we also put in the original indices for `MEdge`s that | * When making `Face`s, we also put in the original indices for `MEdge`s that | ||||
| * make up the `MPoly`s using the same scheme. */ | * make up the `MPoly`s using the same scheme. */ | ||||
| for (int mi : meshes.index_range()) { | for (int mi : iter_indices(meshes)) { | ||||
| const Mesh *me = meshes[mi]; | const Mesh *me = meshes[mi]; | ||||
| r_info->mesh_vert_offset[mi] = v; | r_info->mesh_vert_offset[mi] = v; | ||||
| r_info->mesh_edge_offset[mi] = e; | r_info->mesh_edge_offset[mi] = e; | ||||
| r_info->mesh_poly_offset[mi] = f; | r_info->mesh_poly_offset[mi] = f; | ||||
| /* Get matrix that transforms a coordinate in objects[mi]'s local space | /* Get matrix that transforms a coordinate in objects[mi]'s local space | ||||
| * to the target space space.*/ | * to the target space space.*/ | ||||
| const float4x4 objn_mat = (obmats[mi] == nullptr) ? float4x4::identity() : | const float4x4 objn_mat = (obmats[mi] == nullptr) ? float4x4::identity() : | ||||
| clean_obmat(*obmats[mi]); | clean_obmat(*obmats[mi]); | ||||
| ▲ Show 20 Lines • Show All 529 Lines • Show Last 20 Lines | |||||