Files
test/source/blender/blenkernel/BKE_mesh_iterators.hh
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00

53 lines
1.8 KiB
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/** \file
* \ingroup bke
*/
struct Mesh;
enum MeshForeachFlag {
MESH_FOREACH_NOP = 0,
/* foreachMappedVert, foreachMappedLoop, foreachMappedFaceCenter */
MESH_FOREACH_USE_NORMAL = (1 << 0),
};
void BKE_mesh_foreach_mapped_vert(
const Mesh *mesh,
void (*func)(void *user_data, int index, const float co[3], const float no[3]),
void *user_data,
MeshForeachFlag flag);
/**
* Copied from #cdDM_foreachMappedEdge.
* \param tot_edges: Number of original edges. Used to avoid calling the callback with invalid
* edge indices.
*/
void BKE_mesh_foreach_mapped_edge(
Mesh *mesh,
int tot_edges,
void (*func)(void *user_data, int index, const float v0co[3], const float v1co[3]),
void *user_data);
void BKE_mesh_foreach_mapped_loop(Mesh *mesh,
void (*func)(void *user_data,
int vertex_index,
int face_index,
const float co[3],
const float no[3]),
void *user_data,
MeshForeachFlag flag);
void BKE_mesh_foreach_mapped_face_center(
Mesh *mesh,
void (*func)(void *user_data, int index, const float cent[3], const float no[3]),
void *user_data,
MeshForeachFlag flag);
void BKE_mesh_foreach_mapped_subdiv_face_center(
Mesh *mesh,
void (*func)(void *user_data, int index, const float cent[3], const float no[3]),
void *user_data,
MeshForeachFlag flag);
void BKE_mesh_foreach_mapped_vert_coords_get(const Mesh *me_eval, float (*r_cos)[3], int totcos);