Blender V2.61 - r43446

BKE_texture.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 #ifndef BKE_TEXTURE_H
00028 #define BKE_TEXTURE_H
00029 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040 struct bNode;
00041 struct Brush;
00042 struct ColorBand;
00043 struct EnvMap;
00044 struct HaloRen;
00045 struct Lamp;
00046 struct LampRen;
00047 struct Material;
00048 struct MTex;
00049 struct OceanTex;
00050 struct ParticleSettings;
00051 struct PluginTex;
00052 struct PointDensity;
00053 struct Tex;
00054 struct TexMapping;
00055 struct VoxelData;
00056 struct World;
00057 
00058 /*  in ColorBand struct */
00059 #define MAXCOLORBAND 32
00060 
00061 
00062 void free_texture(struct Tex *t); 
00063 int test_dlerr(const char *name,  const char *symbol);
00064 void open_plugin_tex(struct PluginTex *pit);
00065 struct PluginTex *add_plugin_tex(char *str);
00066 void free_plugin_tex(struct PluginTex *pit);
00067 
00068 void init_colorband(struct ColorBand *coba, int rangetype);
00069 struct ColorBand *add_colorband(int rangetype);
00070 int do_colorband(const struct ColorBand *coba, float in, float out[4]);
00071 void colorband_table_RGBA(struct ColorBand *coba, float **array, int *size);
00072 int vergcband(const void *a1, const void *a2);
00073 struct CBData *colorband_element_add(struct ColorBand *coba, float position);
00074 int colorband_element_remove(struct ColorBand *coba, int index);
00075 
00076 void default_tex(struct Tex *tex);
00077 struct Tex *add_texture(const char *name);
00078 void tex_set_type(struct Tex *tex, int type);
00079 void default_mtex(struct MTex *mtex);
00080 struct MTex *add_mtex(void);
00081 struct MTex *add_mtex_id(struct ID *id, int slot);
00082 struct Tex *copy_texture(struct Tex *tex);
00083 struct Tex *localize_texture(struct Tex *tex);
00084 void make_local_texture(struct Tex *tex);
00085 void autotexname(struct Tex *tex);
00086 
00087 struct Tex *give_current_object_texture(struct Object *ob);
00088 struct Tex *give_current_material_texture(struct Material *ma);
00089 struct Tex *give_current_lamp_texture(struct Lamp *la);
00090 struct Tex *give_current_world_texture(struct World *world);
00091 struct Tex *give_current_brush_texture(struct Brush *br);
00092 struct Tex *give_current_particle_texture(struct ParticleSettings *part);
00093 
00094 struct bNode *give_current_material_texture_node(struct Material *ma);
00095 
00096 int          give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
00097 void         set_active_mtex(struct ID *id, short act);
00098 
00099 void set_current_brush_texture(struct Brush *br, struct Tex *tex);
00100 void set_current_world_texture(struct World *wo, struct Tex *tex);
00101 void set_current_material_texture(struct Material *ma, struct Tex *tex);
00102 void set_current_lamp_texture(struct Lamp *la, struct Tex *tex);
00103 void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex);
00104 
00105 int has_current_material_texture(struct Material *ma);
00106 
00107 struct TexMapping *add_tex_mapping(void);
00108 void default_tex_mapping(struct TexMapping *texmap);
00109 void init_tex_mapping(struct TexMapping *texmap);
00110 
00111 struct ColorMapping *add_color_mapping(void);
00112 void default_color_mapping(struct ColorMapping *colormap);
00113 
00114 void    BKE_free_envmapdata(struct EnvMap *env);
00115 void    BKE_free_envmap(struct EnvMap *env);
00116 struct EnvMap *BKE_add_envmap(void);
00117 struct EnvMap *BKE_copy_envmap(struct EnvMap *env);
00118 
00119 void    BKE_free_pointdensitydata(struct PointDensity *pd);
00120 void    BKE_free_pointdensity(struct PointDensity *pd);
00121 struct PointDensity *BKE_add_pointdensity(void);
00122 struct PointDensity *BKE_copy_pointdensity(struct PointDensity *pd);
00123 
00124 void BKE_free_voxeldatadata(struct VoxelData *vd);
00125 void BKE_free_voxeldata(struct VoxelData *vd);
00126 struct VoxelData *BKE_add_voxeldata(void);
00127 struct VoxelData *BKE_copy_voxeldata(struct VoxelData *vd);
00128 
00129 void BKE_free_oceantex(struct OceanTex *ot);
00130 struct OceanTex *BKE_add_oceantex(void);
00131 struct OceanTex *BKE_copy_oceantex(struct OceanTex *ot);
00132     
00133 int     BKE_texture_dependsOnTime(const struct Tex *texture);
00134 
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138 
00139 #endif
00140