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

OgrePanelOverlayElement.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 
00026 #ifndef __PanelOverlayElement_H__
00027 #define __PanelOverlayElement_H__
00028 
00029 #include "OgreOverlayContainer.h"
00030 
00031 namespace Ogre {
00032 
00033 
00049     class _OgreExport PanelOverlayElement : public OverlayContainer
00050     {
00051     public:
00053         PanelOverlayElement(const String& name);
00054         virtual ~PanelOverlayElement();
00055 
00057         virtual void initialise(void);
00058 
00065         void setTiling(Real x, Real y, ushort layer = 0);
00066 
00067         Real getTileX(ushort layer = 0) const;
00072         Real getTileY(ushort layer = 0) const;
00073 
00075         void setUV(Real u1, Real v1, Real u2, Real v2);
00076 
00078         void getUV(Real& u1, Real& v1, Real& u2, Real& v2) const;
00079 
00083         void setTransparent(bool isTransparent);
00084 
00086         bool isTransparent(void) const;
00087 
00089         virtual const String& getTypeName(void) const;
00091         void getRenderOperation(RenderOperation& op);
00093         void setMaterialName(const String& matName);
00095         void _updateRenderQueue(RenderQueue* queue);
00096 
00097 
00099         class _OgrePrivate CmdTiling : public ParamCommand
00100         {
00101         public:
00102             String doGet(const void* target) const;
00103             void doSet(void* target, const String& val);
00104         };
00106         class _OgrePrivate CmdTransparent : public ParamCommand
00107         {
00108         public:
00109             String doGet(const void* target) const;
00110             void doSet(void* target, const String& val);
00111         };
00113         class _OgrePrivate CmdUVCoords : public ParamCommand
00114         {
00115         public:
00116             String doGet(const void* target) const;
00117             void doSet(void* target, const String& val);
00118         };
00119     protected:
00120         // Flag indicating if this panel should be visual or just group things
00121         bool mTransparent;
00122         // Texture tiling
00123         Real mTileX[OGRE_MAX_TEXTURE_LAYERS];
00124         Real mTileY[OGRE_MAX_TEXTURE_LAYERS];
00125         size_t mNumTexCoordsInBuffer;
00126         Real mU1, mV1, mU2, mV2;
00127 
00128         RenderOperation mRenderOp;
00129 
00131         virtual void updatePositionGeometry(void);
00132 
00134         virtual void updateTextureGeometry(void);
00135 
00137         void addBaseParameters(void);
00138 
00139         static String msTypeName;
00140 
00141         // Command objects
00142         static CmdTiling msCmdTiling;
00143         static CmdTransparent msCmdTransparent;
00144         static CmdUVCoords msCmdUVCoords;
00145 
00146     };
00147 
00148 }
00149 
00150 #endif

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:37:45 2006