2 #include "BaseObject.h" 3 #include "util/FastRandom.h" 5 #include "util/unordered_array.hpp" 6 #include "WeatherParticle.h" 10 class WeatherParticleSpawner;
26 ATTRIBUTE_METHOD1(
CWeatherEffect, EnableRain_s,
bool) { cls->EnableRain(p1);
return S_OK; }
27 ATTRIBUTE_METHOD1(
CWeatherEffect, EnableSnow_s,
bool) { cls->EnableSnow(p1);
return S_OK; }
29 ATTRIBUTE_METHOD1(
CWeatherEffect, SetRainStrength_s,
float) { cls->SetRainStrength(p1);
return S_OK; }
30 ATTRIBUTE_METHOD1(
CWeatherEffect, SetSnowStrength_s,
float) { cls->SetSnowStrength(p1);
return S_OK; }
33 WeatherParticle* AddParticle(
float x,
float y,
float z, WeatherType weather_type);
35 void SpawnAllParticles();
44 FastRandom& GetSpawnRand() {
return m_spawnRand; }
45 FastRandom& GetSpeedRand() {
return m_speedRand; }
52 void EnableWeatherItem(WeatherType weather_type,
bool bEnabled);
53 bool IsWeatherItemEnabled(WeatherType weather_type);
68 virtual void Animate(
double dTimeDelta,
int nRenderNumber = 0);
73 void EnableSnow(
bool bEnabled);
74 void EnableRain(
bool bEnabled);
79 void SetSnowStrength(
float fStrength);
85 float m_default_strength;
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
bool HasActiveSpawners()
if any spawner is enabled.
Definition: WeatherEffect.cpp:53
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual HRESULT Draw(SceneState *sceneState)
only for drawable objects
Definition: WeatherEffect.cpp:129
base class for weather particle
Definition: WeatherParticle.h:21
Definition: unordered_array.hpp:9
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: WeatherEffect.cpp:239
int32 GetTerrainHighestBlock(int32 x, int32 z, int32 &outY)
get the highest solid block information in coordinate x, z
Definition: WeatherEffect.cpp:93
Definition: BaseCamera.h:70
int PrepareRender(CBaseCamera *pCamera, SceneState *pSceneState)
derived class can override this function to place the object in to the render pipeline.
Definition: WeatherEffect.cpp:232
virtual void Cleanup()
clean up the object.
Definition: WeatherEffect.cpp:73
either rain or snow.
Definition: WeatherEffect.h:14
Definition: FastRandom.h:3
virtual void Animate(double dTimeDelta, int nRenderNumber=0)
animate the model by a given delta time.
Definition: WeatherEffect.cpp:108
Check to see if it is a tick.
Definition: Tick.h:5
Definition: WeatherParticleSpawner.h:16
void SetRainStrength(float fStrength)
Definition: WeatherEffect.cpp:222
Defines the base class of all scene elements:CBaseObject for Parallel World Engine.
Definition: BaseObject.h:230