# Ogre::BillboardParticleRenderer Class Reference

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

`#include <OgreBillboardParticleRenderer.h>`

Inheritance diagram for Ogre::BillboardParticleRenderer:

List of all members.

## Public Member Functions

| BillboardParticleRenderer ()
| ~BillboardParticleRenderer ()
void | setBillboardType (BillboardType bbt)
| Sets the type of billboard to render.
BillboardType | getBillboardType (void) const
| Returns the billboard type in use.
void | setBillboardOrigin (BillboardOrigin origin)
| Sets the point which acts as the origin point for all billboards in this set.
BillboardOrigin | getBillboardOrigin (void) const
| Gets the point which acts as the origin point for all billboards in this set.
void | setCommonDirection (const Vector3 &vec)
| Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON.
const Vector3 & | getCommonDirection (void) const
| Gets the common direction for all billboards (BBT_ORIENTED_COMMON).
const String & | getType (void) const
void | _updateRenderQueue (RenderQueue *queue, std::list< Particle * > &currentParticles, bool cullIndividually)

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

void | _setMaterial (MaterialPtr &mat)
void | _notifyCurrentCamera (Camera *cam)
void | _notifyParticleRotated (void)
void | _notifyParticleResized (void)
void | _notifyParticleQuota (size_t quota)
void | _notifyAttached (Node *parent, bool isTagPoint=false)
void | _notifyDefaultDimensions (Real width, Real height)
void | setRenderQueueGroup (RenderQueueGroupID queueID)
virtual ParticleVisualData * | _createVisualData (void)
| Create a new ParticleVisualData instance for attachment to a particle.
virtual void | _destroyVisualData (ParticleVisualData *vis)
| Destroy a ParticleVisualData instance.
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 void | setParameterList (const NameValuePairList &paramList)
| Generic multiple 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 Member Functions

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.

## Protected Member Functions

bool | createParamDictionary (const String &className)
| Internal method for creating a parameter dictionary for the class, if it does not already exist.

## Protected Attributes

BillboardSet * | mBillboardSet
| The billboard set that's doing the rendering.
String | mParamDictName
| Class name for this instance to be used as a lookup (must be initialised by subclasses).

## Static Protected Attributes

CmdBillboardType | msBillboardTypeCmd
CmdCommonDirection | msCommonDirectionCmd
ParamDictionaryMap | msDictionary
| Dictionary of parameters.

## 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.

Definition at line 41 of file OgreBillboardParticleRenderer.h.

## Constructor & Destructor Documentation

Ogre::BillboardParticleRenderer::BillboardParticleRenderer | ( |  | ) |

Ogre::BillboardParticleRenderer::~BillboardParticleRenderer | ( |  | ) |

## Member Function Documentation

virtual ParticleVisualData* Ogre::ParticleSystemRenderer::_createVisualData | ( | void |  | ) | `[virtual, inherited]`

Create a new ParticleVisualData instance for attachment to a particle.

Remarks:
  If this renderer needs additional data in each particle, then this should be held in an instance of a subclass of ParticleVisualData, and this method should be overridden to return a new instance of it. The default behaviour is to return null.

Definition at line 78 of file OgreParticleSystemRenderer.h.

virtual void Ogre::ParticleSystemRenderer::_destroyVisualData | ( | ParticleVisualData * | vis | ) | `[virtual, inherited]`

Destroy a ParticleVisualData instance.

Remarks:
  If this renderer needs additional data in each particle, then this should be held in an instance of a subclass of ParticleVisualData, and this method should be overridden to destroy an instance of it. The default behaviour is to do nothing.

Definition at line 86 of file OgreParticleSystemRenderer.h.

void Ogre::BillboardParticleRenderer::_notifyAttached | ( | Node * | parent,
|  | bool | isTagPoint = false
| ) | `[virtual]`

| Implements Ogre::ParticleSystemRenderer.

void Ogre::BillboardParticleRenderer::_notifyCurrentCamera | ( | Camera * | cam | ) | `[virtual]`

| Implements Ogre::ParticleSystemRenderer.

void Ogre::BillboardParticleRenderer::_notifyDefaultDimensions | ( | Real | width,
|  | Real | height
| ) | `[virtual]`

| Implements Ogre::ParticleSystemRenderer.

void Ogre::BillboardParticleRenderer::_notifyParticleQuota | ( | size_t | quota | ) | `[virtual]`

| Implements Ogre::ParticleSystemRenderer.

void Ogre::BillboardParticleRenderer::_notifyParticleResized | ( | void |  | ) | `[virtual]`

| Reimplemented from Ogre::ParticleSystemRenderer.

void Ogre::BillboardParticleRenderer::_notifyParticleRotated | ( | void |  | ) | `[virtual]`

| Reimplemented from Ogre::ParticleSystemRenderer.

void Ogre::BillboardParticleRenderer::_setMaterial | ( | MaterialPtr & | mat | ) | `[virtual]`

| Implements Ogre::ParticleSystemRenderer.

void Ogre::BillboardParticleRenderer::_updateRenderQueue | ( | RenderQueue * | queue,
|  | std::list< Particle * > & | currentParticles,
|  | bool | cullIndividually
| ) | `[virtual]`

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

Implements Ogre::ParticleSystemRenderer.

void Ogre::StringInterface::cleanupDictionary | ( |  | ) | `[static, inherited]`

| 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. MaterialManager) initializes.

virtual void Ogre::StringInterface::copyParametersTo | ( | StringInterface * | dest | ) | const`[virtual, inherited]`

Method for copying this object's parameters to another object.

Remarks:
  This method takes the values of all the object's parameters and tries to set the same values on the destination object. This provides a completely type independent way to copy parameters to other objects. Note that because of the String manipulation involved, this should not be regarded as an efficient process and should be saved for times outside of the rendering loop.

  Any unrecognised parameters will be ignored as with setParameter method.

Parameters:

  dest | Pointer to object to have it's parameters set the same as this object.

Definition at line 296 of file OgreStringInterface.h.

References Ogre::ParamDictionary::mParamDefs, and Ogre::StringInterface::setParameter().

bool Ogre::StringInterface::createParamDictionary | ( | const String & | className | ) | `[protected, inherited]`

Internal method for creating a parameter dictionary for the class, if it does not already exist.

Remarks:
  This method will check to see if a parameter dictionary exist for this class yet, and if not will create one. NB you must supply the name of the class (RTTI is not used or performance).

Parameters:

  className | the name of the class using the dictionary

Returns:
  true if a new dictionary was created, false if it was already there

Definition at line 172 of file OgreStringInterface.h.

References Ogre::String.

BillboardOrigin Ogre::BillboardParticleRenderer::getBillboardOrigin | ( | void |  | ) | const

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.

Definition at line 97 of file OgreBillboardParticleRenderer.h.

References Ogre::BillboardOrigin.

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

| Returns the billboard type in use.

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

| Gets the common direction for all billboards (BBT_ORIENTED_COMMON).

const ParamDictionary* Ogre::StringInterface::getParamDictionary | ( | void |  | ) | const`[inherited]`

| Definition at line 209 of file OgreStringInterface.h.

ParamDictionary* Ogre::StringInterface::getParamDictionary | ( | void |  | ) | `[inherited]`

Retrieves the parameter dictionary for this class.

Remarks:
  Only valid to call this after createParamDictionary.

Returns:
  Pointer to ParamDictionary shared by all instances of this class which you can add parameters to, retrieve parameters etc.

Definition at line 196 of file OgreStringInterface.h.

virtual String Ogre::StringInterface::getParameter | ( | const String & | name | ) | const`[virtual, inherited]`

Generic parameter retrieval method.

Remarks:
  Call this method with the name of a parameter to retrieve a string-format value of the parameter in question. If in doubt, check the parameter definition in the list returned from getParameters for the type of this parameter. If you like you can use StringConverter to convert this string back into a native type.

Parameters:

  name | The name of the parameter to get

Returns:
  String value of parameter, blank if not found

Definition at line 265 of file OgreStringInterface.h.

References Ogre::ParamCommand::doGet(), Ogre::ParamDictionary::getParamCommand(), and Ogre::String.

const ParameterList& Ogre::StringInterface::getParameters | ( | void |  | ) | const`[inherited]`

Retrieves a list of parameters valid for this object.

Returns:
  A reference to a static list of ParameterDef objects.

const String& Ogre::BillboardParticleRenderer::getType | ( | void |  | ) | const`[virtual]`

| Implements Ogre::ParticleSystemRenderer.

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

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.

Definition at line 91 of file OgreBillboardParticleRenderer.h.

void Ogre::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 independant 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

void Ogre::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.

virtual bool Ogre::StringInterface::setParameter | ( | const String & | name,
|  | const String & | value
| ) | `[virtual, inherited]`

Generic parameter setting method.

Remarks:
  Call this method with the name of a parameter and a string version of the value to set. The implementor will convert the string to a native type internally. If in doubt, check the parameter definition in the list returned from StringInterface::getParameters.

Parameters:

  name | The name of the parameter to set
  value | String value. Must be in the right format for the type specified in the parameter definition. See the StringConverter class for more information.

Returns:
  true if set was successful, false otherwise (NB no exceptions thrown - tolerant method)

Referenced by Ogre::StringInterface::copyParametersTo().

virtual void Ogre::StringInterface::setParameterList | ( | const NameValuePairList & | paramList | ) | `[virtual, inherited]`

Generic multiple parameter setting method.

Remarks:
  Call this method with a list of name / value pairs to set. The implementor will convert the string to a native type internally. If in doubt, check the parameter definition in the list returned from StringInterface::getParameters.

Parameters:

  paramList | Name/value pair list

void Ogre::BillboardParticleRenderer::setRenderQueueGroup | ( | RenderQueueGroupID | queueID | ) | `[virtual]`

| Implements Ogre::ParticleSystemRenderer.

## Member Data Documentation

BillboardSet* Ogre::BillboardParticleRenderer::mBillboardSet `[protected]`

| The billboard set that's doing the rendering. Definition at line 45 of file OgreBillboardParticleRenderer.h.

String Ogre::StringInterface::mParamDictName `[protected, inherited]`

| Class name for this instance to be used as a lookup (must be initialised by subclasses). Definition at line 160 of file OgreStringInterface.h.

CmdBillboardType Ogre::BillboardParticleRenderer::msBillboardTypeCmd `[static, protected]`

| Definition at line 134 of file OgreBillboardParticleRenderer.h.

CmdCommonDirection Ogre::BillboardParticleRenderer::msCommonDirectionCmd `[static, protected]`

| Definition at line 135 of file OgreBillboardParticleRenderer.h.

ParamDictionaryMap Ogre::StringInterface::msDictionary `[static, protected, inherited]`

| Dictionary of parameters. Definition at line 157 of file OgreStringInterface.h.

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

- OgreBillboardParticleRenderer.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:00:07 2006