#include <OgreParticleSystemManager2.h>
|
| ParticleSystemManager2 (SceneManager *ogre_nullable sceneManager, ParticleSystemManager2 *ogre_nullable master) |
|
| ~ParticleSystemManager2 () |
|
void | _addParticleSystemDefAsActive (ParticleSystemDef *def) |
|
void | _addToRenderQueue (size_t threadIdx, size_t numThreads, RenderQueue *renderQueue, uint8 renderQueueId, uint32 visibilityMask, bool includeNonCasters) const |
| Instructs us to add all the ParticleSystemDef to the RenderQueue that match the given renderQueueId and pass the visibilityMask. More...
|
|
IndexBufferPacked * | _getSharedIndexBuffer (size_t maxQuota, VaoManager *vaoManager) |
|
void | _prepareParallel () |
| See prepareForUpdate() This function is called from multiple threads. More...
|
|
void | _removeParticleSystemDefFromActive (ParticleSystemDef *def) |
|
void | _updateParallel (size_t threadIdx, size_t numThreads) |
| See prepareForUpdate() This function is called from multiple threads. More...
|
|
BillboardSet * | createBillboardSet () |
| Creates a BillboardSet. More...
|
|
ParticleSystemDef * | createParticleSystemDef (const String &name) |
|
void | destroyAllBillboardSets () |
| Destroys all BillboardSet created with createBillboardSet(). More...
|
|
void | destroyAllParticleSystems () |
|
void | destroyBillboardSet (BillboardSet *billboardSet) |
| Destroys a BillboardSet created with createBillboardSet(). More...
|
|
const Vector3 & | getCameraPosition () const |
|
uint32 | getHighestPossibleQuota16 () const |
|
uint32 | getHighestPossibleQuota32 () const |
|
ParticleSystemDef * | getParticleSystemDef (const String &name, bool bAutoInit=true) |
| Retrieves an existing ParticleSystemDef with the given name Throws if not found. More...
|
|
bool | hasParticleSystemDef (const String &name, bool bSearchInRoot=true) const |
| Returns true if this ParticleSystemManager2 has a ParticleSystemDef by that name. More...
|
|
void | prepareForUpdate (Real timeSinceLast) |
| The order of function calls is: More...
|
|
void | setCameraPosition (const Vector3 &camPos) |
| All instances are sorted every frame to their distance to camera. More...
|
|
void | setHighestPossibleQuota (uint16 highestQuota16, uint32 highestQuota32) |
| ParticleSystemManager2 must know the highest possible quota any of its particle systems may achieve. More...
|
|
void | update () |
| See prepareForUpdate() More...
|
|
◆ ParticleSystemManager2()
◆ ~ParticleSystemManager2()
Ogre::ParticleSystemManager2::~ParticleSystemManager2 |
( |
| ) |
|
◆ _addParticleSystemDefAsActive()
void Ogre::ParticleSystemManager2::_addParticleSystemDefAsActive |
( |
ParticleSystemDef * |
def | ) |
|
◆ _addToRenderQueue()
void Ogre::ParticleSystemManager2::_addToRenderQueue |
( |
size_t |
threadIdx, |
|
|
size_t |
numThreads, |
|
|
RenderQueue * |
renderQueue, |
|
|
uint8 |
renderQueueId, |
|
|
uint32 |
visibilityMask, |
|
|
bool |
includeNonCasters |
|
) |
| const |
Instructs us to add all the ParticleSystemDef to the RenderQueue that match the given renderQueueId and pass the visibilityMask.
- Parameters
-
threadIdx | |
numThreads | |
renderQueue | |
renderQueueId | |
visibilityMask | |
includeNonCasters | |
◆ _getSharedIndexBuffer()
◆ _prepareParallel()
void Ogre::ParticleSystemManager2::_prepareParallel |
( |
| ) |
|
See prepareForUpdate() This function is called from multiple threads.
Each thread handles a whole ParticleSystemDef. (i.e. 2 threads won't concurrently access the same ParticleSystemDef).
It handles sorting them by distance to camera; and emits new particles that instances require.
◆ _removeParticleSystemDefFromActive()
void Ogre::ParticleSystemManager2::_removeParticleSystemDefFromActive |
( |
ParticleSystemDef * |
def | ) |
|
◆ _updateParallel()
void Ogre::ParticleSystemManager2::_updateParallel |
( |
size_t |
threadIdx, |
|
|
size_t |
numThreads |
|
) |
| |
◆ addAffectorFactory()
◆ addEmitterFactory()
◆ createBillboardSet()
BillboardSet* Ogre::ParticleSystemManager2::createBillboardSet |
( |
| ) |
|
◆ createParticleSystemDef()
◆ destroyAllBillboardSets()
void Ogre::ParticleSystemManager2::destroyAllBillboardSets |
( |
| ) |
|
◆ destroyAllParticleSystems()
void Ogre::ParticleSystemManager2::destroyAllParticleSystems |
( |
| ) |
|
◆ destroyBillboardSet()
void Ogre::ParticleSystemManager2::destroyBillboardSet |
( |
BillboardSet * |
billboardSet | ) |
|
◆ getAffectorFactory()
◆ getCameraPosition()
const Vector3& Ogre::ParticleSystemManager2::getCameraPosition |
( |
| ) |
const |
|
inline |
◆ getFactory()
◆ getHighestPossibleQuota16()
uint32 Ogre::ParticleSystemManager2::getHighestPossibleQuota16 |
( |
| ) |
const |
|
inline |
◆ getHighestPossibleQuota32()
uint32 Ogre::ParticleSystemManager2::getHighestPossibleQuota32 |
( |
| ) |
const |
|
inline |
◆ getParticleSystemDef()
ParticleSystemDef* Ogre::ParticleSystemManager2::getParticleSystemDef |
( |
const String & |
name, |
|
|
bool |
bAutoInit = true |
|
) |
| |
Retrieves an existing ParticleSystemDef with the given name Throws if not found.
We only throw if Root's version doesn't have a definition by that name either.
- Parameters
-
- Returns
- The ParticleSystemDef.
◆ hasParticleSystemDef()
bool Ogre::ParticleSystemManager2::hasParticleSystemDef |
( |
const String & |
name, |
|
|
bool |
bSearchInRoot = true |
|
) |
| const |
◆ prepareForUpdate()
void Ogre::ParticleSystemManager2::prepareForUpdate |
( |
Real |
timeSinceLast | ) |
|
The order of function calls is:
- manager->prepareForUpdate( timeSinceLast ) (main thread)
- manager->_prepareParallel() (from many threads)
- manager->update() (main thread)
- This function will call _updateParallel from all threads.
Prepares everything for caller to later call _prepareParallel() from all threads. This function must be called from main thread.
- Parameters
-
timeSinceLast | Time in seconds since last frame (to advance the particle simulation). |
◆ removeAffectorFactory()
◆ removeEmitterFactory()
◆ setCameraPosition()
void Ogre::ParticleSystemManager2::setCameraPosition |
( |
const Vector3 & |
camPos | ) |
|
|
inline |
All instances are sorted every frame to their distance to camera.
Closer instances are given higher priority to emit. If instances reach the shared Quota (see ParticleSystemDef::setParticleQuota) then eventually over time far instances will run out of particles as they can no longer emit more, while close instances will still be emitting as much as possible.
This value does not control rendering. It's not instantaneous. It merely tells the simulation which systems should be prioritized for emission for this frame.
- Parameters
-
◆ setHighestPossibleQuota()
void Ogre::ParticleSystemManager2::setHighestPossibleQuota |
( |
uint16 |
highestQuota16, |
|
|
uint32 |
highestQuota32 |
|
) |
| |
ParticleSystemManager2 must know the highest possible quota any of its particle systems may achieve.
After the index buffer has been initialized, this value cannot be changed.
After initialization you can create new ParticleSystemDef that set quotas lower than the already highest possible one. However you cannot set a quota larger than that.
Make sure to call this function with the highest values you anticipate your particle systems will need.
Note this value directly correlates to VRAM used. The amount of bytes consumed are : highestQuota32 * 6 * 4 bytes + highestQuota16 * 6 * 2
- Parameters
-
highestQuota16 | The highest possible quota for ParticleSystemDefs that need less than 65536 particles. If unsure, you can set it to 65536. |
This value can be 0, however we may raise it if we find a ParticleSystemDef that needs it.
- Parameters
-
highestQuota32 | The highest possible quota for ParticleSystemDefs that need more than 65535 particles. This value can be 0, however we may raise it if we find a ParticleSystemDef that needs it. |
◆ update()
void Ogre::ParticleSystemManager2::update |
( |
| ) |
|
The documentation for this class was generated from the following file: