Blender  V2.59
BKE_lattice.h
Go to the documentation of this file.
00001 /*
00002  * $Id: BKE_lattice.h 34962 2011-02-18 13:05:18Z jesterking $
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_LATTICE_H
00031 #define BKE_LATTICE_H
00032 
00039 struct Lattice;
00040 struct Object;
00041 struct Scene;
00042 struct DerivedMesh;
00043 struct BPoint;
00044 struct MDeformVert;
00045 
00046 void resizelattice(struct Lattice *lt, int u, int v, int w, struct Object *ltOb);
00047 struct Lattice *add_lattice(const char *name);
00048 struct Lattice *copy_lattice(struct Lattice *lt);
00049 void free_lattice(struct Lattice *lt);
00050 void make_local_lattice(struct Lattice *lt);
00051 void calc_lat_fudu(int flag, int res, float *fu, float *du);
00052 
00053 void init_latt_deform(struct Object *oblatt, struct Object *ob);
00054 void calc_latt_deform(struct Object *, float *co, float weight);
00055 void end_latt_deform(struct Object *);
00056 
00057 int object_deform_mball(struct Object *ob, struct ListBase *dispbase);
00058 void outside_lattice(struct Lattice *lt);
00059 
00060 void curve_deform_verts(struct Scene *scene, struct Object *cuOb, struct Object *target, 
00061                                                 struct DerivedMesh *dm, float (*vertexCos)[3], 
00062                                                 int numVerts, char *vgroup, short defaxis);
00063 void curve_deform_vector(struct Scene *scene, struct Object *cuOb, struct Object *target, 
00064                                                  float *orco, float *vec, float mat[][3], int no_rot_axis);
00065 
00066 void lattice_deform_verts(struct Object *laOb, struct Object *target,
00067                                                   struct DerivedMesh *dm, float (*vertexCos)[3],
00068                                                   int numVerts, char *vgroup);
00069 void armature_deform_verts(struct Object *armOb, struct Object *target,
00070                                                    struct DerivedMesh *dm, float (*vertexCos)[3],
00071                                                    float (*defMats)[3][3], int numVerts, int deformflag, 
00072                                                    float (*prevCos)[3], const char *defgrp_name);
00073 
00074 float (*lattice_getVertexCos(struct Object *ob, int *numVerts_r))[3];
00075 void lattice_applyVertexCos(struct Object *ob, float (*vertexCos)[3]);
00076 void lattice_calc_modifiers(struct Scene *scene, struct Object *ob);
00077 
00078 struct MDeformVert* lattice_get_deform_verts(struct Object *lattice);
00079 
00080 #endif
00081