OGRE  1.9.0
OgreBillboardParticleRenderer.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4(Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2014 Torus Knot Software Ltd
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25THE SOFTWARE.
26-----------------------------------------------------------------------------
27*/
28#ifndef __BillboardParticleRenderer_H__
29#define __BillboardParticleRenderer_H__
30
31#include "OgrePrerequisites.h"
33#include "OgreBillboardSet.h"
34#include "OgreHeaderPrefix.h"
35
36namespace Ogre {
37
44
53 {
54 protected:
57 public:
60
63 {
64 public:
65 String doGet(const void* target) const;
66 void doSet(void* target, const String& val);
67 };
68
70 {
71 public:
72 String doGet(const void* target) const;
73 void doSet(void* target, const String& val);
74 };
75
77 {
78 public:
79 String doGet(const void* target) const;
80 void doSet(void* target, const String& val);
81 };
82
84 {
85 public:
86 String doGet(const void* target) const;
87 void doSet(void* target, const String& val);
88 };
89
91 {
92 public:
93 String doGet(const void* target) const;
94 void doSet(void* target, const String& val);
95 };
96
98 {
99 public:
100 String doGet(const void* target) const;
101 void doSet(void* target, const String& val);
102 };
103
105 {
106 public:
107 String doGet(const void* target) const;
108 void doSet(void* target, const String& val);
109 };
110
122
125
127 void setUseAccurateFacing(bool acc);
129 bool getUseAccurateFacing(void) const;
130
142 void setBillboardOrigin(BillboardOrigin origin) { mBillboardSet->setBillboardOrigin(origin); }
143
148 BillboardOrigin getBillboardOrigin(void) const { return mBillboardSet->getBillboardOrigin(); }
149
160
166
174 void setCommonDirection(const Vector3& vec);
175
177 const Vector3& getCommonDirection(void) const;
178
188 void setCommonUpVector(const Vector3& vec);
189
191 const Vector3& getCommonUpVector(void) const;
192
194 void setPointRenderingEnabled(bool enabled);
195
197 bool isPointRenderingEnabled(void) const;
198
199
200
202 const String& getType(void) const;
205 list<Particle*>::type& currentParticles, bool cullIndividually);
208 bool debugRenderables = false);
218 void _notifyParticleQuota(size_t quota);
220 void _notifyAttached(Node* parent, bool isTagPoint = false);
222 void _notifyDefaultDimensions(Real width, Real height);
228 void setKeepParticlesInLocalSpace(bool keepLocal);
231
234
235 protected:
243
244
245 };
246
258
260
261} // namespace Ogre
262
263#include "OgreHeaderSuffix.h"
264
265#endif // __BillboardParticleRenderer_H__
266
#define _OgreExport
#define _OgrePrivate
Factory class for BillboardParticleRenderer.
ParticleSystemRenderer * createInstance(const String &name)
Creates a new object.
void destroyInstance(ParticleSystemRenderer *ptr)
Destroys an object which was created by this factory.
const String & getType() const
Returns the factory type.
Command object for accurate facing(see ParamCommand).
String doGet(const void *target) const
void doSet(void *target, const String &val)
Command object for billboard origin (see ParamCommand).
void doSet(void *target, const String &val)
Command object for billboard rotation type (see ParamCommand).
void doSet(void *target, const String &val)
Command object for billboard type (see ParamCommand).
String doGet(const void *target) const
void doSet(void *target, const String &val)
Command object for common direction (see ParamCommand).
void doSet(void *target, const String &val)
Command object for common up-vector (see ParamCommand).
String doGet(const void *target) const
void doSet(void *target, const String &val)
Command object for point rendering (see ParamCommand).
String doGet(const void *target) const
void doSet(void *target, const String &val)
BillboardOrigin getBillboardOrigin(void) const
Gets the point which acts as the origin point for all billboards in this set.
const Vector3 & getCommonDirection(void) const
Gets the common direction for all billboards (BBT_ORIENTED_COMMON)
void _notifyDefaultDimensions(Real width, Real height)
Tells the renderer that the particle default size has changed.
BillboardSet * mBillboardSet
The billboard set that's doing the rendering.
void _notifyParticleRotated(void)
Optional callback notified when particles are rotated.
void setUseAccurateFacing(bool acc)
Sets whether or not billboards should use an 'accurate' facing model based on the vector from each bi...
void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority)
Sets the render queue group and group priority this entity will be rendered through.
BillboardType getBillboardType(void) const
Returns the billboard type in use.
void setBillboardRotationType(BillboardRotationType rotationType)
Sets billboard rotation type.
void setPointRenderingEnabled(bool enabled)
Set whether or not the BillboardSet will use point rendering rather than manually generated quads.
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 s...
void _notifyParticleResized(void)
Optional callback notified when particles are resized individually.
void setKeepParticlesInLocalSpace(bool keepLocal)
Setting carried over from ParticleSystem.
BillboardSet * getBillboardSet(void) const
Access BillboardSet in use.
SortMode _getSortMode(void) const
Gets the desired particles sort mode of this renderer.
void _setMaterial(MaterialPtr &mat)
Sets the material this renderer must use; called by ParticleSystem.
const Vector3 & getCommonUpVector(void) const
Gets the common up-vector for all billboards (BBT_PERPENDICULAR_SELF)
static CmdBillboardRotationType msBillboardRotationTypeCmd
bool getUseAccurateFacing(void) const
Gets whether or not billboards use an 'accurate' facing model based on the vector from each billboard...
void _notifyParticleQuota(size_t quota)
Tells the renderer that the particle quota has changed.
void _updateRenderQueue(RenderQueue *queue, list< Particle * >::type &currentParticles, bool cullIndividually)
Delegated to by ParticleSystem::_updateRenderQueue.
void setRenderQueueGroup(uint8 queueID)
Sets which render queue group this renderer should target with it's output.
void _notifyCurrentCamera(Camera *cam)
Delegated to by ParticleSystem::_notifyCurrentCamera.
void setCommonUpVector(const Vector3 &vec)
Use this to specify the common up-vector given to billboards of type BBT_PERPENDICULAR_SELF.
void _notifyAttached(Node *parent, bool isTagPoint=false)
Delegated to by ParticleSystem::_notifyAttached.
bool isPointRenderingEnabled(void) const
Returns whether point rendering is enabled.
BillboardRotationType getBillboardRotationType(void) const
Gets billboard rotation type.
const String & getType(void) const
Gets the type of this renderer - must be implemented by subclasses.
void setCommonDirection(const Vector3 &vec)
Use this to specify the common direction given to billboards of type BBT_ORIENTED_COMMON.
void setBillboardOrigin(BillboardOrigin origin)
Sets the point which acts as the origin point for all billboards in this set.
void setBillboardType(BillboardType bbt)
Sets the type of billboard to render.
A collection of billboards (faces which are always facing the given direction) with the same (default...
A viewpoint from which the scene will be rendered.
Definition OgreCamera.h:87
Class representing a general-purpose node an articulated scene graph.
Definition OgreNode.h:65
Abstract class which is command object which gets/sets parameters.
Abstract class definition of a factory object for ParticleSystemRenderer.
Abstract class defining the interface required to be implemented by classes which provide rendering c...
Class to manage the scene object rendering queue.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Standard 3-dimensional vector.
Definition OgreVector3.h:52
BillboardOrigin
Enum covering what exactly a billboard's position means (center, top-left etc).
BillboardRotationType
The rotation type of billboard.
BillboardType
The type of billboard to use.
SortMode
Sort mode for billboard-set and particle-system.
Definition OgreCommon.h:287
unsigned char uint8
SharedPtr< Material > MaterialPtr
float Real
Software floating point type.
_StringBase String
unsigned short ushort
std::list< T, A > type