# OgreBillboardParticleRenderer.h

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004 (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2005 The OGRE Team
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This program is free software; you can redistribute it and/or modify it under
    00011 the terms of the GNU Lesser General Public License as published by the Free Software
    00012 Foundation; either version 2 of the License, or (at your option) any later
    00013 version.
    00014
    00015 This program is distributed in the hope that it will be useful, but WITHOUT
    00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License along with
    00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00022 http://www.gnu.org/copyleft/lesser.txt.
    00023 -----------------------------------------------------------------------------
    00024 */
    00025 #ifndef __BillboardParticleRenderer_H__
    00026 #define __BillboardParticleRenderer_H__
    00027
    00028 #include "OgrePrerequisites.h"
    00029 #include "OgreParticleSystemRenderer.h"
    00030 #include "OgreBillboardSet.h"
    00031
    00032 namespace Ogre {
    00033
    00041     class _OgreExport BillboardParticleRenderer : public ParticleSystemRenderer
    00042     {
    00043     protected:
    00045         BillboardSet* mBillboardSet;
    00046     public:
    00047         BillboardParticleRenderer();
    00048         ~BillboardParticleRenderer();
    00049
    00051         class _OgrePrivate CmdBillboardType : public ParamCommand
    00052         {
    00053         public:
    00054             String doGet(const void* target) const;
    00055             void doSet(void* target, const String& val);
    00056         };
    00058         class _OgrePrivate CmdBillboardOrigin : public ParamCommand
    00059         {
    00060         public:
    00061             String doGet(const void* target) const;
    00062             void doSet(void* target, const String& val);
    00063         };
    00065         class _OgrePrivate CmdBillboardRotationType : public ParamCommand
    00066         {
    00067         public:
    00068             String doGet(const void* target) const;
    00069             void doSet(void* target, const String& val);
    00070         };
    00072         class _OgrePrivate CmdCommonDirection : public ParamCommand
    00073         {
    00074         public:
    00075             String doGet(const void* target) const;
    00076             void doSet(void* target, const String& val);
    00077         };
    00079         class _OgrePrivate CmdCommonUpVector : public ParamCommand
    00080         {
    00081         public:
    00082             String doGet(const void* target) const;
    00083             void doSet(void* target, const String& val);
    00084         };
    00086         class _OgrePrivate CmdPointRendering : public ParamCommand
    00087         {
    00088         public:
    00089             String doGet(const void* target) const;
    00090             void doSet(void* target, const String& val);
    00091         };
    00093         class _OgrePrivate CmdAccurateFacing : public ParamCommand
    00094         {
    00095         public:
    00096             String doGet(const void* target) const;
    00097             void doSet(void* target, const String& val);
    00098         };
    00099
    00110         void setBillboardType(BillboardType bbt);
    00111
    00113         BillboardType getBillboardType(void) const;
    00114
    00116         void setUseAccurateFacing(bool acc);
    00118         bool getUseAccurateFacing(void) const;
    00119
    00131         void setBillboardOrigin(BillboardOrigin origin) { mBillboardSet->setBillboardOrigin(origin); }
    00132
    00137         BillboardOrigin getBillboardOrigin(void) const { return mBillboardSet->getBillboardOrigin(); }
    00138
    00148         void setBillboardRotationType(BillboardRotationType rotationType);
    00149
    00154         BillboardRotationType getBillboardRotationType(void) const;
    00155
    00163         void setCommonDirection(const Vector3& vec);
    00164
    00166         const Vector3& getCommonDirection(void) const;
    00167
    00177         void setCommonUpVector(const Vector3& vec);
    00178
    00180         const Vector3& getCommonUpVector(void) const;
    00181
    00183         void setPointRenderingEnabled(bool enabled);
    00184
    00186         bool isPointRenderingEnabled(void) const;
    00187
    00188
    00189
    00191         const String& getType(void) const;
    00193         void _updateRenderQueue(RenderQueue* queue,
    00194             std::list<Particle*>& currentParticles, bool cullIndividually);
    00196         void _setMaterial(MaterialPtr& mat);
    00198         void _notifyCurrentCamera(Camera* cam);
    00200         void _notifyParticleRotated(void);
    00202         void _notifyParticleResized(void);
    00204         void _notifyParticleQuota(size_t quota);
    00206         void _notifyAttached(Node* parent, bool isTagPoint = false);
    00208         void _notifyDefaultDimensions(Real width, Real height);
    00210         void setRenderQueueGroup(uint8 queueID);
    00212         void setKeepParticlesInLocalSpace(bool keepLocal);
    00214         SortMode _getSortMode(void) const;
    00215
    00217         BillboardSet* getBillboardSet(void) const { return mBillboardSet; }
    00218
    00219     protected:
    00220         static CmdBillboardType msBillboardTypeCmd;
    00221         static CmdBillboardOrigin msBillboardOriginCmd;
    00222         static CmdBillboardRotationType msBillboardRotationTypeCmd;
    00223         static CmdCommonDirection msCommonDirectionCmd;
    00224         static CmdCommonUpVector msCommonUpVectorCmd;
    00225         static CmdPointRendering msPointRenderingCmd;
    00226         static CmdAccurateFacing msAccurateFacingCmd;
    00227
    00228
    00229     };
    00230
    00232     class _OgreExport BillboardParticleRendererFactory : public ParticleSystemRendererFactory
    00233     {
    00234     public:
    00236         const String& getType() const;
    00238         ParticleSystemRenderer* createInstance( const String& name );
    00240         void destroyInstance( ParticleSystemRenderer* inst);
    00241     };
    00242
    00243 }
    00244
    00245 #endif
    00246

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 17 15:39:07 2006