![]() |
OGRE-Next
4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
This plugin subclass of ParticleAffector allows you to alter the scale of particles. More...
#include <OgreScaleAffector2.h>
Public Member Functions | |
ScaleAffector2 () | |
void | _cloneFrom (const ParticleAffector2 *original) override |
Real | getAdjust () const |
Gets the scale adjustment to be made per second to particles. More... | |
bool | getMultiplyMode () const |
Gets the multiply mode. More... | |
String | getType () const override |
Returns the name of the type of affector. More... | |
void | run (ParticleCpuData cpuData, size_t numParticles, ArrayReal timeSinceLast) const override |
void | setAdjust (Real rate) |
Sets the scale adjustment to be made per second to particles. More... | |
void | setMultiplyMode (bool bMultiplyMode) |
Sets the multiply mode. More... | |
![]() | |
virtual void | initEmittedParticles (ParticleCpuData, const EmittedParticle *, size_t) const |
Initializes particles Can be called by multiple threads. More... | |
virtual bool | needsInitialization () const |
Returns true if initEmittedParticles() must be called on a particle that has been emitted. More... | |
virtual void | oneTimeInit () |
virtual bool | wantsRotation () const |
Returns true if ParticleSystemDef should default to something else other than ParticleRotationType::None. More... | |
![]() | |
StringInterface () | |
virtual | ~StringInterface () |
Virtual destructor, see Effective C++. More... | |
virtual void | copyParametersTo (StringInterface *dest) const |
Method for copying this object's parameters to another object. More... | |
ParamDictionary * | getParamDictionary () |
Retrieves the parameter dictionary for this class. More... | |
const ParamDictionary * | getParamDictionary () const |
virtual String | getParameter (const String &name) const |
Generic parameter retrieval method. More... | |
const ParameterList & | getParameters () const |
Retrieves a list of parameters valid for this object. More... | |
virtual bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. More... | |
virtual void | setParameterList (const NameValuePairList ¶mList) |
Generic multiple parameter setting method. More... | |
Additional Inherited Members | |
![]() | |
static void | cleanupDictionary () |
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. More... | |
This plugin subclass of ParticleAffector allows you to alter the scale of particles.
Ogre::ScaleAffector2::ScaleAffector2 | ( | ) |
|
overridevirtual |
Implements Ogre::ParticleAffector2.
Real Ogre::ScaleAffector2::getAdjust | ( | ) | const |
Gets the scale adjustment to be made per second to particles.
bool Ogre::ScaleAffector2::getMultiplyMode | ( | ) | const |
Gets the multiply mode.
|
overridevirtual |
Returns the name of the type of affector.
Implements Ogre::ParticleAffector2.
|
overridevirtual |
Implements Ogre::ParticleAffector2.
void Ogre::ScaleAffector2::setAdjust | ( | Real | rate | ) |
Sets the scale adjustment to be made per second to particles.
rate | Sets the adjustment to be made to the x and y scale components per second. These values will be added to the scale of all particles every second, scaled over each frame for a smooth adjustment. |
void Ogre::ScaleAffector2::setMultiplyMode | ( | bool | bMultiplyMode | ) |
Sets the multiply mode.
bMultiplyMode | When false (default), we do scale += factor * time . When true, we do scale *= pow( factor, time ) . |
False it "slows" down as the particle gets bigger. Shrinking particles is also problematic. True provides a consistent growth over time. Shrinking particles is easy.