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) 2007 by Nicholas Bishop 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_MULTIRES_H 00029 #define BKE_MULTIRES_H 00030 00035 struct DerivedMesh; 00036 struct Mesh; 00037 struct MFace; 00038 struct Multires; 00039 struct MultiresModifierData; 00040 struct ModifierData; 00041 struct Object; 00042 struct Scene; 00043 struct MDisps; 00044 00045 void multires_mark_as_modified(struct Object *ob); 00046 00047 void multires_force_update(struct Object *ob); 00048 void multires_force_render_update(struct Object *ob); 00049 void multires_force_external_reload(struct Object *ob); 00050 00051 void multiresModifier_set_levels_from_disps(struct MultiresModifierData *mmd, struct Object *ob); 00052 00053 struct DerivedMesh *multires_dm_create_from_derived(struct MultiresModifierData*, 00054 int local_mmd, struct DerivedMesh*, struct Object *, int, int); 00055 00056 struct MultiresModifierData *find_multires_modifier_before(struct Scene *scene, 00057 struct ModifierData *lastmd); 00058 struct MultiresModifierData *get_multires_modifier(struct Scene *scene, struct Object *ob, int use_first); 00059 struct DerivedMesh *get_multires_dm(struct Scene *scene, struct MultiresModifierData *mmd, 00060 struct Object *ob); 00061 void multiresModifier_del_levels(struct MultiresModifierData *, struct Object *, int direction); 00062 void multiresModifier_base_apply(struct MultiresModifierData *mmd, struct Object *ob); 00063 void multiresModifier_subdivide(struct MultiresModifierData *mmd, struct Object *ob, 00064 int updateblock, int simple); 00065 int multiresModifier_reshape(struct Scene *scene, struct MultiresModifierData *mmd, 00066 struct Object *dst, struct Object *src); 00067 int multiresModifier_reshapeFromDM(struct Scene *scene, struct MultiresModifierData *mmd, 00068 struct Object *ob, struct DerivedMesh *srcdm); 00069 int multiresModifier_reshapeFromDeformMod(struct Scene *scene, struct MultiresModifierData *mmd, 00070 struct Object *ob, struct ModifierData *md); 00071 00072 void multires_stitch_grids(struct Object *); 00073 00074 /* Related to the old multires */ 00075 void multires_free(struct Multires *mr); 00076 void multires_load_old(struct Object *ob, struct Mesh *me); 00077 void multires_load_old_250(struct Mesh *); 00078 00079 void multiresModifier_scale_disp(struct Scene *scene, struct Object *ob); 00080 void multiresModifier_prepare_join(struct Scene *scene, struct Object *ob, struct Object *to_ob); 00081 00082 int multires_mdisp_corners(struct MDisps *s); 00083 void multires_mdisp_smooth_bounds(struct MDisps *disps); 00084 00085 /* update multires data after topology changing */ 00086 void multires_topology_changed(struct Scene *scene, struct Object *ob); 00087 00088 /**** interpolation stuff ****/ 00089 void old_mdisps_bilinear(float out[3], float (*disps)[3], const int st, float u, float v); 00090 void mdisp_rot_crn_to_face(const int S, const int corners, const int face_side, const float x, const float y, float *u, float *v); 00091 int mdisp_rot_face_to_crn(const int corners, const int face_side, const float u, const float v, float *x, float *y); 00092 int mdisp_rot_face_to_quad_crn(const int corners, const int face_side, const float u, const float v, float *x, float *y); 00093 void mdisp_apply_weight(const int S, const int corners, int x, int y, const int face_side, float crn_weight[4][2], float *u_r, float *v_r); 00094 void mdisp_flip_disp(const int S, const int corners, const float axis_x[2], const float axis_y[2], float disp[3]); 00095 void mdisp_join_tris(struct MDisps *dst, struct MDisps *tri1, struct MDisps *tri2); 00096 00097 #endif // BKE_MULTIRES_H 00098