OgrePanelOverlayElement.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __PanelOverlayElement_H__
#define __PanelOverlayElement_H__
#include "OgreOverlayContainer.h"
namespace Ogre {
class _OgreOverlayExport PanelOverlayElement : public OverlayContainer
{
public:
PanelOverlayElement(const String& name);
virtual ~PanelOverlayElement();
virtual void initialise(void);
void setTiling(Real x, Real y, ushort layer = 0);
Real getTileX(ushort layer = 0) const;
Real getTileY(ushort layer = 0) const;
void setUV(Real u1, Real v1, Real u2, Real v2);
void getUV(Real& u1, Real& v1, Real& u2, Real& v2) const;
void setTransparent(bool isTransparent);
bool isTransparent(void) const;
virtual const String& getTypeName(void) const;
void getRenderOperation(RenderOperation& op);
void setMaterialName(const String& matName);
void _updateRenderQueue(RenderQueue* queue);
class _OgrePrivate CmdTiling : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
class _OgrePrivate CmdTransparent : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
class _OgrePrivate CmdUVCoords : public ParamCommand
{
public:
String doGet(const void* target) const;
void doSet(void* target, const String& val);
};
protected:
bool mTransparent;
// Texture tiling
Real mTileX[OGRE_MAX_TEXTURE_LAYERS];
Real mTileY[OGRE_MAX_TEXTURE_LAYERS];
size_t mNumTexCoordsInBuffer;
Real mU1, mV1, mU2, mV2;
RenderOperation mRenderOp;
virtual void updatePositionGeometry(void);
virtual void updateTextureGeometry(void);
void addBaseParameters(void);
static String msTypeName;
// Command objects
static CmdTiling msCmdTiling;
static CmdTransparent msCmdTransparent;
static CmdUVCoords msCmdUVCoords;
};
}
#endif
OgreOverlayContainer.h
Ogre::PanelOverlayElement::msCmdUVCoords
static CmdUVCoords msCmdUVCoords
Definition: OgrePanelOverlayElement.h:153
Ogre::PanelOverlayElement::msCmdTiling
static CmdTiling msCmdTiling
Definition: OgrePanelOverlayElement.h:151
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::PanelOverlayElement::CmdUVCoords
Command object for specifying UV coordinates (see ParamCommand).
Definition: OgrePanelOverlayElement.h:122
Ogre::PanelOverlayElement::CmdTransparent
Command object for specifying transparency (see ParamCommand).
Definition: OgrePanelOverlayElement.h:115
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:92
_OgreOverlayExport
#define _OgreOverlayExport
Definition: OgreOverlayPrerequisites.h:58
Ogre::PanelOverlayElement
OverlayElement representing a flat, single-material (or transparent) panel which can contain other el...
Definition: OgrePanelOverlayElement.h:58
Ogre::PanelOverlayElement::msTypeName
static String msTypeName
Definition: OgrePanelOverlayElement.h:148
OGRE_MAX_TEXTURE_LAYERS
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
Definition: OgreConfig.h:72
_OgrePrivate
#define _OgrePrivate
Definition: OgrePlatform.h:258
Ogre::PanelOverlayElement::mV2
Real mV2
Definition: OgrePanelOverlayElement.h:135
Ogre::PanelOverlayElement::msCmdTransparent
static CmdTransparent msCmdTransparent
Definition: OgrePanelOverlayElement.h:152
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::PanelOverlayElement::mNumTexCoordsInBuffer
size_t mNumTexCoordsInBuffer
Definition: OgrePanelOverlayElement.h:134
Ogre::PanelOverlayElement::mTransparent
bool mTransparent
Flag indicating if this panel should be visual or just group things.
Definition: OgrePanelOverlayElement.h:130
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::PanelOverlayElement::mRenderOp
RenderOperation mRenderOp
Definition: OgrePanelOverlayElement.h:137
Ogre::RenderOperation
&#39;New&#39; rendering operation using vertex buffers.
Definition: OgreRenderOperation.h:45
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::OverlayContainer
A 2D element which contains other OverlayElement instances.
Definition: OgreOverlayContainer.h:56
Ogre::ParamCommand
Abstract class which is command object which gets/sets parameters.
Definition: OgreStringInterface.h:79
Ogre::PanelOverlayElement::CmdTiling
Command object for specifying tiling (see ParamCommand).
Definition: OgrePanelOverlayElement.h:108

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.