Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# 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-2006 Torus Knot Software Ltd
    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 You may alternatively use this source under the terms of a specific version of
    00025 the OGRE Unrestricted License provided you have obtained such a license from
    00026 Torus Knot Software Ltd.
    00027 -----------------------------------------------------------------------------
    00028 */
    00029 #ifndef __BillboardParticleRenderer_H__
    00030 #define __BillboardParticleRenderer_H__
    00031
    00032 #include "OgrePrerequisites.h"
    00033 #include "OgreParticleSystemRenderer.h"
    00034 #include "OgreBillboardSet.h"
    00035
    00036 namespace Ogre {
    00037
    00045     class _OgreExport BillboardParticleRenderer : public ParticleSystemRenderer
    00046     {
    00047     protected:
    00049         BillboardSet* mBillboardSet;
    00050     public:
    00051         BillboardParticleRenderer();
    00052         ~BillboardParticleRenderer();
    00053
    00055         class _OgrePrivate CmdBillboardType : public ParamCommand
    00056         {
    00057         public:
    00058             String doGet(const void* target) const;
    00059             void doSet(void* target, const String& val);
    00060         };
    00062         class _OgrePrivate CmdBillboardOrigin : public ParamCommand
    00063         {
    00064         public:
    00065             String doGet(const void* target) const;
    00066             void doSet(void* target, const String& val);
    00067         };
    00069         class _OgrePrivate CmdBillboardRotationType : public ParamCommand
    00070         {
    00071         public:
    00072             String doGet(const void* target) const;
    00073             void doSet(void* target, const String& val);
    00074         };
    00076         class _OgrePrivate CmdCommonDirection : public ParamCommand
    00077         {
    00078         public:
    00079             String doGet(const void* target) const;
    00080             void doSet(void* target, const String& val);
    00081         };
    00083         class _OgrePrivate CmdCommonUpVector : public ParamCommand
    00084         {
    00085         public:
    00086             String doGet(const void* target) const;
    00087             void doSet(void* target, const String& val);
    00088         };
    00090         class _OgrePrivate CmdPointRendering : public ParamCommand
    00091         {
    00092         public:
    00093             String doGet(const void* target) const;
    00094             void doSet(void* target, const String& val);
    00095         };
    00097         class _OgrePrivate CmdAccurateFacing : public ParamCommand
    00098         {
    00099         public:
    00100             String doGet(const void* target) const;
    00101             void doSet(void* target, const String& val);
    00102         };
    00103
    00114         void setBillboardType(BillboardType bbt);
    00115
    00117         BillboardType getBillboardType(void) const;
    00118
    00120         void setUseAccurateFacing(bool acc);
    00122         bool getUseAccurateFacing(void) const;
    00123
    00135         void setBillboardOrigin(BillboardOrigin origin) { mBillboardSet->setBillboardOrigin(origin); }
    00136
    00141         BillboardOrigin getBillboardOrigin(void) const { return mBillboardSet->getBillboardOrigin(); }
    00142
    00152         void setBillboardRotationType(BillboardRotationType rotationType);
    00153
    00158         BillboardRotationType getBillboardRotationType(void) const;
    00159
    00167         void setCommonDirection(const Vector3& vec);
    00168
    00170         const Vector3& getCommonDirection(void) const;
    00171
    00181         void setCommonUpVector(const Vector3& vec);
    00182
    00184         const Vector3& getCommonUpVector(void) const;
    00185
    00187         void setPointRenderingEnabled(bool enabled);
    00188
    00190         bool isPointRenderingEnabled(void) const;
    00191
    00192
    00193
    00195         const String& getType(void) const;
    00197         void _updateRenderQueue(RenderQueue* queue,
    00198             std::list<Particle*>& currentParticles, bool cullIndividually);
    00200         void _setMaterial(MaterialPtr& mat);
    00202         void _notifyCurrentCamera(Camera* cam);
    00204         void _notifyParticleRotated(void);
    00206         void _notifyParticleResized(void);
    00208         void _notifyParticleQuota(size_t quota);
    00210         void _notifyAttached(Node* parent, bool isTagPoint = false);
    00212         void _notifyDefaultDimensions(Real width, Real height);
    00214         void setRenderQueueGroup(uint8 queueID);
    00216         void setKeepParticlesInLocalSpace(bool keepLocal);
    00218         SortMode _getSortMode(void) const;
    00219
    00221         BillboardSet* getBillboardSet(void) const { return mBillboardSet; }
    00222
    00223     protected:
    00224         static CmdBillboardType msBillboardTypeCmd;
    00225         static CmdBillboardOrigin msBillboardOriginCmd;
    00226         static CmdBillboardRotationType msBillboardRotationTypeCmd;
    00227         static CmdCommonDirection msCommonDirectionCmd;
    00228         static CmdCommonUpVector msCommonUpVectorCmd;
    00229         static CmdPointRendering msPointRenderingCmd;
    00230         static CmdAccurateFacing msAccurateFacingCmd;
    00231
    00232
    00233     };
    00234
    00236     class _OgreExport BillboardParticleRendererFactory : public ParticleSystemRendererFactory
    00237     {
    00238     public:
    00240         const String& getType() const;
    00242         ParticleSystemRenderer* createInstance( const String& name );
    00244         void destroyInstance( ParticleSystemRenderer* inst);
    00245     };
    00246
    00247 }
    00248
    00249 #endif
    00250

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Mar 6 09:46:25 2008