Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 */ 00027 00028 #ifndef BKE_DEFORM_H 00029 #define BKE_DEFORM_H 00030 00038 struct Object; 00039 struct ListBase; 00040 struct bDeformGroup; 00041 struct MDeformVert; 00042 00043 void defgroup_copy_list(struct ListBase *lb1, struct ListBase *lb2); 00044 struct bDeformGroup *defgroup_duplicate(struct bDeformGroup *ingroup); 00045 struct bDeformGroup *defgroup_find_name(struct Object *ob, const char *name); 00046 int *defgroup_flip_map(struct Object *ob, int *flip_map_len, int use_default); 00047 int *defgroup_flip_map_single(struct Object *ob, int *flip_map_len, int use_default, int defgroup); 00048 int defgroup_flip_index(struct Object *ob, int index, int use_default); 00049 int defgroup_name_index(struct Object *ob, const char *name); 00050 void defgroup_unique_name(struct bDeformGroup *dg, struct Object *ob); 00051 00052 struct MDeformWeight *defvert_find_index(const struct MDeformVert *dv, const int defgroup); 00053 struct MDeformWeight *defvert_verify_index(struct MDeformVert *dv, const int defgroup); 00054 void defvert_add_index_notest(struct MDeformVert *dv, int defgroup, const float weight); 00055 void defvert_remove_group(struct MDeformVert *dvert, struct MDeformWeight *dw); 00056 00057 float defvert_find_weight(const struct MDeformVert *dvert, const int defgroup); 00058 float defvert_array_find_weight_safe(const struct MDeformVert *dvert, const int index, const int defgroup); 00059 00060 void defvert_copy(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src); 00061 void defvert_copy_index(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src, const int defgroup); 00062 void defvert_sync(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src, int use_verify); 00063 void defvert_sync_mapped(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src, 00064 const int *flip_map, const int flip_map_len, const int use_verify); 00065 void defvert_remap (struct MDeformVert *dvert, int *map, const int map_len); 00066 void defvert_flip(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len); 00067 void defvert_normalize(struct MDeformVert *dvert); 00068 void defvert_normalize_lock(struct MDeformVert *dvert, const int def_nr_lock); 00069 00070 /* utility function, note that 32 chars is the maximum string length since its only 00071 * used with defgroups currently */ 00072 void flip_side_name(char name[64], const char from_name[64], int strip_number); 00073 00074 #endif 00075