2 #include "TextureEntity.h" 3 #include "util/FastRandom.h" 4 #include "BaseObject.h" 7 #include "WeatherParticle.h" 12 class WeatherParticleSpawner;
30 ATTRIBUTE_METHOD1(
WeatherParticleSpawner, GetStrength_s,
float*) { *p1 = cls->GetStrength();
return S_OK; }
32 ATTRIBUTE_METHOD1(
WeatherParticleSpawner, SetSpawnRadius_s,
float) { cls->SetSpawnRadius(p1);
return S_OK; }
33 ATTRIBUTE_METHOD1(
WeatherParticleSpawner, GetSpawnRadius_s,
float*) { *p1 = cls->GetSpawnRadius();
return S_OK; }
35 ATTRIBUTE_METHOD1(
WeatherParticleSpawner, SetTexture_s,
const char*) { cls->SetTextureFilename(p1);
return S_OK; }
42 bool IsEnabled()
const;
43 void SetEnabled(
bool val);
45 float GetStrength()
const {
return m_fStrength; }
46 void SetStrength(
float val) { m_fStrength = val; }
48 float GetSpawnRadius()
const {
return m_fSpawnRadius; }
49 void SetSpawnRadius(
float val) { m_fSpawnRadius = val; }
51 TextureEntity* GetTexture()
const {
return m_pTexture.get(); }
54 ParaEngine::WeatherType GetWeatherType()
const {
return m_type; }
55 FastRandom& GetSpeedRand() {
return m_randomSpeed; }
58 void SetWeatherEffect(
CWeatherEffect* val) { m_pWeatherEffect = val; }
65 void SetTextureFilename(
const std::string& sFilename);
85 int GetReusableCount();
92 int GetRandomTileIndex();
103 std::vector <WeatherParticle*> m_unusedEntities;
104 asset_ptr<TextureEntity> m_pTexture;
112 int m_nFromTileIndex;
115 std::vector<ParticleRectUV> m_tiles;
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
int m_texCols
a new particle will use a random image at one of the rows*cols regions in the texture accociated with...
Definition: WeatherParticleSpawner.h:109
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
different physics engine has different winding order.
Definition: EventBinding.h:32
base class for weather particle
Definition: WeatherParticle.h:21
Standard 2-dimensional vector.
Definition: ParaVector2.h:16
void SetTextureRowsCols(int nRows, int nCols, int nFromIndex=0, int nToIndex=-1)
set how many rows and cols that the texture associated with this particle system is evenly divided in...
Definition: WeatherParticleSpawner.cpp:107
either rain or snow.
Definition: WeatherEffect.h:14
Definition: FastRandom.h:3
void Cleanup()
clean up the object.
Definition: WeatherParticleSpawner.cpp:27
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: WeatherParticleSpawner.cpp:183
Definition: WeatherParticleSpawner.h:16
bool RecollectEntity(WeatherParticle *entity)
this function should and can only be called after the entity is detached or destroyed.
Definition: WeatherParticleSpawner.cpp:66
Defines the base class of all scene elements:CBaseObject for Parallel World Engine.
Definition: BaseObject.h:230
WeatherParticle * CreateEntity()
Creates a new entity, or reuses one that's no longer in use.
Definition: WeatherParticleSpawner.cpp:32
bool IsSpawnPoolFull()
return true if we have reached the max number of particles allowed at a time.
Definition: WeatherParticleSpawner.cpp:178
for pre-calculated UV
Definition: ParticleElement.h:12