A particle pool map.
More...
#include <ParticlePoolMap.h>
template<typename T>
class ParticlePoolMap< T >
A particle pool map.
- Template Parameters
-
◆ PoolMapIterator
◆ PoolMapMap
◆ ParticlePoolMap()
◆ ~ParticlePoolMap()
◆ AddElement()
template<typename T >
void ParticlePoolMap< T >::AddElement |
( |
const Ogre::String & |
key, |
|
|
T * |
element |
|
) |
| |
|
inline |
Adds a particle to the pool map.
A particle is added in locked state.
- Parameters
-
[in] | key | PArticle key in the map. |
[in] | element | Particle to add to the pool. |
◆ Clear()
Removes all particles.
Removes both locked and released particles.
◆ End()
Checks if the iterator is at the end of the pool map.
If it's at the end, {
- See also
- GetNext} will return null when called. It doesn't consider locked particles, only the released ones.
- Returns
- True if the iterator is at the end of the pool map.
◆ GetFirst()
Retrieves the first particle.
Before doing so, it resets the pool map iterator. It doesn't consider locked particles, only the released ones.
- Returns
- A reference to the first particle in the pool map. NULL if the pool map is empty.
◆ GetNext()
Retrieves the next particle in the pool map.
Before doing so, it advances the pool map iterator. It doesn't consider locked particles, only the released ones.
- Returns
- A reference to the next particle in the pool map. NULL if the pool map is empty or the iterator is at the end of it.
◆ GetSize()
Retrieves the pool map size.
It doesn't consider locked particles, only the released ones.
- Returns
- The number of particles in the pool.
◆ IsEmpty()
Checks if the pool map is empty.
It doesn't consider locked particles, only the released ones.
- Returns
- True if the pool is empty, false if there is at least one particle in the pool.
◆ LockAllElements()
Locks all particles.
The particles get added at the end of the locked list in the same order they were in the released list. The pool iterator is reseted.
◆ LockLatestElement()
Locks the released particle pointed by the iterator.
The particle gets added to the end of the locked particle list.
◆ ReleaseAllElements()
Releases all locked particles.
It also resets the pool map operator.
◆ ReleaseElement()
Releases a locked particle.
- Parameters
-
[in] | key | The key of the particle to unlock. |
- Returns
- A pointer to the previously locked and now released particle, or 0 if there were no more locked particles.
◆ ResetIterator()
Resets the pool iterator.
◆ locked_
List with locked particles.
They can't be operated upon until released.
◆ pool_map_iterator_
The pool map iterator.
Determines the current particle to be acted upon. Only works for released particles.
◆ released_
List with released particles.
They can be operated upon.
The documentation for this class was generated from the following file: