OGRE: OgreBillboardParticleRenderer.h Source File - OGRE Documentation

# 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 visitRenderables(Renderable::Visitor* visitor,
    00201             bool debugRenderables = false);
    00203         void _setMaterial(MaterialPtr& mat);
    00205         void _notifyCurrentCamera(Camera* cam);
    00207         void _notifyParticleRotated(void);
    00209         void _notifyParticleResized(void);
    00211         void _notifyParticleQuota(size_t quota);
    00213         void _notifyAttached(Node* parent, bool isTagPoint = false);
    00215         void _notifyDefaultDimensions(Real width, Real height);
    00217         void setRenderQueueGroup(uint8 queueID);
    00219         void setKeepParticlesInLocalSpace(bool keepLocal);
    00221         SortMode _getSortMode(void) const;
    00222
    00224         BillboardSet* getBillboardSet(void) const { return mBillboardSet; }
    00225
    00226     protected:
    00227         static CmdBillboardType msBillboardTypeCmd;
    00228         static CmdBillboardOrigin msBillboardOriginCmd;
    00229         static CmdBillboardRotationType msBillboardRotationTypeCmd;
    00230         static CmdCommonDirection msCommonDirectionCmd;
    00231         static CmdCommonUpVector msCommonUpVectorCmd;
    00232         static CmdPointRendering msPointRenderingCmd;
    00233         static CmdAccurateFacing msAccurateFacingCmd;
    00234
    00235
    00236     };
    00237
    00239     class _OgreExport BillboardParticleRendererFactory : public ParticleSystemRendererFactory
    00240     {
    00241     public:
    00243         const String& getType() const;
    00245         ParticleSystemRenderer* createInstance( const String& name );
    00247         void destroyInstance( ParticleSystemRenderer* inst);
    00248     };
    00249
    00250 }
    00251
    00252 #endif
    00253

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jul 26 11:32:16 2009