Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_key.h
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2001-2002 NaN Holding BV. All rights reserved. */ | * Copyright 2001-2002 NaN Holding BV. All rights reserved. */ | ||||
| #pragma once | #pragma once | ||||
| /** \file | /** \file | ||||
| * \ingroup bke | * \ingroup bke | ||||
| */ | */ | ||||
| struct Curve; | struct Curve; | ||||
| struct ID; | struct ID; | ||||
| struct Key; | struct Key; | ||||
| struct KeyBlock; | struct KeyBlock; | ||||
| struct Lattice; | struct Lattice; | ||||
| struct ListBase; | struct ListBase; | ||||
| struct Main; | struct Main; | ||||
| struct Mesh; | struct Mesh; | ||||
| struct MVert; | |||||
| struct Object; | struct Object; | ||||
| /* Kernel prototypes */ | /* Kernel prototypes */ | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| /** | /** | ||||
| ▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | void BKE_keyblock_curve_data_transform(const struct ListBase *nurb, | ||||
| const void *src, | const void *src, | ||||
| void *dst); | void *dst); | ||||
| void BKE_keyblock_update_from_curve(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb); | void BKE_keyblock_update_from_curve(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb); | ||||
| void BKE_keyblock_convert_from_curve(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb); | void BKE_keyblock_convert_from_curve(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb); | ||||
| void BKE_keyblock_convert_to_curve(struct KeyBlock *kb, struct Curve *cu, struct ListBase *nurb); | void BKE_keyblock_convert_to_curve(struct KeyBlock *kb, struct Curve *cu, struct ListBase *nurb); | ||||
| void BKE_keyblock_update_from_mesh(struct Mesh *me, struct KeyBlock *kb); | void BKE_keyblock_update_from_mesh(struct Mesh *me, struct KeyBlock *kb); | ||||
| void BKE_keyblock_convert_from_mesh(struct Mesh *me, struct Key *key, struct KeyBlock *kb); | void BKE_keyblock_convert_from_mesh(struct Mesh *me, struct Key *key, struct KeyBlock *kb); | ||||
| void BKE_keyblock_convert_to_mesh(struct KeyBlock *kb, struct Mesh *me); | void BKE_keyblock_convert_to_mesh(struct KeyBlock *kb, struct MVert *mvert, int totvert); | ||||
| /** | /** | ||||
| * Computes normals (vertices, polygons and/or loops ones) of given mesh for given shape key. | * Apply the shape key's deformation to the mesh and calculate the face normals. | ||||
| * | */ | ||||
| * \param kb: the KeyBlock to use to compute normals. | void BKE_keyblock_mesh_calc_normals_vertex(const struct KeyBlock *kb, | ||||
| * \param mesh: the Mesh to apply key-block to. | const struct Mesh *mesh, | ||||
| * \param r_vertnors: if non-NULL, an array of vectors, same length as number of vertices. | float (*r_vert_normals)[3]); | ||||
| * \param r_polynors: if non-NULL, an array of vectors, same length as number of polygons. | /** | ||||
| * \param r_loopnors: if non-NULL, an array of vectors, same length as number of loops. | * Apply the shape key's deformation to the mesh and calculate the face normals. | ||||
| */ | */ | ||||
| void BKE_keyblock_mesh_calc_normals(struct KeyBlock *kb, | void BKE_keyblock_mesh_calc_normals_poly(const struct KeyBlock *kb, | ||||
| struct Mesh *mesh, | const struct Mesh *mesh, | ||||
| float (*r_vertnors)[3], | float (*r_poly_normals)[3]); | ||||
| float (*r_polynors)[3], | /** | ||||
| float (*r_loopnors)[3]); | * Apply the shape key's deformation to the mesh and calculate the face corner normals. | ||||
| */ | |||||
| void BKE_keyblock_mesh_calc_normals_split(const struct KeyBlock *kb, | |||||
| const struct Mesh *mesh, | |||||
| float (*r_split_normals)[3]); | |||||
| void BKE_keyblock_update_from_vertcos(struct Object *ob, | void BKE_keyblock_update_from_vertcos(struct Object *ob, | ||||
| struct KeyBlock *kb, | struct KeyBlock *kb, | ||||
| const float (*vertCos)[3]); | const float (*vertCos)[3]); | ||||
| void BKE_keyblock_convert_from_vertcos(struct Object *ob, | void BKE_keyblock_convert_from_vertcos(struct Object *ob, | ||||
| struct KeyBlock *kb, | struct KeyBlock *kb, | ||||
| const float (*vertCos)[3]); | const float (*vertCos)[3]); | ||||
| float (*BKE_keyblock_convert_to_vertcos(struct Object *ob, struct KeyBlock *kb))[3]; | float (*BKE_keyblock_convert_to_vertcos(struct Object *ob, struct KeyBlock *kb))[3]; | ||||
| ▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines | |||||