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 #include "OgreHeaderPrefix.h"
35 
36 namespace Ogre {
37 
53  {
54  protected:
57  public:
60 
62  class _OgrePrivate CmdBillboardType : public ParamCommand
63  {
64  public:
65  String doGet(const void* target) const;
66  void doSet(void* target, const String& val);
67  };
69  class _OgrePrivate CmdBillboardOrigin : public ParamCommand
70  {
71  public:
72  String doGet(const void* target) const;
73  void doSet(void* target, const String& val);
74  };
76  class _OgrePrivate CmdBillboardRotationType : public ParamCommand
77  {
78  public:
79  String doGet(const void* target) const;
80  void doSet(void* target, const String& val);
81  };
83  class _OgrePrivate CmdCommonDirection : public ParamCommand
84  {
85  public:
86  String doGet(const void* target) const;
87  void doSet(void* target, const String& val);
88  };
90  class _OgrePrivate CmdCommonUpVector : public ParamCommand
91  {
92  public:
93  String doGet(const void* target) const;
94  void doSet(void* target, const String& val);
95  };
97  class _OgrePrivate CmdPointRendering : public ParamCommand
98  {
99  public:
100  String doGet(const void* target) const;
101  void doSet(void* target, const String& val);
102  };
104  class _OgrePrivate CmdAccurateFacing : public ParamCommand
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,
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, bool isTagPoint = false);
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  {
250  public:
252  const String& getType() const;
254  ParticleSystemRenderer* createInstance( const String& name );
256  void destroyInstance(ParticleSystemRenderer* ptr);
257  };
261 } // namespace Ogre
262 
263 #include "OgreHeaderSuffix.h"
264 
265 #endif // __BillboardParticleRenderer_H__
266 
OgreHeaderSuffix.h
Ogre::BillboardParticleRenderer::CmdBillboardOrigin
Command object for billboard origin (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:69
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::BillboardParticleRenderer::msBillboardRotationTypeCmd
static CmdBillboardRotationType msBillboardRotationTypeCmd
Definition: OgreBillboardParticleRenderer.h:238
Ogre::BillboardParticleRenderer::msBillboardTypeCmd
static CmdBillboardType msBillboardTypeCmd
Definition: OgreBillboardParticleRenderer.h:236
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
Ogre::BillboardType
BillboardType
The type of billboard to use.
Definition: OgreBillboardSet.h:75
Ogre::BillboardParticleRenderer::mBillboardSet
BillboardSet * mBillboardSet
The billboard set that's doing the rendering.
Definition: OgreBillboardParticleRenderer.h:56
Ogre::BillboardSet::setBillboardOrigin
virtual void setBillboardOrigin(BillboardOrigin origin)
Sets the point which acts as the origin point for all billboards in this set.
Ogre::BillboardParticleRendererFactory
Factory class for BillboardParticleRenderer.
Definition: OgreBillboardParticleRenderer.h:248
Ogre::BillboardParticleRenderer::CmdCommonDirection
Command object for common direction (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:83
Ogre::BillboardParticleRenderer::getBillboardOrigin
BillboardOrigin getBillboardOrigin(void) const
Gets the point which acts as the origin point for all billboards in this set.
Definition: OgreBillboardParticleRenderer.h:148
Ogre::ParticleSystemRenderer
Abstract class defining the interface required to be implemented by classes which provide rendering c...
Definition: OgreParticleSystemRenderer.h:49
Ogre::BillboardParticleRenderer
Specialisation of ParticleSystemRenderer to render particles using a BillboardSet.
Definition: OgreBillboardParticleRenderer.h:52
Ogre::BillboardParticleRenderer::msCommonUpVectorCmd
static CmdCommonUpVector msCommonUpVectorCmd
Definition: OgreBillboardParticleRenderer.h:240
Ogre::BillboardParticleRenderer::CmdBillboardType
Command object for billboard type (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:62
Ogre::BillboardSet
A collection of billboards (faces which are always facing the given direction) with the same (default...
Definition: OgreBillboardSet.h:110
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::SortMode
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:286
Ogre::ParamCommand
Abstract class which is command object which gets/sets parameters.
Definition: OgreStringInterface.h:79
Ogre::BillboardParticleRenderer::msBillboardOriginCmd
static CmdBillboardOrigin msBillboardOriginCmd
Definition: OgreBillboardParticleRenderer.h:237
Ogre::BillboardParticleRenderer::msAccurateFacingCmd
static CmdAccurateFacing msAccurateFacingCmd
Definition: OgreBillboardParticleRenderer.h:242
OgreHeaderPrefix.h
Ogre::list
Definition: OgrePrerequisites.h:505
Ogre::BillboardParticleRenderer::CmdCommonUpVector
Command object for common up-vector (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:90
OgrePrerequisites.h
Ogre::BillboardParticleRenderer::CmdPointRendering
Command object for point rendering (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:97
Ogre::BillboardParticleRenderer::getBillboardSet
BillboardSet * getBillboardSet(void) const
Access BillboardSet in use.
Definition: OgreBillboardParticleRenderer.h:233
Ogre::BillboardOrigin
BillboardOrigin
Enum covering what exactly a billboard's position means (center, top-left etc).
Definition: OgreBillboardSet.h:54
Ogre::BillboardRotationType
BillboardRotationType
The rotation type of billboard.
Definition: OgreBillboardSet.h:67
Ogre::BillboardParticleRenderer::msCommonDirectionCmd
static CmdCommonDirection msCommonDirectionCmd
Definition: OgreBillboardParticleRenderer.h:239
Ogre::SharedPtr< Material >
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::ParticleSystemRendererFactory
Abstract class definition of a factory object for ParticleSystemRenderer.
Definition: OgreParticleSystemRenderer.h:133
OgreParticleSystemRenderer.h
Ogre::BillboardParticleRenderer::setBillboardOrigin
void setBillboardOrigin(BillboardOrigin origin)
Sets the point which acts as the origin point for all billboards in this set.
Definition: OgreBillboardParticleRenderer.h:142
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Definition: OgreRenderable.h:377
Ogre::BillboardSet::getBillboardOrigin
virtual BillboardOrigin getBillboardOrigin(void) const
Gets the point which acts as the origin point for all billboards in this set.
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::BillboardParticleRenderer::msPointRenderingCmd
static CmdPointRendering msPointRenderingCmd
Definition: OgreBillboardParticleRenderer.h:241
Ogre::Node
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:64
Ogre::BillboardParticleRenderer::CmdAccurateFacing
Command object for accurate facing(see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:104
OgreBillboardSet.h
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:92
Ogre::BillboardParticleRenderer::CmdBillboardRotationType
Command object for billboard rotation type (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:76

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15