|
Blender
V2.59
|
00001 /* 00002 * $Id: BKE_object.h 36772 2011-05-19 11:21:37Z blendix $ 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_OBJECT_H 00031 #define BKE_OBJECT_H 00032 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 struct Base; 00042 struct Scene; 00043 struct Object; 00044 struct Camera; 00045 struct BoundBox; 00046 struct View3D; 00047 struct SoftBody; 00048 struct BulletSoftBody; 00049 struct Group; 00050 struct bAction; 00051 struct RenderData; 00052 struct rctf; 00053 00054 void clear_workob(struct Object *workob); 00055 void what_does_parent(struct Scene *scene, struct Object *ob, struct Object *workob); 00056 00057 void copy_baseflags(struct Scene *scene); 00058 void copy_objectflags(struct Scene *scene); 00059 struct SoftBody *copy_softbody(struct SoftBody *sb); 00060 struct BulletSoftBody *copy_bulletsoftbody(struct BulletSoftBody *sb); 00061 void copy_object_particlesystems(struct Object *obn, struct Object *ob); 00062 void copy_object_softbody(struct Object *obn, struct Object *ob); 00063 void object_free_particlesystems(struct Object *ob); 00064 void object_free_softbody(struct Object *ob); 00065 void object_free_bulletsoftbody(struct Object *ob); 00066 void update_base_layer(struct Scene *scene, struct Object *ob); 00067 00068 void free_object(struct Object *ob); 00069 void object_free_display(struct Object *ob); 00070 00071 void object_link_modifiers(struct Object *ob, struct Object *from); 00072 void object_free_modifiers(struct Object *ob); 00073 00074 void object_make_proxy(struct Object *ob, struct Object *target, struct Object *gob); 00075 void object_copy_proxy_drivers(struct Object *ob, struct Object *target); 00076 00077 void unlink_object(struct Object *ob); 00078 int exist_object(struct Object *obtest); 00079 void *add_camera(const char *name); 00080 struct Camera *copy_camera(struct Camera *cam); 00081 void make_local_camera(struct Camera *cam); 00082 float dof_camera(struct Object *ob); 00083 00084 void *add_lamp(const char *name); 00085 struct Lamp *copy_lamp(struct Lamp *la); 00086 struct Lamp *localize_lamp(struct Lamp *la); 00087 void make_local_lamp(struct Lamp *la); 00088 void free_camera(struct Camera *ca); 00089 void free_lamp(struct Lamp *la); 00090 00091 struct Object *add_only_object(int type, const char *name); 00092 struct Object *add_object(struct Scene *scene, int type); 00093 00094 struct Object *copy_object(struct Object *ob); 00095 void make_local_object(struct Object *ob); 00096 int object_is_libdata(struct Object *ob); 00097 int object_data_is_libdata(struct Object *ob); 00098 void set_mblur_offs(float blur); 00099 void set_field_offs(float field); 00100 void disable_speed_curve(int val); 00101 00102 float bsystem_time(struct Scene *scene, struct Object *ob, float cfra, float ofs); 00103 void object_scale_to_mat3(struct Object *ob, float mat[][3]); 00104 void object_rot_to_mat3(struct Object *ob, float mat[][3]); 00105 void object_mat3_to_rot(struct Object *ob, float mat[][3], short use_compat); 00106 void object_to_mat3(struct Object *ob, float mat[][3]); 00107 void object_to_mat4(struct Object *ob, float mat[][4]); 00108 void object_apply_mat4(struct Object *ob, float mat[][4], const short use_compat, const short use_parent); 00109 00110 void set_no_parent_ipo(int val); 00111 00112 void where_is_object_time(struct Scene *scene, struct Object *ob, float ctime); 00113 void where_is_object(struct Scene *scene, struct Object *ob); 00114 void where_is_object_simul(struct Scene *scene, struct Object *ob); 00115 00116 struct BoundBox *unit_boundbox(void); 00117 void boundbox_set_from_min_max(struct BoundBox *bb, float min[3], float max[3]); 00118 struct BoundBox *object_get_boundbox(struct Object *ob); 00119 void object_get_dimensions(struct Object *ob, float *value); 00120 void object_set_dimensions(struct Object *ob, const float *value); 00121 void object_boundbox_flag(struct Object *ob, int flag, int set); 00122 void minmax_object(struct Object *ob, float *min, float *max); 00123 int minmax_object_duplis(struct Scene *scene, struct Object *ob, float *min, float *max); 00124 void solve_tracking (struct Object *ob, float targetmat[][4]); 00125 int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3]); 00126 00127 void *object_tfm_backup(struct Object *ob); 00128 void object_tfm_restore(struct Object *ob, void *obtfm_pt); 00129 00130 void object_handle_update(struct Scene *scene, struct Object *ob); 00131 00132 float give_timeoffset(struct Object *ob); 00133 int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot); 00134 00135 int object_insert_ptcache(struct Object *ob); 00136 // void object_delete_ptcache(struct Object *ob, int index); 00137 struct KeyBlock *object_insert_shape_key(struct Scene *scene, struct Object *ob, const char *name, int from_mix); 00138 00139 int object_is_modified(struct Scene *scene, struct Object *ob); 00140 00141 void object_camera_mode(struct RenderData *rd, struct Object *camera); 00142 void object_camera_matrix( 00143 struct RenderData *rd, struct Object *camera, int winx, int winy, short field_second, 00144 float winmat[][4], struct rctf *viewplane, float *clipsta, float *clipend, float *lens, float *ycor, 00145 float *viewdx, float *viewdy); 00146 00147 void object_relink(struct Object *ob); 00148 00149 #ifdef __cplusplus 00150 } 00151 #endif 00152 00153 #endif