OGRE-Next: Ogre::v1::BillboardParticleRenderer Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::v1::BillboardParticleRenderer Class Reference
Core » Effects

Specialisation of ParticleSystemRenderer to render particles using a BillboardSet. More...

`#include <OgreBillboardParticleRenderer.h>`

Inheritance diagram for Ogre::v1::BillboardParticleRenderer:
[legend]

## Classes
class | CmdAccurateFacing
| Command object for accurate facing(see ParamCommand). More...
class | CmdBillboardOrigin
| Command object for billboard origin (see ParamCommand). More...
class | CmdBillboardRotationType
| Command object for billboard rotation type (see ParamCommand). More...
class | CmdBillboardType
| Command object for billboard type (see ParamCommand). More...
class | CmdCommonDirection
| Command object for common direction (see ParamCommand). More...
class | CmdCommonUpVector
| Command object for common up-vector (see ParamCommand). More...
class | CmdPointRendering
| Command object for point rendering (see ParamCommand). More...
class | CmdTextureSlices
| Command object for TextureSlices (see ParamCommand). More...
class | CmdTextureStacks
| Command object for TextureStacks (see ParamCommand). More...

## Public Member Functions
| BillboardParticleRenderer (IdType id, ObjectMemoryManager *objectMemoryManager, SceneManager *sceneManager)
| ~BillboardParticleRenderer () override
SortMode | _getSortMode () const override
| Gets the desired particles sort mode of this renderer.
void | _notifyAttached (Node *parent) override
| Delegated to by ParticleSystem::_notifyAttached.
void | _notifyCurrentCamera (const Camera *camera, const Camera *lodCamera) override
| Delegated to by ParticleSystem::_notifyCurrentCamera.
void | _notifyDefaultDimensions (Real width, Real height) override
| Tells the renderer that the particle default size has changed.
void | _notifyParticleQuota (size_t quota) override
| Tells the renderer that the particle quota has changed.
void | _notifyParticleResized () override
| Optional callback notified when particles are resized individually.
void | _notifyParticleRotated () override
| Optional callback notified when particles are rotated.
void | _setDatablock (HlmsDatablock *datablock) override
| Sets the HLMS material this renderer must use; called by ParticleSystem.
void | _setMaterialName (const String &matName, const String &resourceGroup) override
| Sets the material this renderer must use; called by ParticleSystem.
void | _updateRenderQueue (RenderQueue *queue, Camera *camera, const Camera *lodCamera, list< Particle * >::type &currentParticles, bool cullIndividually, RenderableArray &outRenderables) override
| Delegated to by ParticleSystem::_updateRenderQueue.
BillboardOrigin | getBillboardOrigin () const
| Gets the point which acts as the origin point for all billboards in this set.
BillboardRotationType | getBillboardRotationType () const
| Gets billboard rotation type.
BillboardSet * | getBillboardSet () const
| Access BillboardSet in use.
BillboardType | getBillboardType () const
| Returns the billboard type in use.
const Vector3 & | getCommonDirection () const
| Gets the common direction for all billboards (BBT_ORIENTED_COMMON).
const Vector3 & | getCommonUpVector () const
| Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF).
uint32 | getTextureSlices () const
uint32 | getTextureStacks () const
const String & | getType () const override
| Gets the type of this renderer - must be implemented by subclasses.
bool | getUseAccurateFacing () const
| Gets whether or not billboards use an 'accurate' facing model based on the vector from each billboard to the camera, rather than an optimised version using just the camera direction.
bool | isPointRenderingEnabled () const
| Returns whether point rendering is enabled.
void | setBillboardOrigin (BillboardOrigin origin)
| Sets the point which acts as the origin point for all billboards in this set.
void | setBillboardRotationType (BillboardRotationType rotationType)
| Sets billboard rotation type.
void | setBillboardType (BillboardType bbt)
| Sets the type of billboard to render.
void | setCommonDirection (const Vector3 &vec)
| Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON.
void | setCommonUpVector (const Vector3 &vec)
| Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF.
void | setKeepParticlesInLocalSpace (bool keepLocal) override
| Setting carried over from ParticleSystem.
void | setPointRenderingEnabled (bool enabled)
| Set whether or not the BillboardSet will use point rendering rather than manually generated quads.
void | setRenderQueueGroup (uint8 queueID) override
| Sets which render queue group this renderer should target with it's output.
void | setRenderQueueSubGroup (uint8 subGroup) override
| Sets the render queue sub group.
void | setTextureSlices (uint32 value)
void | setTextureStacks (uint32 value)
void | setUseAccurateFacing (bool acc)
| Sets whether or not billboards should use an 'accurate' facing model based on the vector from each billboard to the camera, rather than an optimised version using just the camera direction.
Public Member Functions inherited from Ogre::ParticleSystemRenderer
| ParticleSystemRenderer ()
| Constructor.
virtual | ~ParticleSystemRenderer ()
| Destructor.
virtual ParticleVisualData * | _createVisualData ()
| Create a new ParticleVisualData instance for attachment to a particle.
virtual void | _destroyVisualData (ParticleVisualData *vis)
| Destroy a ParticleVisualData instance.
virtual void | _notifyParticleCleared (list< Particle * >::type &currentParticles)
| Optional callback notified when particles cleared.
virtual void | _notifyParticleEmitted (Particle *particle)
| Optional callback notified when particle emitted.
virtual void | _notifyParticleExpired (Particle *particle)
| Optional callback notified when particle expired.
virtual void | _notifyParticleMoved (list< Particle * >::type &currentParticles)
| Optional callback notified when particles moved.
Public Member Functions inherited from Ogre::StringInterface
| StringInterface ()
virtual | ~StringInterface ()
| Virtual destructor, see Effective C++.
virtual void | copyParametersTo (StringInterface *dest) const
| Method for copying this object's parameters to another object.
ParamDictionary * | getParamDictionary ()
| Retrieves the parameter dictionary for this class.
const ParamDictionary * | getParamDictionary () const
virtual String | getParameter (const String &name) const
| Generic parameter retrieval method.
const ParameterList & | getParameters () const
| Retrieves a list of parameters valid for this object.
virtual bool | setParameter (const String &name, const String &value)
| Generic parameter setting method.
virtual void | setParameterList (const NameValuePairList &paramList)
| Generic multiple parameter setting method.

## Additional Inherited Members
Static Public Member Functions inherited from Ogre::StringInterface
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.

## Detailed Description

Specialisation of ParticleSystemRenderer to render particles using a BillboardSet.

Remarks
  This renderer has a few more options than the standard particle system, which will be passed to it automatically when the particle system itself does not understand them.

## Constructor & Destructor Documentation

## ◆ BillboardParticleRenderer()

Ogre::v1::BillboardParticleRenderer::BillboardParticleRenderer | ( | IdType | id,
|  | ObjectMemoryManager * | objectMemoryManager,
|  | SceneManager * | sceneManager )

## ◆ ~BillboardParticleRenderer()

Ogre::v1::BillboardParticleRenderer::~BillboardParticleRenderer | ( |  | ) |
| override

## Member Function Documentation

## ◆ _getSortMode()

SortMode Ogre::v1::BillboardParticleRenderer::_getSortMode | ( |  | ) | const
| overridevirtual

Gets the desired particles sort mode of this renderer.

Implements Ogre::ParticleSystemRenderer.

## ◆ _notifyAttached()

void Ogre::v1::BillboardParticleRenderer::_notifyAttached | ( | Node * | parent | ) |
| overridevirtual

Delegated to by ParticleSystem::_notifyAttached.

Implements Ogre::ParticleSystemRenderer.

## ◆ _notifyCurrentCamera()

void Ogre::v1::BillboardParticleRenderer::_notifyCurrentCamera | ( | const Camera * | camera,
|  | const Camera * | lodCamera )
| overridevirtual

Delegated to by ParticleSystem::_notifyCurrentCamera.

Implements Ogre::ParticleSystemRenderer.

## ◆ _notifyDefaultDimensions()

void Ogre::v1::BillboardParticleRenderer::_notifyDefaultDimensions | ( | Real | width,
|  | Real | height )
| overridevirtual

Tells the renderer that the particle default size has changed.

Implements Ogre::ParticleSystemRenderer.

## ◆ _notifyParticleQuota()

void Ogre::v1::BillboardParticleRenderer::_notifyParticleQuota | ( | size_t | quota | ) |
| overridevirtual

Tells the renderer that the particle quota has changed.

Implements Ogre::ParticleSystemRenderer.

## ◆ _notifyParticleResized()

void Ogre::v1::BillboardParticleRenderer::_notifyParticleResized | ( |  | ) |
| overridevirtual

Optional callback notified when particles are resized individually.

Reimplemented from Ogre::ParticleSystemRenderer.

## ◆ _notifyParticleRotated()

void Ogre::v1::BillboardParticleRenderer::_notifyParticleRotated | ( |  | ) |
| overridevirtual

Optional callback notified when particles are rotated.

Reimplemented from Ogre::ParticleSystemRenderer.

## ◆ _setDatablock()

void Ogre::v1::BillboardParticleRenderer::_setDatablock | ( | HlmsDatablock * | datablock | ) |
| overridevirtual

Sets the HLMS material this renderer must use; called by ParticleSystem.

Implements Ogre::ParticleSystemRenderer.

## ◆ _setMaterialName()

void Ogre::v1::BillboardParticleRenderer::_setMaterialName | ( | const String & | matName,
|  | const String & | resourceGroup )
| overridevirtual

Sets the material this renderer must use; called by ParticleSystem.

Implements Ogre::ParticleSystemRenderer.

## ◆ _updateRenderQueue()

void Ogre::v1::BillboardParticleRenderer::_updateRenderQueue | ( | RenderQueue * | queue,
|  | Camera * | camera,
|  | const Camera * | lodCamera,
|  | list< Particle * >::type & | currentParticles,
|  | bool | cullIndividually,
|  | RenderableArray & | outRenderables )
| overridevirtual

Delegated to by ParticleSystem::_updateRenderQueue.

Remarks
  The subclass must update the render queue using whichever Renderable instance(s) it wishes.

Implements Ogre::ParticleSystemRenderer.

## ◆ getBillboardOrigin()

BillboardOrigin Ogre::v1::BillboardParticleRenderer::getBillboardOrigin | ( |  | ) | const
| inline

Gets the point which acts as the origin point for all billboards in this set.

Returns
  A member of the BillboardOrigin enum specifying the origin for all the billboards in this set.

## ◆ getBillboardRotationType()

BillboardRotationType Ogre::v1::BillboardParticleRenderer::getBillboardRotationType | ( |  | ) | const

Gets billboard rotation type.

Returns
  A member of the BillboardRotationType enum specifying the rotation type for all the billboards in this set.

## ◆ getBillboardSet()

BillboardSet * Ogre::v1::BillboardParticleRenderer::getBillboardSet | ( |  | ) | const
| inline

Access BillboardSet in use.

## ◆ getBillboardType()

BillboardType Ogre::v1::BillboardParticleRenderer::getBillboardType | ( |  | ) | const

Returns the billboard type in use.

## ◆ getCommonDirection()

const Vector3 & Ogre::v1::BillboardParticleRenderer::getCommonDirection | ( |  | ) | const

Gets the common direction for all billboards (BBT_ORIENTED_COMMON).

## ◆ getCommonUpVector()

const Vector3 & Ogre::v1::BillboardParticleRenderer::getCommonUpVector | ( |  | ) | const

Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF).

## ◆ getTextureSlices()

uint32 Ogre::v1::BillboardParticleRenderer::getTextureSlices | ( |  | ) | const

## ◆ getTextureStacks()

uint32 Ogre::v1::BillboardParticleRenderer::getTextureStacks | ( |  | ) | const

## ◆ getType()

const String & Ogre::v1::BillboardParticleRenderer::getType | ( |  | ) | const
| overridevirtual

Gets the type of this renderer - must be implemented by subclasses.

Implements Ogre::ParticleSystemRenderer.

## ◆ getUseAccurateFacing()

bool Ogre::v1::BillboardParticleRenderer::getUseAccurateFacing | ( |  | ) | const

Gets whether or not billboards use an 'accurate' facing model based on the vector from each billboard to the camera, rather than an optimised version using just the camera direction.

## ◆ isPointRenderingEnabled()

bool Ogre::v1::BillboardParticleRenderer::isPointRenderingEnabled | ( |  | ) | const

Returns whether point rendering is enabled.

## ◆ setBillboardOrigin()

void Ogre::v1::BillboardParticleRenderer::setBillboardOrigin | ( | BillboardOrigin | origin | ) |
| inline

Sets the point which acts as the origin point for all billboards in this set.

Remarks
  This setting controls the fine tuning of where a billboard appears in relation to it's position. It could be that a billboard's position represents it's center (e.g. for fireballs), it could mean the center of the bottom edge (e.g. a tree which is positioned on the ground), the top-left corner (e.g. a cursor).

  The default setting is BBO_CENTER.

Parameters

  origin | A member of the BillboardOrigin enum specifying the origin for all the billboards in this set.

## ◆ setBillboardRotationType()

void Ogre::v1::BillboardParticleRenderer::setBillboardRotationType | ( | BillboardRotationType | rotationType | ) |

Sets billboard rotation type.

Remarks
  This setting controls the billboard rotation type, you can deciding rotate the billboard's vertices around their facing direction or rotate the billboard's texture coordinates.

  The default settings is BBR_TEXCOORD.

Parameters

  rotationType | A member of the BillboardRotationType enum specifying the rotation type for all the billboards in this set.

## ◆ setBillboardType()

void Ogre::v1::BillboardParticleRenderer::setBillboardType | ( | BillboardType | bbt | ) |

Sets the type of billboard to render.

Remarks
  The default sort of billboard (BBT_POINT), always has both x and y axes parallel to the camera's local axes. This is fine for 'point' style billboards (e.g. flares, smoke, anything which is symmetrical about a central point) but does not look good for billboards which have an orientation (e.g. an elongated raindrop). In this case, the oriented billboards are more suitable (BBT_ORIENTED_COMMON or BBT_ORIENTED_SELF) since they retain an independent Y axis and only the X axis is generated, perpendicular to both the local Y and the camera Z.

Parameters

  bbt | The type of billboard to render

## ◆ setCommonDirection()

void Ogre::v1::BillboardParticleRenderer::setCommonDirection | ( | const Vector3 & | vec | ) |

Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON.

Remarks
  Use BBT_ORIENTED_COMMON when you want oriented billboards but you know they are always going to be oriented the same way (e.g. rain in calm weather). It is faster for the system to calculate the billboard vertices if they have a common direction.

Parameters

  vec | The direction for all billboards.

## ◆ setCommonUpVector()

void Ogre::v1::BillboardParticleRenderer::setCommonUpVector | ( | const Vector3 & | vec | ) |

Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF.

Remarks
  Use BBT_PERPENDICULAR_SELF when you want oriented billboards perpendicular to their own direction vector and doesn't face to camera. In this case, we need an additional vector to determine the billboard X, Y axis. The generated X axis perpendicular to both the own direction and up-vector, the Y axis will coplanar with both own direction and up-vector, and perpendicular to own direction.

Parameters

  vec | The up-vector for all billboards.

## ◆ setKeepParticlesInLocalSpace()

void Ogre::v1::BillboardParticleRenderer::setKeepParticlesInLocalSpace | ( | bool | keepLocal | ) |
| overridevirtual

Setting carried over from ParticleSystem.

Implements Ogre::ParticleSystemRenderer.

## ◆ setPointRenderingEnabled()

void Ogre::v1::BillboardParticleRenderer::setPointRenderingEnabled | ( | bool | enabled | ) |

Set whether or not the BillboardSet will use point rendering rather than manually generated quads.

Remarks
  By default a billboardset is rendered by generating geometry for a textured quad in memory, taking into account the size and orientation settings, and uploading it to the video card. The alternative is to use hardware point rendering, which means that only one position needs to be sent per billboard rather than 4 and the hardware sorts out how this is rendered based on the render state.

  Using point rendering is faster than generating quads manually, but is more restrictive. The following restrictions apply:
  - Only the BBT_POINT type is supported
  - Size and appearance of each billboard is controlled by the material (Pass::setPointSize, Pass::setPointSizeAttenuation, Pass::setPointSpritesEnabled)
  - Per-billboard size is not supported (stems from the above)
  - Per-billboard rotation is not supported, this can only be controlled through texture unit rotation
  - Only BBO_CENTER origin is supported
  - Per-billboard texture coordinates are not supported

  You will almost certainly want to enable in your material pass both point attenuation and point sprites if you use this option.

Parameters

  enabled | True to enable point rendering, false otherwise

## ◆ setRenderQueueGroup()

void Ogre::v1::BillboardParticleRenderer::setRenderQueueGroup | ( | uint8 | queueID | ) |
| overridevirtual

Sets which render queue group this renderer should target with it's output.

Implements Ogre::ParticleSystemRenderer.

## ◆ setRenderQueueSubGroup()

void Ogre::v1::BillboardParticleRenderer::setRenderQueueSubGroup | ( | uint8 | subGroup | ) |
| overridevirtual

Sets the render queue sub group.

Remarks
  Within the same RenderQueue ID, you may want to have the renderables to have a specific order (i.e. have a mesh, but the hair submesh with alpha blending needs to be rendered last).

  RenderQueue Subgroups are useful for manually sorting objects, just like RenderQueue IDs. However, RenderQueue IDs can also be useful for skipping large number of objects through clever compositing and thus a performance optimization. Subgroups cannot be used for such optimizations.

Parameters

  subGroup | The sub group. This value can't exceed OGRE_MAKE_MASK( SubRqIdBits )

See also
  RenderQueue

Implements Ogre::ParticleSystemRenderer.

## ◆ setTextureSlices()

void Ogre::v1::BillboardParticleRenderer::setTextureSlices | ( | uint32 | value | ) |

## ◆ setTextureStacks()

void Ogre::v1::BillboardParticleRenderer::setTextureStacks | ( | uint32 | value | ) |

## ◆ setUseAccurateFacing()

void Ogre::v1::BillboardParticleRenderer::setUseAccurateFacing | ( | bool | acc | ) |

Sets whether or not billboards should use an 'accurate' facing model based on the vector from each billboard to the camera, rather than an optimised version using just the camera direction.

Remarks
  By default, the axes for all billboards are calculated using the camera's view direction, not the vector from the camera position to the billboard. The former is faster, and most of the time the difference is not noticeable. However for some purposes (e.g. very large, static billboards) the changing billboard orientation when rotating the camera can be off putting, therefore you can enable this option to use a more expensive, but more accurate version.

Parameters

  acc | True to use the slower but more accurate model. Default is false.

The documentation for this class was generated from the following file:

- OgreBillboardParticleRenderer.h