40 #ifndef _graphicsparticlesystemproxy_cpp
41 #define _graphicsparticlesystemproxy_cpp
47 #include "Graphics/particleaffector.h"
48 #include "Graphics/particleemitter.h"
49 #include "Graphics/scenemanager.h"
51 #include "exception.h"
53 #include "stringtool.h"
63 GraphicsParticleSystem(NULL),
70 GraphicsParticleSystem(NULL),
88 for(
UInt16 X = 0 ; X < NumEmitters ; ++X )
91 this->
Emitters.push_back(NewEmitter);
95 for(
UInt16 X = 0 ; X < NumAffectors ; ++X )
116 static UInt32 NameCounter = 0;
118 NameStream <<
"ParticleSystem" << ++NameCounter;
119 return NameStream.str();
127 return PT_Graphics_ParticleSystemProxy;
142 if( this->
Paused != Pause ) {
168 {
return this->
Emitters.at(Index); }
177 delete ToBeDestroyed;
204 delete ToBeDestroyed;
294 for(
UInt16 Index = 0 ; Index < NumEmitters ; ++Index )
317 for(
UInt16 Index = 0 ; Index < NumAffectors ; ++Index )
351 Boolean WasInWorld =
false;
353 if( !InWorldAttrib.
Empty() ) {
374 if( !ConstructionParamNode.
Empty() ) {
378 CurrAttrib = ConstructionParamNode.
GetAttribute(
"TemplateName");
379 if( !CurrAttrib.
Empty() )
380 TemplateName = CurrAttrib.
AsString();
382 if( !TemplateName.empty() ) {
396 if( !CustomParametersNode.
Empty() ) {
398 String ParamName, ParamValue;
402 if( !(*ParamIt).Empty() ) {
403 if((*ParamIt).GetAttribute(
"Version").AsInt() == 1) {
404 CurrAttrib = (*ParamIt).GetAttribute(
"ParamName");
405 if( !CurrAttrib.
Empty() )
408 CurrAttrib = (*ParamIt).GetAttribute(
"ParamValue");
409 if( !CurrAttrib.
Empty() )
412 if( !ParamName.empty() && !ParamValue.empty() ) {
433 if( !EmittersNode.
Empty() ) {
439 CurrAttrib = (*EmitIt).GetAttribute(
"Index");
440 if( !CurrAttrib.
Empty() ) {
460 if( !AffectorsNode.
Empty() ) {
466 CurrAttrib = (*AffectIt).GetAttribute(
"Index");
467 if( !CurrAttrib.
Empty() ) {
487 if( !PropertiesNode.
Empty() ) {
490 if( !CurrAttrib.
Empty() )
493 CurrAttrib = PropertiesNode.
GetAttribute(
"SpeedFactor");
494 if( !CurrAttrib.
Empty() )
508 {
return "ParticleSystemProxy"; }