#include <ps_emitter.h>
Inheritance diagram for NL3D::CPSModulatedEmitter:
Definition at line 369 of file ps_emitter.h.
Public Member Functions | |
CPSModulatedEmitter () | |
ctor : the default doesn't alter speed | |
float | getEmitteeSpeed (void) const |
get the modulation speed (valid only if no scheme is used) | |
const CPSAttribMaker< float > * | getEmitteeSpeedScheme (void) const |
get the speed modulation shceme, or NULL if no one is set (const version) | |
CPSAttribMaker< float > * | getEmitteeSpeedScheme (void) |
get the speed modulation shceme, or NULL if no one is set | |
void | serialEmitteeSpeedScheme (NLMISC::IStream &f) throw (NLMISC::EStream) |
serialization | |
void | setEmitteeSpeed (float speed) |
set a constant speed modulation for emittee | |
void | setEmitteeSpeedScheme (CPSAttribMaker< float > *scheme) |
bool | useEmitteeSpeedScheme (void) const |
check wether a speed modulation scheme is being used | |
virtual | ~CPSModulatedEmitter () |
dtor | |
Protected Member Functions | |
void | deleteEmitteeSpeedElement (uint32 index) |
virtual CPSLocated * | getModulatedEmitterOwner (void)=0 |
void | newEmitteeSpeedElement (CPSLocated *emitter, uint32 emitterIndex) |
void | resizeEmitteeSpeed (uint32 capacity) |
Protected Attributes | |
float | _EmitteeSpeed |
CPSAttribMaker< float > * | _EmitteeSpeedScheme |
|
ctor : the default doesn't alter speed
Definition at line 374 of file ps_emitter.h. References _EmitteeSpeed, and _EmitteeSpeedScheme.
00374 : _EmitteeSpeed(1.f), _EmitteeSpeedScheme(NULL) 00375 { 00376 } |
|
dtor
Definition at line 379 of file ps_emitter.h. References _EmitteeSpeedScheme.
00380 { 00381 delete _EmitteeSpeedScheme; 00382 } |
|
Definition at line 429 of file ps_emitter.h. References _EmitteeSpeedScheme, NL3D::CPSAttribMaker< float >::deleteElement(), NL3D::CPSAttribMaker< float >::hasMemory(), index, and uint32. Referenced by NL3D::CPSSphericalEmitter::deleteElement(), NL3D::CPSEmitterRectangle::deleteElement(), NL3D::CPSEmitterDirectionnal::deleteElement(), and NL3D::CPSEmitterOmni::deleteElement().
00430 { 00431 if (_EmitteeSpeedScheme && _EmitteeSpeedScheme->hasMemory()) _EmitteeSpeedScheme->deleteElement(index); 00432 } |
|
get the modulation speed (valid only if no scheme is used)
Definition at line 405 of file ps_emitter.h. References _EmitteeSpeed.
00405 { return _EmitteeSpeed; } |
|
get the speed modulation shceme, or NULL if no one is set (const version)
Definition at line 411 of file ps_emitter.h. References _EmitteeSpeedScheme.
00411 { return _EmitteeSpeedScheme; } |
|
get the speed modulation shceme, or NULL if no one is set
Definition at line 408 of file ps_emitter.h. References _EmitteeSpeedScheme.
00408 { return _EmitteeSpeedScheme; } |
|
Implemented in NL3D::CPSEmitterDirectionnal, NL3D::CPSEmitterOmni, NL3D::CPSEmitterRectangle, and NL3D::CPSSphericalEmitter. Referenced by resizeEmitteeSpeed(), and setEmitteeSpeedScheme(). |
|
Definition at line 424 of file ps_emitter.h. References _EmitteeSpeedScheme, NL3D::CPSAttribMaker< float >::hasMemory(), NL3D::CPSAttribMaker< float >::newElement(), and uint32. Referenced by NL3D::CPSSphericalEmitter::newElement(), NL3D::CPSEmitterRectangle::newElement(), NL3D::CPSEmitterDirectionnal::newElement(), and NL3D::CPSEmitterOmni::newElement().
00425 { 00426 if (_EmitteeSpeedScheme && _EmitteeSpeedScheme->hasMemory()) _EmitteeSpeedScheme->newElement(emitter, emitterIndex); 00427 } |
|
Definition at line 434 of file ps_emitter.h. References _EmitteeSpeedScheme, getModulatedEmitterOwner(), NL3D::CPSAttribMaker< float >::hasMemory(), NL3D::CPSAttribMaker< float >::resize(), and uint32. Referenced by NL3D::CPSSphericalEmitter::resize(), NL3D::CPSEmitterRectangle::resize(), NL3D::CPSEmitterDirectionnal::resize(), and NL3D::CPSEmitterOmni::resize().
00435 { 00436 if (_EmitteeSpeedScheme && _EmitteeSpeedScheme->hasMemory()) _EmitteeSpeedScheme->resize(capacity, getModulatedEmitterOwner()->getSize()); 00437 } |
|
serialization
Definition at line 2180 of file ps_emitter.cpp.
02181 { 02182 bool useScheme; 02183 if (!f.isReading()) 02184 { 02185 useScheme = useEmitteeSpeedScheme(); 02186 } 02187 f.serial(useScheme); 02188 if (useScheme) 02189 { 02190 f.serialPolyPtr(_EmitteeSpeedScheme); 02191 } 02192 else 02193 { 02194 f.serial(_EmitteeSpeed); 02195 } 02196 } |
|
set a constant speed modulation for emittee
Definition at line 396 of file ps_emitter.h. References _EmitteeSpeed, and _EmitteeSpeedScheme.
00397 { 00398 delete _EmitteeSpeedScheme; 00399 _EmitteeSpeedScheme = NULL; 00400 _EmitteeSpeed = speed; 00401 00402 } |
|
Set a new scheme for speed modulation. It must have been allocated with new, and will be destriyed by this object Definition at line 387 of file ps_emitter.h. References _EmitteeSpeedScheme, getModulatedEmitterOwner(), and NL3D::CPSAttribMaker< T >::resize().
00388 { 00389 delete _EmitteeSpeedScheme; 00390 _EmitteeSpeedScheme = scheme; 00391 if (getModulatedEmitterOwner() && scheme->hasMemory()) 00392 scheme->resize(getModulatedEmitterOwner()->getMaxSize(), getModulatedEmitterOwner()->getSize()); 00393 } |
|
check wether a speed modulation scheme is being used
Definition at line 414 of file ps_emitter.h. References _EmitteeSpeedScheme.
00414 { return _EmitteeSpeedScheme != NULL; } |
|
Definition at line 440 of file ps_emitter.h. Referenced by CPSModulatedEmitter(), getEmitteeSpeed(), and setEmitteeSpeed(). |
|
Definition at line 441 of file ps_emitter.h. Referenced by CPSModulatedEmitter(), deleteEmitteeSpeedElement(), getEmitteeSpeedScheme(), newEmitteeSpeedElement(), resizeEmitteeSpeed(), setEmitteeSpeed(), setEmitteeSpeedScheme(), useEmitteeSpeedScheme(), and ~CPSModulatedEmitter(). |