OGRE  1.8
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-2013 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 
35 namespace Ogre {
36 
52  {
53  protected:
56  public:
59 
62  {
63  public:
64  String doGet(const void* target) const;
65  void doSet(void* target, const String& val);
66  };
69  {
70  public:
71  String doGet(const void* target) const;
72  void doSet(void* target, const String& val);
73  };
76  {
77  public:
78  String doGet(const void* target) const;
79  void doSet(void* target, const String& val);
80  };
83  {
84  public:
85  String doGet(const void* target) const;
86  void doSet(void* target, const String& val);
87  };
90  {
91  public:
92  String doGet(const void* target) const;
93  void doSet(void* target, const String& val);
94  };
97  {
98  public:
99  String doGet(const void* target) const;
100  void doSet(void* target, const String& val);
101  };
104  {
105  public:
106  String doGet(const void* target) const;
107  void doSet(void* target, const String& val);
108  };
109 
120  void setBillboardType(BillboardType bbt);
121 
123  BillboardType getBillboardType(void) const;
124 
126  void setUseAccurateFacing(bool acc);
128  bool getUseAccurateFacing(void) const;
129 
141  void setBillboardOrigin(BillboardOrigin origin) { mBillboardSet->setBillboardOrigin(origin); }
142 
147  BillboardOrigin getBillboardOrigin(void) const { return mBillboardSet->getBillboardOrigin(); }
148 
158  void setBillboardRotationType(BillboardRotationType rotationType);
159 
164  BillboardRotationType getBillboardRotationType(void) const;
165 
173  void setCommonDirection(const Vector3& vec);
174 
176  const Vector3& getCommonDirection(void) const;
177 
187  void setCommonUpVector(const Vector3& vec);
188 
190  const Vector3& getCommonUpVector(void) const;
191 
193  void setPointRenderingEnabled(bool enabled);
194 
196  bool isPointRenderingEnabled(void) const;
197 
198 
199 
201  const String& getType(void) const;
203  void _updateRenderQueue(RenderQueue* queue,
204  list<Particle*>::type& currentParticles, bool cullIndividually);
206  void visitRenderables(Renderable::Visitor* visitor,
207  bool debugRenderables = false);
209  void _setMaterial(MaterialPtr& mat);
211  void _notifyCurrentCamera(Camera* cam);
213  void _notifyParticleRotated(void);
215  void _notifyParticleResized(void);
217  void _notifyParticleQuota(size_t quota);
219  void _notifyAttached(Node* parent, bool isTagPoint = false);
221  void _notifyDefaultDimensions(Real width, Real height);
223  void setRenderQueueGroup(uint8 queueID);
225  void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority);
227  void setKeepParticlesInLocalSpace(bool keepLocal);
229  SortMode _getSortMode(void) const;
230 
232  BillboardSet* getBillboardSet(void) const { return mBillboardSet; }
233 
234  protected:
242 
243 
244  };
245 
248  {
249  public:
251  const String& getType() const;
253  ParticleSystemRenderer* createInstance( const String& name );
255  void destroyInstance( ParticleSystemRenderer* inst);
256  };
260 }
261 
262 #endif
263 
unsigned char uint8
Definition: OgrePlatform.h:272
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
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:233
BillboardRotationType
The rotation type of billboard.
Abstract class definition of a factory object for ParticleSystemRenderer.
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).
BillboardOrigin getBillboardOrigin(void) const
Gets the point which acts as the origin point for all billboards in this set.
#define _OgrePrivate
Definition: OgrePlatform.h:234
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:289
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:51
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
Command object for billboard rotation type (see ParamCommand).
Specialisation of SharedPtr to allow SharedPtr to be assigned to MaterialPtr.
Definition: OgreMaterial.h:688
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:63
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.