OgreParticleSystem.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __ParticleSystem_H__
29 #define __ParticleSystem_H__
30 
31 #include "OgrePrerequisites.h"
32 
33 #include "OgreVector3.h"
34 #include "OgreString.h"
35 #include "OgreParticleIterator.h"
36 #include "OgreStringInterface.h"
37 #include "OgreMovableObject.h"
38 #include "OgreRadixSort.h"
39 #include "OgreController.h"
41 #include "OgreHeaderPrefix.h"
42 
43 
44 namespace Ogre {
45 
68  {
69  public:
70 
73  {
74  public:
75  String doGet(const void* target) const;
76  void doSet(void* target, const String& val);
77  };
80  {
81  public:
82  String doGet(const void* target) const;
83  void doSet(void* target, const String& val);
84  };
87  {
88  public:
89  String doGet(const void* target) const;
90  void doSet(void* target, const String& val);
91  };
94  {
95  public:
96  String doGet(const void* target) const;
97  void doSet(void* target, const String& val);
98  };
101  {
102  public:
103  String doGet(const void* target) const;
104  void doSet(void* target, const String& val);
105  };
108  {
109  public:
110  String doGet(const void* target) const;
111  void doSet(void* target, const String& val);
112  };
115  {
116  public:
117  String doGet(const void* target) const;
118  void doSet(void* target, const String& val);
119  };
121  class CmdSorted : public ParamCommand
122  {
123  public:
124  String doGet(const void* target) const;
125  void doSet(void* target, const String& val);
126  };
129  {
130  public:
131  String doGet(const void* target) const;
132  void doSet(void* target, const String& val);
133  };
136  {
137  public:
138  String doGet(const void* target) const;
139  void doSet(void* target, const String& val);
140  };
143  {
144  public:
145  String doGet(const void* target) const;
146  void doSet(void* target, const String& val);
147  };
148 
156  ParticleSystem(const String& name, const String& resourceGroupName);
157 
158  virtual ~ParticleSystem();
159 
169  void setRenderer(const String& typeName);
170 
174  const String& getRendererName(void) const;
175 
185  ParticleEmitter* addEmitter(const String& emitterType);
186 
196  ParticleEmitter* getEmitter(unsigned short index) const;
197 
199  unsigned short getNumEmitters(void) const;
200 
209  void removeEmitter(unsigned short index);
210 
212  void removeAllEmitters(void);
213 
214 
224  ParticleAffector* addAffector(const String& affectorType);
225 
235  ParticleAffector* getAffector(unsigned short index) const;
236 
238  unsigned short getNumAffectors(void) const;
239 
248  void removeAffector(unsigned short index);
249 
251  void removeAllAffectors(void);
252 
255  void clear();
256 
264  size_t getNumParticles(void) const;
265 
278 
288  Particle* createEmitterParticle(const String& emitterName);
289 
296  Particle* getParticle(size_t index);
297 
302  size_t getParticleQuota(void) const;
303 
315  void setParticleQuota(size_t quota);
316 
321  size_t getEmittedEmitterQuota(void) const;
322 
328  void setEmittedEmitterQuota(size_t quota);
329 
336 
343  void _update(Real timeElapsed);
344 
352 
358 
362  virtual const String& getMaterialName(void) const;
363 
368  virtual void _notifyCurrentCamera(Camera* cam);
369 
374  void _notifyAttached(Node* parent, bool isTagPoint = false);
375 
380  virtual const AxisAlignedBox& getBoundingBox(void) const { return mAABB; }
381 
386  virtual Real getBoundingRadius(void) const { return mBoundingRadius; }
387 
392  virtual void _updateRenderQueue(RenderQueue* queue);
393 
396  bool debugRenderables = false);
397 
410  void fastForward(Real time, Real interval = 0.1);
411 
420  void setSpeedFactor(Real speedFactor) { mSpeedFactor = speedFactor; }
421 
424  Real getSpeedFactor(void) const { return mSpeedFactor; }
425 
441  void setIterationInterval(Real iterationInterval);
442 
445  Real getIterationInterval(void) const { return mIterationInterval; }
446 
449  static void setDefaultIterationInterval(Real iterationInterval) { msDefaultIterationInterval = iterationInterval; }
450 
453  static Real getDefaultIterationInterval(void) { return msDefaultIterationInterval; }
454 
473  Real getNonVisibleUpdateTimeout(void) const { return mNonvisibleTimeout; }
474 
478  { msDefaultNonvisibleTimeout = timeout; }
479 
482  static Real getDefaultNonVisibleUpdateTimeout(void) { return msDefaultNonvisibleTimeout; }
483 
485  const String& getMovableType(void) const;
486 
489  virtual void _notifyParticleResized(void);
490 
493  virtual void _notifyParticleRotated(void);
494 
505  virtual void setDefaultDimensions(Real width, Real height);
506 
508  virtual void setDefaultWidth(Real width);
510  virtual Real getDefaultWidth(void) const;
512  virtual void setDefaultHeight(Real height);
514  virtual Real getDefaultHeight(void) const;
516  virtual bool getCullIndividually(void) const;
537  virtual void setCullIndividually(bool cullIndividual);
539  virtual const String& getResourceGroupName(void) const { return mResourceGroupName; }
546  const String& getOrigin(void) const { return mOrigin; }
548  void _notifyOrigin(const String& origin) { mOrigin = origin; }
549 
551  void setRenderQueueGroup(uint8 queueID);
553  void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority);
554 
561  void setSortingEnabled(bool enabled) { mSorted = enabled; }
563  bool getSortingEnabled(void) const { return mSorted; }
564 
574  void setBounds(const AxisAlignedBox& aabb);
575 
592  void setBoundsAutoUpdated(bool autoUpdate, Real stopIn = 0.0f);
593 
603  void setKeepParticlesInLocalSpace(bool keepLocal);
604 
608  bool getKeepParticlesInLocalSpace(void) const { return mLocalSpace; }
609 
623  void _updateBounds(void);
624 
634  void setEmitting(bool v);
635 
641  bool getEmitting() const;
642 
644  uint32 getTypeFlags(void) const;
645  protected:
646 
659 
660 
666 
669 
689  bool mSorted;
699  unsigned long mLastVisibleFrame;
706 
710 
713  {
716 
718  float operator()(Particle* p) const;
719  };
720 
723  {
726 
728  float operator()(Particle* p) const;
729  };
730 
732 
743 
754 
760 
766 
776 
782 
789 
792 
797 
800 
803 
806 
808  size_t mPoolSize;
809 
812 
815 
820 
822  void _expire(Real timeElapsed);
823 
825  void _triggerEmitters(Real timeElapsed);
826 
829  void _executeTriggerEmitters(ParticleEmitter* emitter, unsigned requested, Real timeElapsed);
830 
832  void _applyMotion(Real timeElapsed);
833 
835  void _triggerAffectors(Real timeElapsed);
836 
838  void _sortParticles(Camera* cam);
839 
841  void increasePool(size_t size);
842 
850  void increaseEmittedEmitterPool(size_t size);
851 
853  void initParameters(void);
854 
856  void configureRenderer(void);
857 
859  void createVisualParticles(size_t poolstart, size_t poolend);
861  void destroyVisualParticles(size_t poolstart, size_t poolend);
862 
869 
874 
877 
880 
885 
892 
898 
908  };
912 }
913 
914 #include "OgreHeaderSuffix.h"
915 
916 #endif
Ogre::ParticleSystem::CmdCull::doGet
String doGet(const void *target) const
OgreHeaderSuffix.h
Ogre::ParticleSystem::CmdHeight::doSet
void doSet(void *target, const String &val)
Ogre::ParticleSystem::getTypeFlags
uint32 getTypeFlags(void) const
Override to return specific type flag.
Ogre::ParticleSystem::SortByDirectionFunctor
Sort by direction functor.
Definition: OgreParticleSystem.h:713
Ogre::ParticleSystem::ParticleEmitterList
vector< ParticleEmitter * >::type ParticleEmitterList
Definition: OgreParticleSystem.h:790
Ogre::ParticleSystem::initialiseEmittedEmitters
void initialiseEmittedEmitters(void)
Create a pool of emitted emitters and assign them to the free emitter list.
Ogre::ParticleSystem::mNonvisibleTimeoutSet
bool mNonvisibleTimeoutSet
Update timeout when nonvisible set? Otherwise track default.
Definition: OgreParticleSystem.h:695
Ogre::ParticleSystem::mEmittedEmitterPoolSize
size_t mEmittedEmitterPoolSize
The number of emitted emitters in the pool.
Definition: OgreParticleSystem.h:811
Ogre::ParticleSystem::mDefaultHeight
Real mDefaultHeight
Default height of each particle.
Definition: OgreParticleSystem.h:681
Ogre::ParticleSystem::CmdQuota::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::configureRenderer
void configureRenderer(void)
Internal method to configure the renderer.
Ogre::ParticleSystem::mTimeSinceLastVisible
Real mTimeSinceLastVisible
Amount of time non-visible so far.
Definition: OgreParticleSystem.h:697
Ogre::ParticleSystem::mSorted
bool mSorted
Particles sorted according to camera?
Definition: OgreParticleSystem.h:689
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::ParticleSystem::CmdHeight::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::getSortingEnabled
bool getSortingEnabled(void) const
Gets whether particles are sorted relative to the camera.
Definition: OgreParticleSystem.h:563
Ogre::ParticleSystem::msEmittedEmitterQuotaCmd
static CmdEmittedEmitterQuota msEmittedEmitterQuotaCmd
Definition: OgreParticleSystem.h:652
Ogre::ParticleSystem::SortByDirectionFunctor::SortByDirectionFunctor
SortByDirectionFunctor(const Vector3 &dir)
Ogre::ParticleSystem::mLastVisibleFrame
unsigned long mLastVisibleFrame
Last frame in which known to be visible.
Definition: OgreParticleSystem.h:699
Ogre::ParticleSystem::mDefaultWidth
Real mDefaultWidth
Default width of each particle.
Definition: OgreParticleSystem.h:679
Ogre::ParticleSystem::getBoundingRadius
virtual Real getBoundingRadius(void) const
Overridden from MovableObject.
Definition: OgreParticleSystem.h:386
Ogre::map
Definition: OgrePrerequisites.h:534
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:87
Ogre::ParticleSystem::msHeightCmd
static CmdHeight msHeightCmd
Definition: OgreParticleSystem.h:649
Ogre::ParticleSystem::getKeepParticlesInLocalSpace
bool getKeepParticlesInLocalSpace(void) const
Gets whether particles (and any affector effects) remain relative to the node the particle system is ...
Definition: OgreParticleSystem.h:608
Ogre::ParticleSystem::_executeTriggerEmitters
void _executeTriggerEmitters(ParticleEmitter *emitter, unsigned requested, Real timeElapsed)
Helper function that actually performs the emission of particles.
Ogre::ParticleSystem::createParticle
Particle * createParticle(void)
Manually add a particle to the system.
Ogre::ParticleSystem::msWidthCmd
static CmdWidth msWidthCmd
Definition: OgreParticleSystem.h:653
Ogre::ParticleSystem::CmdRenderer
Command object for renderer (see ParamCommand).
Definition: OgreParticleSystem.h:115
Ogre::ParticleSystem::CmdLocalSpace::doSet
void doSet(void *target, const String &val)
Ogre::ParticleSystem::mSpeedFactor
Real mSpeedFactor
Speed factor.
Definition: OgreParticleSystem.h:683
Ogre::ParticleSystem::CmdLocalSpace
Command object for local space (see ParamCommand).
Definition: OgreParticleSystem.h:129
Ogre::ParticleSystem::SortByDistanceFunctor::SortByDistanceFunctor
SortByDistanceFunctor(const Vector3 &pos)
Ogre::ParticleSystem::_notifyParticleRotated
virtual void _notifyParticleRotated(void)
Internal callback used by Particles to notify their parent that they have been rotated.
Ogre::ParticleSystem::findFreeEmittedEmitter
FreeEmittedEmitterList * findFreeEmittedEmitter(const String &name)
Find the list with free emitted emitters.
Ogre::ParticleSystem::increaseEmittedEmitterPool
void increaseEmittedEmitterPool(size_t size)
Resize the internal pool of emitted emitters.
Ogre::ParticleSystemRenderer
Abstract class defining the interface required to be implemented by classes which provide rendering c...
Definition: OgreParticleSystemRenderer.h:50
Ogre::ParticleSystem::setSpeedFactor
void setSpeedFactor(Real speedFactor)
Sets a 'speed factor' on this particle system, which means it scales the elapsed real time which has ...
Definition: OgreParticleSystem.h:420
Ogre::ParticleSystem::mUpdateRemainTime
Real mUpdateRemainTime
Definition: OgreParticleSystem.h:665
Ogre::ParticleSystem::msNonvisibleTimeoutCmd
static CmdNonvisibleTimeout msNonvisibleTimeoutCmd
Definition: OgreParticleSystem.h:658
Ogre::ParticleSystem::getCullIndividually
virtual bool getCullIndividually(void) const
Returns whether or not particles in this are tested individually for culling.
Ogre::ParticleSystem::setDefaultNonVisibleUpdateTimeout
static void setDefaultNonVisibleUpdateTimeout(Real timeout)
Set the default nonvisible timeout for all ParticleSystem instances.
Definition: OgreParticleSystem.h:477
Ogre::ParticleSystem::addAffector
ParticleAffector * addAffector(const String &affectorType)
Adds an affector to this particle system.
Ogre::ParticleSystem::~ParticleSystem
virtual ~ParticleSystem()
Ogre::ParticleSystem::operator=
ParticleSystem & operator=(const ParticleSystem &rhs)
Assignment operator for copying.
Ogre::ParticleSystem::getResourceGroupName
virtual const String & getResourceGroupName(void) const
Return the resource group to be used to load dependent resources.
Definition: OgreParticleSystem.h:539
Ogre::ParticleSystem::msCullCmd
static CmdCull msCullCmd
Command objects.
Definition: OgreParticleSystem.h:648
Ogre::MovableObject
Abstract class defining a movable object in a scene.
Definition: OgreMovableObject.h:61
Ogre::ParticleSystem::CmdSorted::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::_triggerEmitters
void _triggerEmitters(Real timeElapsed)
Spawn new particles based on free quota and emitter requirements.
Ogre::ParticleSystem::getNumEmitters
unsigned short getNumEmitters(void) const
Returns the number of emitters for this particle system.
Ogre::ParticleSystem::setDefaultHeight
virtual void setDefaultHeight(Real height)
See setDefaultDimensions - this sets 1 component individually.
Ogre::ParticleSystem::_update
void _update(Real timeElapsed)
Updates the particles in the system based on time elapsed.
Ogre::ParticleSystem::getRendererName
const String & getRendererName(void) const
Gets the name of the ParticleRenderer to be used to render this particle system.
Ogre::ParticleSystem::getDefaultIterationInterval
static Real getDefaultIterationInterval(void)
Get the default iteration interval for all ParticleSystem instances.
Definition: OgreParticleSystem.h:453
Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Definition: OgreResourceGroupManager.h:270
Ogre::ParticleSystem::setKeepParticlesInLocalSpace
void setKeepParticlesInLocalSpace(bool keepLocal)
Sets whether particles (and any affector effects) remain relative to the node the particle system is ...
Ogre::ParticleSystem::mWorldAABB
AxisAlignedBox mWorldAABB
World AABB, only used to compare world-space positions to calc bounds.
Definition: OgreParticleSystem.h:668
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::ParticleSystem::msQuotaCmd
static CmdQuota msQuotaCmd
Definition: OgreParticleSystem.h:651
Ogre::ParticleSystem::CmdNonvisibleTimeout::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::FreeEmittedEmitterList
list< ParticleEmitter * >::type FreeEmittedEmitterList
Definition: OgreParticleSystem.h:761
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::ParticleSystem::mFreeEmittedEmitters
FreeEmittedEmitterMap mFreeEmittedEmitters
Free emitted emitter list.
Definition: OgreParticleSystem.h:781
OgreResourceGroupManager.h
Ogre::ParticleIterator
Convenience class to make it easy to step through all particles in a ParticleSystem.
Definition: OgreParticleIterator.h:46
Ogre::ParticleSystem::removeAffector
void removeAffector(unsigned short index)
Removes an affector from the system.
Ogre::ParticleSystem::getDefaultWidth
virtual Real getDefaultWidth(void) const
See setDefaultDimensions - this gets 1 component individually.
Ogre::ParticleSystem::getNumAffectors
unsigned short getNumAffectors(void) const
Returns the number of affectors for this particle system.
Ogre::ParticleSystem::mFreeParticles
FreeParticleList mFreeParticles
Free particle queue.
Definition: OgreParticleSystem.h:753
Ogre::ParticleSystem::setIterationInterval
void setIterationInterval(Real iterationInterval)
Sets a 'iteration interval' on this particle system.
Ogre::ParticleSystem::getParticleQuota
size_t getParticleQuota(void) const
Returns the maximum number of particles this system is allowed to have active at once.
Ogre::ParamCommand
Abstract class which is command object which gets/sets parameters.
Definition: OgreStringInterface.h:80
Ogre::ParticleSystem::ParticleAffectorList
vector< ParticleAffector * >::type ParticleAffectorList
Definition: OgreParticleSystem.h:791
Ogre::ParticleSystem::setBounds
void setBounds(const AxisAlignedBox &aabb)
Set the (initial) bounds of the particle system manually.
Ogre::ParticleSystem::setEmittedEmitterQuota
void setEmittedEmitterQuota(size_t quota)
Sets the maximum number of emitted emitters this system is allowed to have active at once.
Ogre::ParticleSystem::CmdMaterial
Command object for material (see ParamCommand).
Definition: OgreParticleSystem.h:87
Ogre::ParticleSystem::setRenderer
void setRenderer(const String &typeName)
Sets the ParticleRenderer to be used to render this particle system.
Ogre::ParticleSystem::addActiveEmittedEmittersToFreeList
void addActiveEmittedEmittersToFreeList(void)
Moves all emitted emitters from the active list to the free list.
Ogre::Controller< Real >
OgreStringInterface.h
Ogre::ParticleSystem::increasePool
void increasePool(size_t size)
Resize the internal pool of particles.
OgreHeaderPrefix.h
Ogre::list
Definition: OgrePrerequisites.h:506
Ogre::ParticleSystem::CmdMaterial::doSet
void doSet(void *target, const String &val)
Ogre::ParticleSystem::mRenderer
ParticleSystemRenderer * mRenderer
The renderer used to render this particle system.
Definition: OgreParticleSystem.h:799
Ogre::ParticleSystem::CmdRenderer::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::CmdMaterial::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::createEmitterParticle
Particle * createEmitterParticle(const String &emitterName)
Manually add an emitter particle to the system.
OgrePrerequisites.h
Ogre::ParticleSystem::_getIterator
ParticleIterator _getIterator(void)
Returns an iterator for stepping through all particles in this system.
Ogre::ParticleSystem::CmdCull
Command object for cull_each (see ParamCommand).
Definition: OgreParticleSystem.h:94
Ogre::ParticleSystem::mMaterialName
String mMaterialName
Name of the material to use.
Definition: OgreParticleSystem.h:673
Ogre::ParticleSystem::CmdEmittedEmitterQuota
Command object for emittedEmitterQuota (see ParamCommand).
Definition: OgreParticleSystem.h:80
Ogre::ParticleSystem::FreeEmittedEmitterMap
map< String, FreeEmittedEmitterList >::type FreeEmittedEmitterMap
Definition: OgreParticleSystem.h:764
Ogre::ParticleSystem::setRenderQueueGroupAndPriority
void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority)
Sets the render queue group and group priority this entity will be rendered through.
Ogre::ParticleSystem::FreeParticleList
list< Particle * >::type FreeParticleList
Definition: OgreParticleSystem.h:708
Ogre::ParticleSystem::initialiseEmittedEmitterPool
void initialiseEmittedEmitterPool(void)
Determine which emitters in the Particle Systems main emitter become a template for creating an pool ...
Ogre::ParticleSystem::getDefaultNonVisibleUpdateTimeout
static Real getDefaultNonVisibleUpdateTimeout(void)
Get the default nonvisible timeout for all ParticleSystem instances.
Definition: OgreParticleSystem.h:482
Ogre::ParticleSystem::mIsEmitting
bool mIsEmitting
Used to control if the particle system should emit particles or not.
Definition: OgreParticleSystem.h:705
Ogre::ParticleSystem::mEmittedEmitterPoolInitialised
bool mEmittedEmitterPoolInitialised
Indication whether the emitted emitter pool (= pool with particle emitters that are emitted) is initi...
Definition: OgreParticleSystem.h:703
Ogre::ParticleSystem::mBoundsUpdateTime
Real mBoundsUpdateTime
Definition: OgreParticleSystem.h:664
Ogre::ParticleSystem::getEmitter
ParticleEmitter * getEmitter(unsigned short index) const
Retrieves an emitter by it's index (zero-based).
Ogre::ParticleSystem::getNonVisibleUpdateTimeout
Real getNonVisibleUpdateTimeout(void) const
Gets when the particle system should stop updating after it hasn't been visible for a while.
Definition: OgreParticleSystem.h:473
Ogre::ParticleSystem::mActiveEmittedEmitters
ActiveEmittedEmitterList mActiveEmittedEmitters
Active emitted emitter list.
Definition: OgreParticleSystem.h:788
Ogre::ParticleSystem::getEmittedEmitterQuota
size_t getEmittedEmitterQuota(void) const
Returns the maximum number of emitted emitters this system is allowed to have active at once.
Ogre::ParticleSystem::mEmittedEmitterPool
EmittedEmitterPool mEmittedEmitterPool
Pool of emitted emitters for use and reuse in the active emitted emitter list.
Definition: OgreParticleSystem.h:775
Ogre::ParticleSystem::msSortedCmd
static CmdSorted msSortedCmd
Definition: OgreParticleSystem.h:655
Ogre::ParticleSystem::SortByDirectionFunctor::operator()
float operator()(Particle *p) const
Ogre::ParticleSystem::getBoundingBox
virtual const AxisAlignedBox & getBoundingBox(void) const
Overridden from MovableObject.
Definition: OgreParticleSystem.h:380
Ogre::ParticleSystem::fastForward
void fastForward(Real time, Real interval=0.1)
Fast-forwards this system by the required number of seconds.
Ogre::ParticleSystem::_updateRenderQueue
virtual void _updateRenderQueue(RenderQueue *queue)
Overridden from MovableObject.
Ogre::ParticleSystem::_applyMotion
void _applyMotion(Real timeElapsed)
Updates existing particle based on their momentum.
Ogre::ParticleSystem::CmdWidth::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::SortByDirectionFunctor::sortDir
Vector3 sortDir
Direction to sort in.
Definition: OgreParticleSystem.h:715
Ogre::ParticleSystem::createVisualParticles
void createVisualParticles(size_t poolstart, size_t poolend)
Internal method for creating ParticleVisualData instances for the pool.
Ogre::ParticleSystem::setSortingEnabled
void setSortingEnabled(bool enabled)
Set whether or not particles are sorted according to the camera.
Definition: OgreParticleSystem.h:561
Ogre::ParticleSystem::getMaterialName
virtual const String & getMaterialName(void) const
Sets the name of the material to be used for this billboard set.
Ogre::ParticleSystem::getIterationInterval
Real getIterationInterval(void) const
Gets a 'iteration interval' on this particle system.
Definition: OgreParticleSystem.h:445
Ogre::ParticleSystem::msDefaultIterationInterval
static Real msDefaultIterationInterval
Default iteration interval.
Definition: OgreParticleSystem.h:817
Ogre::ParticleSystem::msIterationIntervalCmd
static CmdIterationInterval msIterationIntervalCmd
Definition: OgreParticleSystem.h:657
Ogre::ParticleSystem::_notifyReorganiseEmittedEmitterData
void _notifyReorganiseEmittedEmitterData(void)
This function clears all data structures that are used in combination with emitted emitters and sets ...
Ogre::ParticleSystem::mAABB
AxisAlignedBox mAABB
Definition: OgreParticleSystem.h:661
Ogre::ParticleSystem::ActiveEmittedEmitterList
list< ParticleEmitter * >::type ActiveEmittedEmitterList
Definition: OgreParticleSystem.h:762
OgreController.h
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:55
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::ParticleSystem::CmdWidth
Command object for particle_width (see ParamCommand).
Definition: OgreParticleSystem.h:101
Ogre::ParticleSystem::msDefaultNonvisibleTimeout
static Real msDefaultNonvisibleTimeout
Default nonvisible update timeout.
Definition: OgreParticleSystem.h:819
Ogre::ParticleSystem::clear
void clear()
Empties this set of all particles.
Ogre::ParticleSystem::mNonvisibleTimeout
Real mNonvisibleTimeout
Update timeout when nonvisible (0 for no timeout)
Definition: OgreParticleSystem.h:693
Ogre::ParticleSystem::getDefaultHeight
virtual Real getDefaultHeight(void) const
See setDefaultDimensions - this gets 1 component individually.
Ogre::ParticleSystem::setMaterialName
virtual void setMaterialName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Sets the name of the material to be used for this billboard set.
Ogre::ParticleSystem::setParticleQuota
void setParticleQuota(size_t quota)
Sets the maximum number of particles this system is allowed to have active at once.
Ogre::ParticleSystem::ActiveParticleList
list< Particle * >::type ActiveParticleList
Definition: OgreParticleSystem.h:707
Ogre::Particle
Class representing a single particle instance.
Definition: OgreParticle.h:62
Ogre::ParticleSystem::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Ogre::ParticleSystem::getAffector
ParticleAffector * getAffector(unsigned short index) const
Retrieves an affector by it's index (zero-based).
Ogre::ParticleSystem::removeAllEmittedEmitters
void removeAllEmittedEmitters(void)
Removes all emitted emitters from this system.
Ogre::ParticleEmitter
Abstract class defining the interface to be implemented by particle emitters.
Definition: OgreParticleEmitter.h:73
Ogre::StringInterface
Class defining the common interface which classes can use to present a reflection-style,...
Definition: OgreStringInterface.h:164
Ogre::ParticleSystem::_notifyCurrentCamera
virtual void _notifyCurrentCamera(Camera *cam)
Overridden from MovableObject.
Ogre::ParticleSystem::setDefaultIterationInterval
static void setDefaultIterationInterval(Real iterationInterval)
Set the default iteration interval for all ParticleSystem instances.
Definition: OgreParticleSystem.h:449
Ogre::ParticleSystem::CmdWidth::doSet
void doSet(void *target, const String &val)
Ogre::SharedPtr< Material >
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::ParticleSystem::removeEmitter
void removeEmitter(unsigned short index)
Removes an emitter from the system.
Ogre::ParticleSystem::CmdQuota
Command object for quota (see ParamCommand).
Definition: OgreParticleSystem.h:73
OgreMovableObject.h
Ogre::ParticleSystem::mRendererType
String mRendererType
The name of the type of renderer used to render this system.
Definition: OgreParticleSystem.h:805
Ogre::ParticleSystem::setNonVisibleUpdateTimeout
void setNonVisibleUpdateTimeout(Real timeout)
Sets when the particle system should stop updating after it hasn't been visible for a while.
Ogre::ParticleSystem::_notifyAttached
void _notifyAttached(Node *parent, bool isTagPoint=false)
Overridden from MovableObject.
Ogre::ParticleSystem::mParticlePool
ParticlePool mParticlePool
Pool of particle instances for use and reuse in the active particle list.
Definition: OgreParticleSystem.h:759
OgreRadixSort.h
Ogre::ParticleSystem::mCullIndividual
bool mCullIndividual
Do we cull each particle individually?
Definition: OgreParticleSystem.h:802
Ogre::ParticleSystem::getRenderer
ParticleSystemRenderer * getRenderer(void) const
Gets the ParticleRenderer to be used to render this particle system.
Ogre::ParticleSystem::removeFromActiveEmittedEmitters
void removeFromActiveEmittedEmitters(ParticleEmitter *emitter)
Removes an emitter from the active emitted emitter list.
Ogre::ParticleSystem::mAffectors
ParticleAffectorList mAffectors
List of particle affectors, ie modifiers of particles.
Definition: OgreParticleSystem.h:796
Ogre::ParticleSystem::SortByDistanceFunctor
Sort by distance functor.
Definition: OgreParticleSystem.h:723
Ogre::ParticleSystem::CmdQuota::doSet
void doSet(void *target, const String &val)
Ogre::ParticleSystem::addEmitter
ParticleEmitter * addEmitter(const String &emitterType)
Adds an emitter to this particle system.
Ogre::ParticleSystem::initParameters
void initParameters(void)
Internal method for initialising string interface.
Ogre::ParticleSystem::mIterationInterval
Real mIterationInterval
Iteration interval.
Definition: OgreParticleSystem.h:685
Ogre::ParticleSystem::mIsRendererConfigured
bool mIsRendererConfigured
Have we set the material etc on the renderer?
Definition: OgreParticleSystem.h:675
Ogre::ParticleSystem::CmdSorted::doSet
void doSet(void *target, const String &val)
Ogre::ParticleSystem::_sortParticles
void _sortParticles(Camera *cam)
Sort the particles in the system.
Ogre::ParticleSystem::CmdEmittedEmitterQuota::doSet
void doSet(void *target, const String &val)
OgreParticleIterator.h
Ogre::ParticleSystem::SortByDistanceFunctor::operator()
float operator()(Particle *p) const
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Definition: OgreRenderable.h:378
Ogre::ParticleSystem::mOrigin
String mOrigin
Optional origin of this particle system (eg script name)
Definition: OgreParticleSystem.h:814
Ogre::ParticleSystem::mLocalSpace
bool mLocalSpace
Particles in local space?
Definition: OgreParticleSystem.h:691
Ogre::ParticleSystem::mIterationIntervalSet
bool mIterationIntervalSet
Iteration interval set? Otherwise track default.
Definition: OgreParticleSystem.h:687
Ogre::RadixSort
Class for performing a radix sort (fast comparison-less sort based on byte value) on various standard...
Definition: OgreRadixSort.h:89
Ogre::ParticleSystem::setDefaultWidth
virtual void setDefaultWidth(Real width)
See setDefaultDimensions - this sets 1 component individually.
Ogre::ParticleSystem::CmdIterationInterval::doSet
void doSet(void *target, const String &val)
_OgrePrivate
#define _OgrePrivate
Definition: OgrePlatform.h:258
Ogre::ParticleSystem::setDefaultDimensions
virtual void setDefaultDimensions(Real width, Real height)
Sets the default dimensions of the particles in this set.
Ogre::ParticleSystem::getMovableType
const String & getMovableType(void) const
Overridden from MovableObject.
Ogre::ParticleSystem::CmdEmittedEmitterQuota::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::removeAllAffectors
void removeAllAffectors(void)
Removes all the affectors from this system.
Ogre::ParticleSystem::getOrigin
const String & getOrigin(void) const
Get the origin of this particle system, e.g.
Definition: OgreParticleSystem.h:546
Ogre::ParticleSystem::CmdHeight
Command object for particle_height (see ParamCommand).
Definition: OgreParticleSystem.h:108
Ogre::ParticleSystem
Class defining particle system based special effects.
Definition: OgreParticleSystem.h:68
Ogre::ParticleSystem::getNumParticles
size_t getNumParticles(void) const
Gets the number of individual particles in the system right now.
Ogre::ParticleSystem::CmdNonvisibleTimeout
Command object for nonvisible timeout (see ParamCommand).
Definition: OgreParticleSystem.h:143
Ogre::ParticleSystem::setEmitting
void setEmitting(bool v)
This is used to turn on or off particle emission for this system.
Ogre::ParticleSystem::mResourceGroupName
String mResourceGroupName
Name of the resource group to use to load materials.
Definition: OgreParticleSystem.h:671
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::ParticleSystem::_expire
void _expire(Real timeElapsed)
Internal method used to expire dead particles.
Ogre::ParticleSystem::_notifyOrigin
void _notifyOrigin(const String &origin)
Notify this particle system of it's origin.
Definition: OgreParticleSystem.h:548
Ogre::ParticleSystem::_notifyParticleResized
virtual void _notifyParticleResized(void)
Internal callback used by Particles to notify their parent that they have been resized.
Ogre::ParticleSystem::CmdRenderer::doSet
void doSet(void *target, const String &val)
Ogre::ParticleSystem::CmdSorted
Command object for sorting (see ParamCommand).
Definition: OgreParticleSystem.h:122
Ogre::ParticleSystem::CmdIterationInterval
Command object for iteration interval(see ParamCommand).
Definition: OgreParticleSystem.h:136
Ogre::ParticleSystem::mMaterial
MaterialPtr mMaterial
Pointer to the material to use.
Definition: OgreParticleSystem.h:677
Ogre::ParticleSystem::getParticle
Particle * getParticle(size_t index)
Retrieve a particle from the system for manual tweaking.
Ogre::ParticleSystem::msRendererCmd
static CmdRenderer msRendererCmd
Definition: OgreParticleSystem.h:654
Ogre::ParticleSystem::mBoundsAutoUpdate
bool mBoundsAutoUpdate
Definition: OgreParticleSystem.h:663
Ogre::ParticleSystem::removeAllEmitters
void removeAllEmitters(void)
Removes all the emitters from this system.
Ogre::ParticleSystem::mRadixSorter
static RadixSort< ActiveParticleList, Particle *, float > mRadixSorter
Definition: OgreParticleSystem.h:731
Ogre::ParticleSystem::msLocalSpaceCmd
static CmdLocalSpace msLocalSpaceCmd
Definition: OgreParticleSystem.h:656
Ogre::ParticleSystem::ParticleSystem
ParticleSystem()
Default constructor required for STL creation in manager.
Ogre::ParticleSystem::getSpeedFactor
Real getSpeedFactor(void) const
Gets the 'speed factor' on this particle system.
Definition: OgreParticleSystem.h:424
Ogre::Node
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:65
OgreString.h
Ogre::ParticleSystem::mTimeController
Controller< Real > * mTimeController
Controller for time update.
Definition: OgreParticleSystem.h:701
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::ParticleAffector
Abstract class defining the interface to be implemented by particle affectors.
Definition: OgreParticleAffector.h:65
Ogre::ParticleSystem::setBoundsAutoUpdated
void setBoundsAutoUpdated(bool autoUpdate, Real stopIn=0.0f)
Sets whether the bounds will be automatically updated for the life of the particle system.
Ogre::ParticleSystem::mBoundingRadius
Real mBoundingRadius
Definition: OgreParticleSystem.h:662
OgreVector3.h
Ogre::ParticleSystem::mActiveParticles
ActiveParticleList mActiveParticles
Active particle list.
Definition: OgreParticleSystem.h:742
Ogre::ParticleSystem::CmdNonvisibleTimeout::doSet
void doSet(void *target, const String &val)
Ogre::ParticleSystem::CmdLocalSpace::doGet
String doGet(const void *target) const
Ogre::ParticleSystem::mEmitters
ParticleEmitterList mEmitters
List of particle emitters, ie sources of particles.
Definition: OgreParticleSystem.h:794
Ogre::ParticleSystem::EmittedEmitterPool
map< String, EmittedEmitterList >::type EmittedEmitterPool
Definition: OgreParticleSystem.h:765
Ogre::ParticleSystem::setRenderQueueGroup
void setRenderQueueGroup(uint8 queueID)
Sets the render queue group this entity will be rendered through.
Ogre::ParticleSystem::CmdCull::doSet
void doSet(void *target, const String &val)
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
Ogre::ParticleSystem::EmittedEmitterList
vector< ParticleEmitter * >::type EmittedEmitterList
Definition: OgreParticleSystem.h:763
Ogre::ParticleSystem::ParticleSystem
ParticleSystem(const String &name, const String &resourceGroupName)
Creates a particle system with no emitters or affectors.
Ogre::ParticleSystem::CmdIterationInterval::doGet
String doGet(const void *target) const
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:93
Ogre::ParticleSystem::_updateBounds
void _updateBounds(void)
Internal method for updating the bounds of the particle system.
Ogre::ParticleSystem::destroyVisualParticles
void destroyVisualParticles(size_t poolstart, size_t poolend)
Internal method for destroying ParticleVisualData instances for the pool.
Ogre::ParticleSystem::msMaterialCmd
static CmdMaterial msMaterialCmd
Definition: OgreParticleSystem.h:650
Ogre::ParticleSystem::SortByDistanceFunctor::sortPos
Vector3 sortPos
Position to sort in.
Definition: OgreParticleSystem.h:725
Ogre::ParticleSystem::addFreeEmittedEmitters
void addFreeEmittedEmitters(void)
Add emitters from the pool to the free emitted emitter queue.
Ogre::ParticleSystem::_triggerAffectors
void _triggerAffectors(Real timeElapsed)
Applies the effects of affectors.
Ogre::ParticleSystem::getEmitting
bool getEmitting() const
Returns true if the particle system emitting flag is turned on.
Ogre::ParticleSystem::setCullIndividually
virtual void setCullIndividually(bool cullIndividual)
Sets whether culling tests particles in this individually as well as in a group.
Ogre::ParticleSystem::ParticlePool
vector< Particle * >::type ParticlePool
Definition: OgreParticleSystem.h:709
Ogre::ParticleSystem::mPoolSize
size_t mPoolSize
The number of particles in the pool.
Definition: OgreParticleSystem.h:808

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.