OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreBillboardParticleRenderer.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE 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 
36 namespace Ogre {
37 
53  {
54  protected:
57  public:
58  BillboardParticleRenderer( IdType id, ObjectMemoryManager *objectMemoryManager );
60 
63  {
64  public:
65  String doGet(const void* target) const;
66  void doSet(void* target, const String& val);
67  };
70  {
71  public:
72  String doGet(const void* target) const;
73  void doSet(void* target, const String& val);
74  };
77  {
78  public:
79  String doGet(const void* target) const;
80  void doSet(void* target, const String& val);
81  };
84  {
85  public:
86  String doGet(const void* target) const;
87  void doSet(void* target, const String& val);
88  };
91  {
92  public:
93  String doGet(const void* target) const;
94  void doSet(void* target, const String& val);
95  };
98  {
99  public:
100  String doGet(const void* target) const;
101  void doSet(void* target, const String& val);
102  };
105  {
106  public:
107  String doGet(const void* target) const;
108  void doSet(void* target, const String& val);
109  };
110 
121  void setBillboardType(BillboardType bbt);
122 
124  BillboardType getBillboardType(void) const;
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 
159  void setBillboardRotationType(BillboardRotationType rotationType);
160 
165  BillboardRotationType getBillboardRotationType(void) const;
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;
204  void _updateRenderQueue(RenderQueue* queue, Camera *camera, const Camera *lodCamera,
205  list<Particle*>::type& currentParticles, bool cullIndividually);
207  void visitRenderables(Renderable::Visitor* visitor,
208  bool debugRenderables = false);
210  void _setMaterial(MaterialPtr& mat);
212  void _notifyCurrentCamera(Camera* cam);
214  void _notifyParticleRotated(void);
216  void _notifyParticleResized(void);
218  void _notifyParticleQuota(size_t quota);
220  void _notifyAttached(Node* parent);
222  void _notifyDefaultDimensions(Real width, Real height);
224  void setRenderQueueGroup(uint8 queueID);
226  void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority);
228  void setKeepParticlesInLocalSpace(bool keepLocal);
230  SortMode _getSortMode(void) const;
231 
233  BillboardSet* getBillboardSet(void) const { return mBillboardSet; }
234 
235  protected:
243 
244 
245  };
246 
249  {
251 
252  public:
255 
257  const String& getType() const;
259  ParticleSystemRenderer* createInstance( const String &name );
261  void destroyInstance(ParticleSystemRenderer* ptr);
262  };
266 } // namespace Ogre
267 
268 #include "OgreHeaderSuffix.h"
269 
270 #endif // __BillboardParticleRenderer_H__
271 
unsigned char uint8
Definition: OgrePlatform.h:422
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:82
float Real
Software floating point type.
Abstract class defining the interface required to be implemented by classes which provide rendering c...
#define _OgreExport
Definition: OgrePlatform.h:255
BillboardRotationType
The rotation type of billboard.
Abstract class definition of a factory object for ParticleSystemRenderer.
Wrap-around class that contains multiple ArrayMemoryManager, one per render queue.
void setBillboardOrigin(BillboardOrigin origin)
Sets the point which acts as the origin point for all billboards in this set.
A collection of billboards (faces which are always facing the given direction) with the same (default...
static CmdBillboardRotationType msBillboardRotationTypeCmd
Factory class for BillboardParticleRenderer.
Command object for point rendering (see ParamCommand).
Ogre::uint32 IdType
Big projects with lots, lots of units for very long periods of time (MMORPGs?) may want to define thi...
Definition: OgreId.h:36
BillboardOrigin getBillboardOrigin(void) const
Gets the point which acts as the origin point for all billboards in this set.
#define _OgrePrivate
Definition: OgrePlatform.h:256
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:231
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
Specialisation of ParticleSystemRenderer to render particles using a BillboardSet.
Standard 3-dimensional vector.
Definition: OgreVector3.h:50
Command object for billboard origin (see ParamCommand).
unsigned short ushort
Command object for accurate facing(see ParamCommand).
Command object for common up-vector (see ParamCommand).
Class to manage the scene object rendering queue.
BillboardOrigin
Enum covering what exactly a billboard's position means (center, top-left etc).
_StringBase String
Definition: OgreCommon.h:53
Command object for billboard rotation type (see ParamCommand).
BillboardSet * mBillboardSet
The billboard set that's doing the rendering.
Command object for billboard type (see ParamCommand).
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:58
Command object for common direction (see ParamCommand).
BillboardType
The type of billboard to use.
Abstract class which is command object which gets/sets parameters.
BillboardSet * getBillboardSet(void) const
Access BillboardSet in use.