24 #ifndef _SkyX_VClouds_DataManager_H_
25 #define _SkyX_VClouds_DataManager_H_
79 void create(
const int& nx,
const int& ny,
const int& nz);
84 void update(
const Ogre::Real &timeSinceLastFrame);
104 mUpdateTime = UpdateTime;
121 return mCurrentTransition/mUpdateTime;
138 void setWheater(
const float& Humidity,
const float& AverageCloudsSize,
139 const bool& delayedResponse =
true);
147 void addEllipsoid(
Ellipsoid *e,
const bool& UpdateProbabilities =
true);
151 void forceToUpdateData();
160 void _initData(
const int& nx,
const int& ny,
const int& nz);
169 Cell *** _create3DCellArray(
const int& nx,
const int& ny,
const int& nz,
170 const bool&
init =
true);
177 void _delete3DCellArray(Cell ***c,
const int& nx,
const int& ny);
186 void _copy3DCellArraysData(Cell ***src, Cell ***dest,
const int& nx,
187 const int& ny,
const int& nz);
197 void _performCalculations(
const int& nx,
const int& ny,
const int& nz,
198 const int& step,
const int& xStart,
208 void _updateVolTextureData(Cell ***c,
const VolTextureId& TexId,
209 const int& nx,
const int& ny,
const int& nz);
222 float _getDensityAt(Cell ***c,
const int& nx,
const int& ny,
223 const int& nz,
const int& x,
const int& y,
const int& z,
224 const int& r,
const float& strength)
const;
232 float _getDensityAt(Cell ***c,
const int& x,
const int& y,
244 bool _fact(Cell ***c,
const int& nx,
const int& ny,
245 const int& nz,
const int& x,
const int& y,
const int& z)
const;
254 void _clearProbabilities(Cell*** c,
const int& nx,
const int& ny,
255 const int& nz,
const bool& clearData);
265 void _updateProbabilities(Cell*** c,
const int& nx,
const int& ny,
266 const int& nz,
const bool& delayedResponse);
279 Ogre::Real _getLightAbsorcionAt(Cell*** c,
const int& nx,
280 const int& ny,
const int& nz,
281 const int& x,
const int& y,
282 const int& z,
const Ogre::Vector3& d,
283 const float& att)
const;
291 void _createVolTexture(
const VolTextureId& TexId,
const int& nx,
292 const int& ny,
const int& nz);
298 Cell ***mCellsCurrent, ***mCellsTmp;
307 float mCurrentTransition;
311 int mStep, mXStart, mXEnd;
314 int mMaxNumberOfClouds;
317 Ogre::TexturePtr mVolTextures[2];
320 bool mVolTexToUpdate;
326 std::vector<Ellipsoid*> mEllipsoids;
Definition: FastFakeRandom.h:31
const Ogre::Real & getUpdateTime() const
Get update time.
Definition: DataManager.h:110
bool hum
Humidity, phase and cloud.
Definition: DataManager.h:45
void create()
Create SkyX.
const bool & isCreated() const
Has been create(...) already called?
Definition: DataManager.h:93
Definition: DataManager.h:37
float light
Light absorcion.
Definition: DataManager.h:54
float phum
Probabilities.
Definition: DataManager.h:48
VolTextureId
Volumetric textures enumeration.
Definition: DataManager.h:59
Cell struct.
Definition: DataManager.h:42
Ellipsoid class x^2 y^2 z^2 / + / + / = 1 a^2 b^2 c^2.
Definition: Ellipsoid.h:38
GAZEBO_VISIBLE void init()
float dens
Continous density.
Definition: DataManager.h:51
SkyX(Ogre::SceneManager *sm, Controller *c)
Contructor.
void setUpdateTime(const float &UpdateTime)
Set update time.
Definition: DataManager.h:102
const Ogre::Real _getInterpolation() const
Get current interpolation factor.
Definition: DataManager.h:119
bool mCreated
Is SkyX created?
Definition: SkyX.h:422
class __declspec(dllimport) BasicController void update(const Ogre::Real &simDeltaTime)
Basic controller class.
#define DllExport
Include external headers.
Definition: Prerequisites.h:45