![]() |
OGRE 1.12.10
Object-Oriented Graphics Rendering Engine
|
Specialisation of ParticleSystemRenderer to render particles using a BillboardSet. More...
#include <OgreBillboardParticleRenderer.h>
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... | |
Public Member Functions | |
BillboardParticleRenderer () | |
~BillboardParticleRenderer () | |
SortMode | _getSortMode (void) const |
Gets the desired particles sort mode of this renderer. | |
void | _notifyAttached (Node *parent, bool isTagPoint=false) |
Delegated to by ParticleSystem::_notifyAttached. | |
void | _notifyBoundingBox (const AxisAlignedBox &aabb) override |
Tells the Renderer about the ParticleSystem bounds. | |
void | _notifyCurrentCamera (Camera *cam) |
Delegated to by ParticleSystem::_notifyCurrentCamera. | |
void | _notifyDefaultDimensions (Real width, Real height) |
Tells the renderer that the particle default size has changed. | |
void | _notifyParticleQuota (size_t quota) |
Tells the renderer that the particle quota has changed. | |
void | _setMaterial (MaterialPtr &mat) |
Sets the material this renderer must use; called by ParticleSystem. | |
void | _updateRenderQueue (RenderQueue *queue, std::list< Particle * > ¤tParticles, bool cullIndividually) |
Delegated to by ParticleSystem::_updateRenderQueue. | |
BillboardOrigin | getBillboardOrigin (void) const |
Gets the point which acts as the origin point for all billboards in this set. | |
BillboardRotationType | getBillboardRotationType () const |
Sets billboard rotation type. | |
BillboardSet * | getBillboardSet (void) const |
Access BillboardSet in use. | |
BillboardType | getBillboardType (void) const |
Returns the billboard type in use. | |
const Vector3 & | getCommonDirection (void) const |
Gets the common direction for all billboards (BBT_ORIENTED_COMMON) | |
const Vector3 & | getCommonUpVector (void) const |
Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF and BBT_PERPENDICULAR_COMMON) | |
const String & | getType (void) const |
Gets the type of this renderer - must be implemented by subclasses. | |
bool | getUseAccurateFacing (void) 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 (void) 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 or BBT_PERPENDICULAR_COMMON. | |
void | setCommonUpVector (const Vector3 &vec) |
Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF or BBT_PERPENDICULAR_COMMON. | |
void | setKeepParticlesInLocalSpace (bool keepLocal) |
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) |
Sets which render queue group this renderer should target with it's output. | |
void | setRenderQueueGroupAndPriority (uint8 queueID, ushort priority) |
Sets the render queue group and group priority this entity will be rendered through. | |
void | setTextureStacksAndSlices (uchar stacks, uchar slices) |
Generate texture coordinate rects for a tiled texture sheet. | |
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. | |
void | visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false) |
Required method to allow the renderer to communicate the Renderables it will be using to render the system to a visitor. | |
![]() | |
ParticleSystemRenderer () | |
Constructor. | |
virtual | ~ParticleSystemRenderer () |
Destructor. | |
virtual ParticleVisualData * | _createVisualData (void) |
Create a new ParticleVisualData instance for attachment to a particle. | |
virtual void | _destroyVisualData (ParticleVisualData *vis) |
Destroy a ParticleVisualData instance. | |
virtual void | _notifyParticleCleared (std::list< Particle * > ¤tParticles) |
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 (std::list< Particle * > ¤tParticles) |
Optional callback notified when particles moved. | |
virtual void | _notifyParticleResized (void) |
virtual void | _notifyParticleRotated (void) |
![]() | |
StringInterface () | |
virtual | ~StringInterface () |
Virtual destructor, see Effective C++. | |
void | copyParametersTo (StringInterface *dest) const |
Method for copying this object's parameters to another object. | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. | |
const ParamDictionary * | getParamDictionary (void) const |
String | getParameter (const String &name) const |
Generic parameter retrieval method. | |
const ParameterList & | getParameters (void) const |
Retrieves a list of parameters valid for this object. | |
bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. | |
void | setParameterList (const NameValuePairList ¶mList) |
Generic multiple parameter setting method. | |
Additional Inherited Members | |
![]() | |
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. | |
Specialisation of ParticleSystemRenderer to render particles using a BillboardSet.
Ogre::BillboardParticleRenderer::BillboardParticleRenderer | ( | ) |
Ogre::BillboardParticleRenderer::~BillboardParticleRenderer | ( | ) |
|
inline |
Generate texture coordinate rects for a tiled texture sheet.
A texture sheet is a grid of images that can be used to create simple animations. This method will generate the uv coordinates for the individual sub-rectangles.
These can then be addressed by Ogre::Billboard::setTexcoordIndex().
If the texture size is 512x512 and 'stacks' is 4 and 'slices' is 8, each sub-rectangle of the texture would be 128 texels tall and 64 texels wide.
The numbering counts first across, then down, so top-left is 0, the one to the right of that is 1, and the lower-right is stacks*slices-1.
If you need more flexibility, you can use Ogre::BillboardSet::setTextureCoords() instead.
stacks | number of vertical tiles (rows) |
slices | number of horizontal tiles (columns) |
References Ogre::BillboardSet::setTextureStacksAndSlices().
|
inline |
Sets the type of billboard to render.
bbt | The type of billboard to render |
References Ogre::BillboardSet::setBillboardType().
|
inline |
Returns the billboard type in use.
References Ogre::BillboardSet::getBillboardType().
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.
acc | True to use the slower but more accurate model. Default is false. |
References Ogre::BillboardSet::setUseAccurateFacing().
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.
References Ogre::BillboardSet::getUseAccurateFacing().
|
inline |
Sets the point which acts as the origin point for all billboards in this set.
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).
origin | A member of the BillboardOrigin enum specifying the origin for all the billboards in this set. |
References Ogre::BillboardSet::setBillboardOrigin().
|
inline |
Gets the point which acts as the origin point for all billboards in this set.
References Ogre::BillboardSet::getBillboardOrigin().
|
inline |
Sets billboard rotation type.
rotationType | A member of the BillboardRotationType enum specifying the rotation type for all the billboards in this set. |
References Ogre::BillboardSet::setBillboardRotationType().
|
inline |
Sets billboard rotation type.
References Ogre::BillboardSet::getBillboardRotationType().
Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON or BBT_PERPENDICULAR_COMMON.
vec | The direction for all billboards. |
References Ogre::BillboardSet::setCommonDirection().
Gets the common direction for all billboards (BBT_ORIENTED_COMMON)
References Ogre::BillboardSet::getCommonDirection().
Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF or BBT_PERPENDICULAR_COMMON.
vec | The up-vector for all billboards. |
References Ogre::BillboardSet::setCommonUpVector().
Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF and BBT_PERPENDICULAR_COMMON)
References Ogre::BillboardSet::getCommonUpVector().
Set whether or not the BillboardSet will use point rendering rather than manually generated quads.
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:
You will almost certainly want to enable in your material pass both point attenuation and point sprites if you use this option.
References Ogre::BillboardSet::setPointRenderingEnabled().
Returns whether point rendering is enabled.
References Ogre::BillboardSet::isPointRenderingEnabled().
Gets the type of this renderer - must be implemented by subclasses.
Implements Ogre::ParticleSystemRenderer.
|
virtual |
Delegated to by ParticleSystem::_updateRenderQueue.
Implements Ogre::ParticleSystemRenderer.
|
inlinevirtual |
Required method to allow the renderer to communicate the Renderables it will be using to render the system to a visitor.
Implements Ogre::ParticleSystemRenderer.
References Ogre::BillboardSet::visitRenderables().
|
inlinevirtual |
Sets the material this renderer must use; called by ParticleSystem.
Implements Ogre::ParticleSystemRenderer.
References Ogre::BillboardSet::setMaterial().
Delegated to by ParticleSystem::_notifyCurrentCamera.
Implements Ogre::ParticleSystemRenderer.
References Ogre::BillboardSet::_notifyCurrentCamera().
Tells the renderer that the particle quota has changed.
Implements Ogre::ParticleSystemRenderer.
References Ogre::BillboardSet::setPoolSize().
|
inlinevirtual |
Delegated to by ParticleSystem::_notifyAttached.
Implements Ogre::ParticleSystemRenderer.
References Ogre::MovableObject::_notifyAttached().
|
inlinevirtual |
Tells the renderer that the particle default size has changed.
Implements Ogre::ParticleSystemRenderer.
References Ogre::BillboardSet::setDefaultDimensions().
Sets which render queue group this renderer should target with it's output.
Implements Ogre::ParticleSystemRenderer.
References Ogre::MovableObject::setRenderQueueGroup().
|
inlinevirtual |
Sets the render queue group and group priority this entity will be rendered through.
queueID | Enumerated value of the queue group to use. See the enum RenderQueueGroupID for what kind of values can be used here. |
priority | The priority within a group to use. |
Implements Ogre::ParticleSystemRenderer.
References Ogre::MovableObject::setRenderQueueGroupAndPriority().
Setting carried over from ParticleSystem.
Implements Ogre::ParticleSystemRenderer.
References Ogre::BillboardSet::setBillboardsInWorldSpace().
Gets the desired particles sort mode of this renderer.
Implements Ogre::ParticleSystemRenderer.
References Ogre::BillboardSet::_getSortMode().
|
inline |
Access BillboardSet in use.
|
overridevirtual |
Tells the Renderer about the ParticleSystem bounds.
Reimplemented from Ogre::ParticleSystemRenderer.