![]() |
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) 2009 by Daniel Genrich 00019 * All rights reserved. 00020 * 00021 * Contributor(s): Daniel Genrich 00022 * 00023 * ***** END GPL LICENSE BLOCK ***** 00024 */ 00025 00031 #ifndef SMOKE_API_H_ 00032 #define SMOKE_API_H_ 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 struct FLUID_3D; 00039 00040 // export 00041 void smoke_export(struct FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles); 00042 00043 // low res 00044 struct FLUID_3D *smoke_init(int *res, float *p0); 00045 void smoke_free(struct FLUID_3D *fluid); 00046 00047 void smoke_initBlenderRNA(struct FLUID_3D *fluid, float *alpha, float *beta, float *dt_factor, float *vorticity, int *border_colli); 00048 void smoke_step(struct FLUID_3D *fluid, size_t framenr, float fps); 00049 00050 float *smoke_get_density(struct FLUID_3D *fluid); 00051 float *smoke_get_heat(struct FLUID_3D *fluid); 00052 float *smoke_get_velocity_x(struct FLUID_3D *fluid); 00053 float *smoke_get_velocity_y(struct FLUID_3D *fluid); 00054 float *smoke_get_velocity_z(struct FLUID_3D *fluid); 00055 00056 float *smoke_get_force_x(struct FLUID_3D *fluid); 00057 float *smoke_get_force_y(struct FLUID_3D *fluid); 00058 float *smoke_get_force_z(struct FLUID_3D *fluid); 00059 00060 unsigned char *smoke_get_obstacle(struct FLUID_3D *fluid); 00061 00062 size_t smoke_get_index(int x, int max_x, int y, int max_y, int z); 00063 size_t smoke_get_index2d(int x, int max_x, int y); 00064 00065 void smoke_dissolve(struct FLUID_3D *fluid, int speed, int log); 00066 00067 // wavelet turbulence functions 00068 struct WTURBULENCE *smoke_turbulence_init(int *res, int amplify, int noisetype); 00069 void smoke_turbulence_free(struct WTURBULENCE *wt); 00070 void smoke_turbulence_step(struct WTURBULENCE *wt, struct FLUID_3D *fluid); 00071 00072 float *smoke_turbulence_get_density(struct WTURBULENCE *wt); 00073 void smoke_turbulence_get_res(struct WTURBULENCE *wt, int *res); 00074 void smoke_turbulence_set_noise(struct WTURBULENCE *wt, int type); 00075 void smoke_initWaveletBlenderRNA(struct WTURBULENCE *wt, float *strength); 00076 00077 void smoke_dissolve_wavelet(struct WTURBULENCE *wt, int speed, int log); 00078 00079 // export 00080 void smoke_turbulence_export(struct WTURBULENCE *wt, float **dens, float **densold, float **tcu, float **tcv, float **tcw); 00081 00082 #ifdef __cplusplus 00083 } 00084 #endif 00085 00086 #endif /* SMOKE_API_H_ */