Changeset View
Changeset View
Standalone View
Standalone View
intern/smoke/intern/smoke_API.cpp
| Show All 24 Lines | |||||
| */ | */ | ||||
| /** \file smoke/intern/smoke_API.cpp | /** \file smoke/intern/smoke_API.cpp | ||||
| * \ingroup smoke | * \ingroup smoke | ||||
| */ | */ | ||||
| #include "FLUID_3D.h" | #include "FLUID_3D.h" | ||||
| #include "WTURBULENCE.h" | #include "WTURBULENCE.h" | ||||
| #include "spectrum.h" | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| #include "../extern/smoke_API.h" /* to ensure valid prototypes */ | #include "../extern/smoke_API.h" /* to ensure valid prototypes */ | ||||
| extern "C" FLUID_3D *smoke_init(int *res, float dx, float dtdef, int use_heat, int use_fire, int use_colors) | extern "C" FLUID_3D *smoke_init(int *res, float dx, float dtdef, int use_heat, int use_fire, int use_colors) | ||||
| ▲ Show 20 Lines • Show All 402 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| #endif | #endif | ||||
| extern "C" void smoke_turbulence_set_noise(WTURBULENCE *wt, int type, const char *noisefile_path) | extern "C" void smoke_turbulence_set_noise(WTURBULENCE *wt, int type, const char *noisefile_path) | ||||
| { | { | ||||
| wt->setNoise(type, noisefile_path); | wt->setNoise(type, noisefile_path); | ||||
| } | } | ||||
| extern "C" void flame_get_spectrum(unsigned char *spec, int width, float t1, float t2) | |||||
| { | |||||
| spectrum(t1, t2, width, spec); | |||||
| } | |||||
| extern "C" int smoke_has_heat(FLUID_3D *fluid) | extern "C" int smoke_has_heat(FLUID_3D *fluid) | ||||
| { | { | ||||
| return (fluid->_heat) ? 1 : 0; | return (fluid->_heat) ? 1 : 0; | ||||
| } | } | ||||
| extern "C" int smoke_has_fuel(FLUID_3D *fluid) | extern "C" int smoke_has_fuel(FLUID_3D *fluid) | ||||
| { | { | ||||
| return (fluid->_fuel) ? 1 : 0; | return (fluid->_fuel) ? 1 : 0; | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||