Blender V2.61 - r43446

DNA_lattice_types.h

Go to the documentation of this file.
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 
00032 #ifndef DNA_LATTICE_TYPES_H
00033 #define DNA_LATTICE_TYPES_H
00034 
00035 #include "DNA_defs.h"
00036 #include "DNA_ID.h"
00037 
00038 struct AnimData;
00039 struct BPoint;
00040 struct Ipo;
00041 struct Key;
00042 struct MDeformVert;
00043 
00044 typedef struct EditLatt {
00045     struct Lattice *latt;
00046 
00047     int shapenr;
00048 
00049     char pad[4];
00050 } EditLatt;
00051 
00052 typedef struct Lattice {
00053     ID id;
00054     struct AnimData *adt;
00055     
00056     short pntsu, pntsv, pntsw, flag;
00057     short opntsu, opntsv, opntsw, pad2;
00058     char typeu, typev, typew, pad3;
00059     int pad;
00060     
00061     float fu, fv, fw, du, dv, dw;
00062     
00063     struct BPoint *def;
00064     
00065     struct Ipo *ipo  DNA_DEPRECATED;  /* old animation system, deprecated for 2.5 */
00066     struct Key *key;
00067     
00068     struct MDeformVert *dvert;
00069     char vgroup[64]; /* multiply the influence, MAX_VGROUP_NAME */
00070     
00071     /* used while deforming, always free and NULL after use */
00072     float *latticedata;
00073     float latmat[4][4];
00074     
00075     struct EditLatt *editlatt;
00076 } Lattice;
00077 
00078 /* ***************** LATTICE ********************* */
00079 
00080 /* flag */
00081 #define LT_GRID     1
00082 #define LT_OUTSIDE  2
00083 
00084 #define LT_DS_EXPAND    4
00085 
00086 #define LT_INDEX(lt, u, v, w) ((w) * ((lt)->pntsu * (lt)->pntsv) + ((v) * (lt)->pntsu) + (u))
00087 
00088 #endif
00089