# 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-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
    00030 #ifndef __PanelOverlayElement_H__
    00031 #define __PanelOverlayElement_H__
    00032
    00033 #include "OgreOverlayContainer.h"
    00034
    00035 namespace Ogre {
    00036
    00037
    00053     class _OgreExport PanelOverlayElement : public OverlayContainer
    00054     {
    00055     public:
    00057         PanelOverlayElement(const String& name);
    00058         virtual ~PanelOverlayElement();
    00059
    00061         virtual void initialise(void);
    00062
    00069         void setTiling(Real x, Real y, ushort layer = 0);
    00070
    00071         Real getTileX(ushort layer = 0) const;
    00076         Real getTileY(ushort layer = 0) const;
    00077
    00079         void setUV(Real u1, Real v1, Real u2, Real v2);
    00080
    00082         void getUV(Real& u1, Real& v1, Real& u2, Real& v2) const;
    00083
    00087         void setTransparent(bool isTransparent);
    00088
    00090         bool isTransparent(void) const;
    00091
    00093         virtual const String& getTypeName(void) const;
    00095         void getRenderOperation(RenderOperation& op);
    00097         void setMaterialName(const String& matName);
    00099         void _updateRenderQueue(RenderQueue* queue);
    00100
    00101
    00103         class _OgrePrivate CmdTiling : public ParamCommand
    00104         {
    00105         public:
    00106             String doGet(const void* target) const;
    00107             void doSet(void* target, const String& val);
    00108         };
    00110         class _OgrePrivate CmdTransparent : public ParamCommand
    00111         {
    00112         public:
    00113             String doGet(const void* target) const;
    00114             void doSet(void* target, const String& val);
    00115         };
    00117         class _OgrePrivate CmdUVCoords : public ParamCommand
    00118         {
    00119         public:
    00120             String doGet(const void* target) const;
    00121             void doSet(void* target, const String& val);
    00122         };
    00123     protected:
    00124         // Flag indicating if this panel should be visual or just group things
    00125         bool mTransparent;
    00126         // Texture tiling
    00127         Real mTileX[OGRE_MAX_TEXTURE_LAYERS];
    00128         Real mTileY[OGRE_MAX_TEXTURE_LAYERS];
    00129         size_t mNumTexCoordsInBuffer;
    00130         Real mU1, mV1, mU2, mV2;
    00131
    00132         RenderOperation mRenderOp;
    00133
    00135         virtual void updatePositionGeometry(void);
    00136
    00138         virtual void updateTextureGeometry(void);
    00139
    00141         void addBaseParameters(void);
    00142
    00143         static String msTypeName;
    00144
    00145         // Command objects
    00146         static CmdTiling msCmdTiling;
    00147         static CmdTransparent msCmdTransparent;
    00148         static CmdUVCoords msCmdUVCoords;
    00149
    00150     };
    00151
    00152 }
    00153
    00154 #endif

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:18 2009