#include <OgreLinearForceAffector.h>
Inheritance diagram for Ogre::LinearForceAffector:
Public Types | |
enum | ForceApplication { FA_AVERAGE, FA_ADD } |
Choice of how to apply the force vector to particles. More... | |
Public Methods | |
LinearForceAffector () | |
Default constructor. | |
void | _affectParticles (ParticleSystem *pSystem, Real timeElapsed) |
See ParticleAffector. | |
void | setForceVector (const Vector3 &force) |
Sets the force vector to apply to the particles in a system. | |
Vector3 | getForceVector (void) const |
Gets the force vector to apply to the particles in a system. | |
void | setForceApplication (ForceApplication fa) |
Sets how the force vector is applied to a particle. | |
ForceApplication | getForceApplication (void) const |
Retrieves how the force vector is applied to a particle. | |
virtual void | _initParticle (Particle *pParticle) |
Method called to allow the affector to initialize all newly created particles in the system. | |
String | getType (void) const |
Returns the name of the type of affector. | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. | |
const ParamDictionary * | getParamDictionary (void) const |
const ParameterList & | getParameters (void) const |
Retrieves a list of parameters valid for this object. | |
virtual bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. | |
virtual String | getParameter (const String &name) const |
Generic parameter retrieval method. | |
virtual void | copyParametersTo (StringInterface *dest) const |
Method for copying this object's parameters to another object. | |
Static Public Attributes | |
CmdForceVector | msForceVectorCmd |
Command objects. | |
CmdForceApp | msForceAppCmd |
Protected Methods | |
void | addBaseParameters (void) |
Internal method for setting up the basic parameter definitions for a subclass. | |
bool | createParamDictionary (const String &className) |
Internal method for creating a parameter dictionary for the class, if it does not already exist. | |
Protected Attributes | |
Vector3 | mForceVector |
Force vector. | |
ForceApplication | mForceApplication |
How to apply force. | |
String | mType |
Name of the type of affector, MUST be initialised by subclasses. | |
String | mParamDictName |
Class name for this instance to be used as a lookup (must be initialised by subclasses). | |
Static Protected Attributes | |
ParamDictionaryMap | msDictionary |
Dictionary of parameters. |
The former approach is self-stabilising i.e. once a particle's momentum is equal to the force vector, no further change is made to it's momentum. It also results in a non-linear acceleration of particles. The latter approach is simpler and applies a constant acceleration to particles. However, it is not self-stabilising and can lead to perpetually increasing particle velocities. You choose the approach by calling the setForceApplication method.
Definition at line 48 of file OgreLinearForceAffector.h.
|
Choice of how to apply the force vector to particles.
Definition at line 67 of file OgreLinearForceAffector.h. |
|
Default constructor.
Definition at line 39 of file OgreLinearForceAffector.cpp. References Ogre::ParticleAffector::addBaseParameters(), Ogre::ParamDictionary::addParameter(), Ogre::StringInterface::createParamDictionary(), FA_ADD, Ogre::StringInterface::getParamDictionary(), mForceApplication, mForceVector, msForceAppCmd, msForceVectorCmd, Ogre::ParticleAffector::mType, Ogre::PT_UNSIGNED_INT, Ogre::PT_VECTOR3, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z. |
|
See ParticleAffector.
Implements Ogre::ParticleAffector. Definition at line 65 of file OgreLinearForceAffector.cpp. References Ogre::ParticleSystem::_getIterator(), Ogre::ParticleIterator::end(), FA_ADD, Ogre::ParticleIterator::getNext(), Ogre::Billboard::mDirection, mForceApplication, mForceVector, and Ogre::Real. |
|
Method called to allow the affector to initialize all newly created particles in the system.
Reimplemented in Ogre::ColourImageAffector, and Ogre::RotationAffector. Definition at line 81 of file OgreParticleAffector.h. |
|
Internal method for setting up the basic parameter definitions for a subclass.
Definition at line 68 of file OgreParticleAffector.h. Referenced by LinearForceAffector(). |
|
Method for copying this object's parameters to another object.
Definition at line 293 of file OgreStringInterface.h. References Ogre::ParamDictionary::mParamDefs, and Ogre::StringInterface::setParameter(). Referenced by Ogre::GuiElement::clone(), Ogre::GuiElement::copyFromTemplate(), Ogre::GuiContainer::copyFromTemplate(), and Ogre::ParticleSystem::operator=(). |
|
|
Retrieves how the force vector is applied to a particle.
Definition at line 109 of file OgreLinearForceAffector.cpp. References mForceApplication. |
|
Gets the force vector to apply to the particles in a system.
Definition at line 104 of file OgreLinearForceAffector.cpp. References mForceVector. Referenced by Ogre::LinearForceAffector::CmdForceVector::doGet(). |
|
Definition at line 206 of file OgreStringInterface.h. |
|
Retrieves the parameter dictionary for this class.
Definition at line 193 of file OgreStringInterface.h. Referenced by Ogre::TTYGuiElement::addBaseParameters(), Ogre::TextBoxGuiElement::addBaseParameters(), Ogre::TextAreaGuiElement::addBaseParameters(), Ogre::ScrollBarGuiElement::addBaseParameters(), Ogre::PopupMenuGuiElement::addBaseParameters(), Ogre::ParticleEmitter::addBaseParameters(), Ogre::PanelGuiElement::addBaseParameters(), Ogre::ListGuiElement::addBaseParameters(), Ogre::GuiElement::addBaseParameters(), Ogre::CursorGuiElement::addBaseParameters(), Ogre::ButtonGuiElement::addBaseParameters(), Ogre::BorderPanelGuiElement::addBaseParameters(), Ogre::BorderButtonGuiElement::addBaseParameters(), Ogre::ExternalTextureSource::addBaseParams(), Ogre::CgProgram::CgProgram(), Ogre::ColourFaderAffector::ColourFaderAffector(), Ogre::ColourFaderAffector2::ColourFaderAffector2(), Ogre::ColourImageAffector::ColourImageAffector(), Ogre::ColourInterpolatorAffector::ColourInterpolatorAffector(), Ogre::D3D9HLSLProgram::D3D9HLSLProgram(), Ogre::HollowEllipsoidEmitter::HollowEllipsoidEmitter(), Ogre::AreaEmitter::initDefaults(), Ogre::ParticleSystem::initParameters(), LinearForceAffector(), Ogre::RingEmitter::RingEmitter(), Ogre::RotationAffector::RotationAffector(), Ogre::ScaleAffector::ScaleAffector(), and Ogre::StringInterface::setParameter(). |
|
Generic parameter retrieval method.
Definition at line 262 of file OgreStringInterface.h. References Ogre::ParamCommand::doGet(), and Ogre::ParamDictionary::getParamCommand(). |
|
Retrieves a list of parameters valid for this object.
Definition at line 224 of file OgreStringInterface.h. References Ogre::ParamDictionary::getParameters(), and Ogre::ParameterList. |
|
Returns the name of the type of affector.
Definition at line 100 of file OgreParticleAffector.h. Referenced by Ogre::ParticleSystemManager::_destroyAffector(), Ogre::ParticleSystem::operator=(), and Ogre::ParticleSystemManager::parseAffectorAttrib(). |
|
Sets how the force vector is applied to a particle.
Definition at line 99 of file OgreLinearForceAffector.cpp. References mForceApplication. |
|
Sets the force vector to apply to the particles in a system.
Definition at line 94 of file OgreLinearForceAffector.cpp. References mForceVector. |
|
Generic parameter setting method.
Definition at line 33 of file OgreStringInterface.cpp. References Ogre::ParamCommand::doSet(), Ogre::ParamDictionary::getParamCommand(), and Ogre::StringInterface::getParamDictionary(). Referenced by Ogre::StringInterface::copyParametersTo(), Ogre::Profiler::createContainer(), Ogre::Profiler::createTextArea(), Ogre::MaterialSerializer::finishProgramDefinition(), Ogre::ParticleSystemManager::parseAffectorAttrib(), Ogre::ParticleSystemManager::parseAttrib(), Ogre::OverlayManager::parseElementAttrib(), and Ogre::ParticleSystemManager::parseEmitterAttrib(). |
|
How to apply force.
Definition at line 108 of file OgreLinearForceAffector.h. Referenced by _affectParticles(), getForceApplication(), LinearForceAffector(), and setForceApplication(). |
|
Force vector.
Definition at line 105 of file OgreLinearForceAffector.h. Referenced by _affectParticles(), getForceVector(), LinearForceAffector(), and setForceVector(). |
|
Class name for this instance to be used as a lookup (must be initialised by subclasses).
Definition at line 157 of file OgreStringInterface.h. |
|
Dictionary of parameters.
Definition at line 30 of file OgreStringInterface.cpp. |
|
Definition at line 35 of file OgreLinearForceAffector.cpp. Referenced by LinearForceAffector(). |
|
Command objects.
Definition at line 34 of file OgreLinearForceAffector.cpp. Referenced by LinearForceAffector(). |
|
Name of the type of affector, MUST be initialised by subclasses.
Definition at line 58 of file OgreParticleAffector.h. Referenced by Ogre::ColourFaderAffector::ColourFaderAffector(), Ogre::ColourFaderAffector2::ColourFaderAffector2(), Ogre::ColourImageAffector::ColourImageAffector(), Ogre::ColourInterpolatorAffector::ColourInterpolatorAffector(), LinearForceAffector(), Ogre::RotationAffector::RotationAffector(), and Ogre::ScaleAffector::ScaleAffector(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:24:30 2004