OgreBillboardParticleRenderer.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __BillboardParticleRenderer_H__
#define __BillboardParticleRenderer_H__
#include "OgrePrerequisites.h"
#include "OgreParticleSystemRenderer.h"
#include "OgreBillboardSet.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class _OgreExport BillboardParticleRenderer : public ParticleSystemRenderer
{
protected:
BillboardSet* mBillboardSet;
public:
BillboardParticleRenderer();
~BillboardParticleRenderer();
class _OgrePrivate CmdBillboardType : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
class _OgrePrivate CmdBillboardOrigin : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
class _OgrePrivate CmdBillboardRotationType : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
class _OgrePrivate CmdCommonDirection : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
class _OgrePrivate CmdCommonUpVector : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
class _OgrePrivate CmdPointRendering : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
class _OgrePrivate CmdAccurateFacing : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
void setBillboardType(BillboardType bbt);
BillboardType getBillboardType(void) const;
void setUseAccurateFacing(bool acc);
bool getUseAccurateFacing(void) const;
void setBillboardOrigin(BillboardOrigin origin) { mBillboardSet->setBillboardOrigin(origin); }
BillboardOrigin getBillboardOrigin(void) const { return mBillboardSet->getBillboardOrigin(); }
void setBillboardRotationType(BillboardRotationType rotationType);
BillboardRotationType getBillboardRotationType(void) const;
void setCommonDirection(const Vector3& vec);
const Vector3& getCommonDirection(void) const;
void setCommonUpVector(const Vector3& vec);
const Vector3& getCommonUpVector(void) const;
void setPointRenderingEnabled(bool enabled);
bool isPointRenderingEnabled(void) const;
const String& getType(void) const;
void _updateRenderQueue(RenderQueue* queue,
list<Particle*>::type& currentParticles, bool cullIndividually);
void visitRenderables(Renderable::Visitor* visitor,
bool debugRenderables = false);
void _setMaterial(MaterialPtr& mat);
void _notifyCurrentCamera(Camera* cam);
void _notifyParticleRotated(void);
void _notifyParticleResized(void);
void _notifyParticleQuota(size_t quota);
void _notifyAttached(Node* parent, bool isTagPoint = false);
void _notifyDefaultDimensions(Real width, Real height);
void setRenderQueueGroup(uint8 queueID);
void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority);
void setKeepParticlesInLocalSpace(bool keepLocal);
SortMode _getSortMode(void) const;
BillboardSet* getBillboardSet(void) const { return mBillboardSet; }
protected:
static CmdBillboardType msBillboardTypeCmd;
static CmdBillboardOrigin msBillboardOriginCmd;
static CmdBillboardRotationType msBillboardRotationTypeCmd;
static CmdCommonDirection msCommonDirectionCmd;
static CmdCommonUpVector msCommonUpVectorCmd;
static CmdPointRendering msPointRenderingCmd;
static CmdAccurateFacing msAccurateFacingCmd;
};
class _OgreExport BillboardParticleRendererFactory : public ParticleSystemRendererFactory
{
public:
const String& getType() const;
ParticleSystemRenderer* createInstance( const String& name );
void destroyInstance(ParticleSystemRenderer* ptr);
};
} // namespace Ogre
#include "OgreHeaderSuffix.h"
#endif // __BillboardParticleRenderer_H__
Ogre::BillboardParticleRenderer::msBillboardTypeCmd
static CmdBillboardType msBillboardTypeCmd
Definition: OgreBillboardParticleRenderer.h:236
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::BillboardParticleRenderer::CmdCommonUpVector
Command object for common up-vector (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:90
Ogre::list
Definition: OgrePrerequisites.h:505
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::BillboardParticleRenderer::CmdCommonDirection
Command object for common direction (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:83
Ogre::BillboardParticleRendererFactory
Factory class for BillboardParticleRenderer.
Definition: OgreBillboardParticleRenderer.h:248
Ogre::BillboardParticleRenderer::mBillboardSet
BillboardSet * mBillboardSet
The billboard set that&#39;s doing the rendering.
Definition: OgreBillboardParticleRenderer.h:56
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::BillboardParticleRenderer::CmdBillboardRotationType
Command object for billboard rotation type (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:76
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:92
Ogre::BillboardParticleRenderer::msBillboardRotationTypeCmd
static CmdBillboardRotationType msBillboardRotationTypeCmd
Definition: OgreBillboardParticleRenderer.h:238
Ogre::BillboardOrigin
BillboardOrigin
Enum covering what exactly a billboard&#39;s position means (center, top-left etc).
Definition: OgreBillboardSet.h:54
Ogre::BillboardParticleRenderer::msBillboardOriginCmd
static CmdBillboardOrigin msBillboardOriginCmd
Definition: OgreBillboardParticleRenderer.h:237
Ogre::BillboardParticleRenderer::msCommonUpVectorCmd
static CmdCommonUpVector msCommonUpVectorCmd
Definition: OgreBillboardParticleRenderer.h:240
Ogre::BillboardParticleRenderer::CmdAccurateFacing
Command object for accurate facing(see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:104
Ogre::BillboardParticleRenderer::CmdBillboardType
Command object for billboard type (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:62
Ogre::BillboardSet::getBillboardOrigin
virtual BillboardOrigin getBillboardOrigin(void) const
Gets the point which acts as the origin point for all billboards in this set.
Ogre::BillboardRotationType
BillboardRotationType
The rotation type of billboard.
Definition: OgreBillboardSet.h:67
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:51
Ogre::SortMode
SortMode
Sort mode for billboard-set and particle-system.
Definition: OgreCommon.h:286
Ogre::ParticleSystemRendererFactory
Abstract class definition of a factory object for ParticleSystemRenderer.
Definition: OgreParticleSystemRenderer.h:133
OgrePrerequisites.h
_OgrePrivate
#define _OgrePrivate
Definition: OgrePlatform.h:258
Ogre::ParticleSystemRenderer
Abstract class defining the interface required to be implemented by classes which provide rendering c...
Definition: OgreParticleSystemRenderer.h:49
Ogre::BillboardParticleRenderer::msPointRenderingCmd
static CmdPointRendering msPointRenderingCmd
Definition: OgreBillboardParticleRenderer.h:241
OgreBillboardSet.h
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
Definition: OgreRenderable.h:377
Ogre::Node
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:64
Ogre::BillboardParticleRenderer
Specialisation of ParticleSystemRenderer to render particles using a BillboardSet.
Definition: OgreBillboardParticleRenderer.h:52
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::BillboardParticleRenderer::msCommonDirectionCmd
static CmdCommonDirection msCommonDirectionCmd
Definition: OgreBillboardParticleRenderer.h:239
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
OgreHeaderSuffix.h
Ogre::BillboardSet::setBillboardOrigin
virtual void setBillboardOrigin(BillboardOrigin origin)
Sets the point which acts as the origin point for all billboards in this set.
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::SharedPtr< Material >
OgreHeaderPrefix.h
Ogre::BillboardParticleRenderer::CmdPointRendering
Command object for point rendering (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:97
Ogre::BillboardSet
A collection of billboards (faces which are always facing the given direction) with the same (default...
Definition: OgreBillboardSet.h:110
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::ParamCommand
Abstract class which is command object which gets/sets parameters.
Definition: OgreStringInterface.h:79
Ogre::BillboardParticleRenderer::CmdBillboardOrigin
Command object for billboard origin (see ParamCommand).
Definition: OgreBillboardParticleRenderer.h:69
Ogre::BillboardType
BillboardType
The type of billboard to use.
Definition: OgreBillboardSet.h:75
Ogre::BillboardParticleRenderer::getBillboardSet
BillboardSet * getBillboardSet(void) const
Access BillboardSet in use.
Definition: OgreBillboardParticleRenderer.h:233
OgreParticleSystemRenderer.h
Ogre::BillboardParticleRenderer::msAccurateFacingCmd
static CmdAccurateFacing msAccurateFacingCmd
Definition: OgreBillboardParticleRenderer.h:242

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.