Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_mesh_tangent.h
| Show All 13 Lines | |||||
| /** | /** | ||||
| * Compute simplified tangent space normals, i.e. | * Compute simplified tangent space normals, i.e. | ||||
| * tangent vector + sign of bi-tangent one, which combined with | * tangent vector + sign of bi-tangent one, which combined with | ||||
| * split normals can be used to recreate the full tangent space. | * split normals can be used to recreate the full tangent space. | ||||
| * NOTE: * The mesh should be made of only tris and quads! | * NOTE: * The mesh should be made of only tris and quads! | ||||
| */ | */ | ||||
| void BKE_mesh_calc_loop_tangent_single_ex(const float (*vert_positions)[3], | void BKE_mesh_calc_loop_tangent_single_ex(const float (*vert_positions)[3], | ||||
| int numVerts, | int numVerts, | ||||
| const struct MLoop *mloops, | const int *corner_verts, | ||||
| float (*r_looptangent)[4], | float (*r_looptangent)[4], | ||||
| const float (*loop_normals)[3], | const float (*loop_normals)[3], | ||||
| const float (*loopuv)[2], | const float (*loopuv)[2], | ||||
| int numLoops, | int numLoops, | ||||
| const struct MPoly *mpolys, | const struct MPoly *mpolys, | ||||
| int numPolys, | int numPolys, | ||||
| struct ReportList *reports); | struct ReportList *reports); | ||||
| /** | /** | ||||
| * Wrapper around BKE_mesh_calc_loop_tangent_single_ex, which takes care of most boilerplate code. | * Wrapper around BKE_mesh_calc_loop_tangent_single_ex, which takes care of most boilerplate code. | ||||
| * \note | * \note | ||||
| * - There must be a valid loop's CD_NORMALS available. | * - There must be a valid loop's CD_NORMALS available. | ||||
| * - The mesh should be made of only tris and quads! | * - The mesh should be made of only tris and quads! | ||||
| */ | */ | ||||
| void BKE_mesh_calc_loop_tangent_single(struct Mesh *mesh, | void BKE_mesh_calc_loop_tangent_single(struct Mesh *mesh, | ||||
| const char *uvmap, | const char *uvmap, | ||||
| float (*r_looptangents)[4], | float (*r_looptangents)[4], | ||||
| struct ReportList *reports); | struct ReportList *reports); | ||||
| /** | /** | ||||
| * See: #BKE_editmesh_loop_tangent_calc (matching logic). | * See: #BKE_editmesh_loop_tangent_calc (matching logic). | ||||
| */ | */ | ||||
| void BKE_mesh_calc_loop_tangent_ex(const float (*vert_positions)[3], | void BKE_mesh_calc_loop_tangent_ex(const float (*vert_positions)[3], | ||||
| const struct MPoly *mpoly, | const struct MPoly *mpoly, | ||||
| uint mpoly_len, | uint mpoly_len, | ||||
| const struct MLoop *mloop, | const int *corner_verts, | ||||
| const struct MLoopTri *looptri, | const struct MLoopTri *looptri, | ||||
| uint looptri_len, | uint looptri_len, | ||||
| struct CustomData *loopdata, | struct CustomData *loopdata, | ||||
| bool calc_active_tangent, | bool calc_active_tangent, | ||||
| const char (*tangent_names)[MAX_CUSTOMDATA_LAYER_NAME], | const char (*tangent_names)[MAX_CUSTOMDATA_LAYER_NAME], | ||||
| int tangent_names_len, | int tangent_names_len, | ||||
| const float (*vert_normals)[3], | const float (*vert_normals)[3], | ||||
| ▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines | |||||