00001
00002
00003
00004
00005 #ifndef __I_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__
00006 #define __I_PARTICLE_SYSTEM_SCENE_NODE_H_INCLUDED__
00007
00008 #include "ISceneNode.h"
00009 #include "IParticleAnimatedMeshSceneNodeEmitter.h"
00010 #include "IParticleBoxEmitter.h"
00011 #include "IParticleCylinderEmitter.h"
00012 #include "IParticleMeshEmitter.h"
00013 #include "IParticleRingEmitter.h"
00014 #include "IParticleSphereEmitter.h"
00015 #include "IParticleAttractionAffector.h"
00016 #include "IParticleFadeOutAffector.h"
00017 #include "IParticleGravityAffector.h"
00018 #include "IParticleRotationAffector.h"
00019 #include "dimension2d.h"
00020
00021 namespace irr
00022 {
00023 namespace scene
00024 {
00025
00027
00046 class IParticleSystemSceneNode : public ISceneNode
00047 {
00048 public:
00049
00051 IParticleSystemSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
00052 const core::vector3df& position = core::vector3df(0,0,0),
00053 const core::vector3df& rotation = core::vector3df(0,0,0),
00054 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))
00055 : ISceneNode(parent, mgr, id, position, rotation, scale) {}
00056
00058 virtual void setParticleSize(
00059 const core::dimension2d<f32> &size = core::dimension2d<f32>(5.0f, 5.0f)) = 0;
00060
00062
00065 virtual void setParticlesAreGlobal(bool global) = 0;
00066
00068
00074 virtual void setEmitter(IParticleEmitter* emitter) = 0;
00075
00077
00088 virtual void addAffector(IParticleAffector* affector) = 0;
00089
00091 virtual void removeAllAffectors() = 0;
00092
00094
00131 virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter(
00132 scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true,
00133 const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f),
00134 f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1,
00135 bool everyMeshVertex = false,
00136 u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
00137 const video::SColor& minStartColor = video::SColor(255,0,0,0),
00138 const video::SColor& maxStartColor = video::SColor(255,255,255,255),
00139 u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000,
00140 s32 maxAngleDegrees = 0 ) = 0;
00141
00143
00163 virtual IParticleBoxEmitter* createBoxEmitter(
00164 const core::aabbox3df& box = core::aabbox3df(-10,28,-10,10,30,10),
00165 const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
00166 u32 minParticlesPerSecond = 5,
00167 u32 maxParticlesPerSecond = 10,
00168 const video::SColor& minStartColor = video::SColor(255,0,0,0),
00169 const video::SColor& maxStartColor = video::SColor(255,255,255,255),
00170 u32 lifeTimeMin=2000, u32 lifeTimeMax=4000,
00171 s32 maxAngleDegrees=0) = 0;
00172
00174
00199 virtual IParticleCylinderEmitter* createCylinderEmitter(
00200 const core::vector3df& center, f32 radius,
00201 const core::vector3df& normal, f32 length,
00202 bool outlineOnly = false,
00203 const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f),
00204 u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
00205 const video::SColor& minStartColor = video::SColor(255,0,0,0),
00206 const video::SColor& maxStartColor = video::SColor(255,255,255,255),
00207 u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000,
00208 s32 maxAngleDegrees = 0 ) = 0;
00209
00211
00247 virtual IParticleMeshEmitter* createMeshEmitter(
00248 scene::IMesh* mesh, bool useNormalDirection = true,
00249 const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f),
00250 f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1,
00251 bool everyMeshVertex = false,
00252 u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
00253 const video::SColor& minStartColor = video::SColor(255,0,0,0),
00254 const video::SColor& maxStartColor = video::SColor(255,255,255,255),
00255 u32 lifeTimeMin = 2000, u32 lifeTimeMax = 4000,
00256 s32 maxAngleDegrees = 0 ) = 0;
00257
00259
00278 virtual IParticlePointEmitter* createPointEmitter(
00279 const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
00280 u32 minParticlesPerSecond = 5,
00281 u32 maxParticlesPerSecond = 10,
00282 const video::SColor& minStartColor = video::SColor(255,0,0,0),
00283 const video::SColor& maxStartColor = video::SColor(255,255,255,255),
00284 u32 lifeTimeMin=2000, u32 lifeTimeMax=4000,
00285 s32 maxAngleDegrees=0) = 0;
00286
00288
00312 virtual IParticleRingEmitter* createRingEmitter(
00313 const core::vector3df& center, f32 radius, f32 ringThickness,
00314 const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
00315 u32 minParticlesPerSecond = 5,
00316 u32 maxParticlesPerSecond = 10,
00317 const video::SColor& minStartColor = video::SColor(255,0,0,0),
00318 const video::SColor& maxStartColor = video::SColor(255,255,255,255),
00319 u32 lifeTimeMin=2000, u32 lifeTimeMax=4000,
00320 s32 maxAngleDegrees=0) = 0;
00321
00323
00344 virtual IParticleSphereEmitter* createSphereEmitter(
00345 const core::vector3df& center, f32 radius,
00346 const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
00347 u32 minParticlesPerSecond = 5,
00348 u32 maxParticlesPerSecond = 10,
00349 const video::SColor& minStartColor = video::SColor(255,0,0,0),
00350 const video::SColor& maxStartColor = video::SColor(255,255,255,255),
00351 u32 lifeTimeMin=2000, u32 lifeTimeMax=4000,
00352 s32 maxAngleDegrees=0) = 0;
00353
00355
00372 virtual IParticleAttractionAffector* createAttractionAffector(
00373 const core::vector3df& point, f32 speed = 1.0f, bool attract = true,
00374 bool affectX = true, bool affectY = true, bool affectZ = true) = 0;
00375
00377
00389 virtual IParticleFadeOutAffector* createFadeOutParticleAffector(
00390 const video::SColor& targetColor = video::SColor(0,0,0,0),
00391 u32 timeNeededToFadeOut = 1000) = 0;
00392
00394
00406 virtual IParticleGravityAffector* createGravityAffector(
00407 const core::vector3df& gravity = core::vector3df(0.0f,-0.03f,0.0f),
00408 u32 timeForceLost = 1000) = 0;
00409
00411
00419 virtual IParticleRotationAffector* createRotationAffector(
00420 const core::vector3df& speed = core::vector3df(5.0f,5.0f,5.0f),
00421 const core::vector3df& pivotPoint = core::vector3df(0.0f,0.0f,0.0f) ) = 0;
00422 };
00423
00424 }
00425 }
00426
00427
00428 #endif
00429