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