OgrePanelOverlayElement.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __PanelOverlayElement_H__
30 #define __PanelOverlayElement_H__
31 
32 #include "OgreOverlayContainer.h"
33 
34 namespace Ogre {
35 
36 
59  {
60  public:
64 
66  virtual void initialise(void);
67 
74  void setTiling(Real x, Real y, ushort layer = 0);
75 
76  Real getTileX(ushort layer = 0) const;
81  Real getTileY(ushort layer = 0) const;
82 
84  void setUV(Real u1, Real v1, Real u2, Real v2);
85 
87  void getUV(Real& u1, Real& v1, Real& u2, Real& v2) const;
88 
92  void setTransparent(bool isTransparent);
93 
95  bool isTransparent(void) const;
96 
98  virtual const String& getTypeName(void) const;
102  void setMaterialName(const String& matName);
105 
106 
109  {
110  public:
111  String doGet(const void* target) const;
112  void doSet(void* target, const String& val);
113  };
116  {
117  public:
118  String doGet(const void* target) const;
119  void doSet(void* target, const String& val);
120  };
123  {
124  public:
125  String doGet(const void* target) const;
126  void doSet(void* target, const String& val);
127  };
128  protected:
131  // Texture tiling
135  Real mU1, mV1, mU2, mV2;
136 
138 
140  virtual void updatePositionGeometry(void);
141 
143  virtual void updateTextureGeometry(void);
144 
146  void addBaseParameters(void);
147 
149 
150  // Command objects
154 
155  };
159 }
160 
161 #endif
Ogre::PanelOverlayElement::setTransparent
void setTransparent(bool isTransparent)
Sets whether this panel is transparent (used only as a grouping level), or if it is actually rendered...
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::PanelOverlayElement::CmdTransparent
Command object for specifying transparency (see ParamCommand).
Definition: OgrePanelOverlayElement.h:116
Ogre::PanelOverlayElement
OverlayElement representing a flat, single-material (or transparent) panel which can contain other el...
Definition: OgrePanelOverlayElement.h:59
Ogre::PanelOverlayElement::CmdUVCoords
Command object for specifying UV coordinates (see ParamCommand).
Definition: OgrePanelOverlayElement.h:123
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::PanelOverlayElement::getTileY
Real getTileY(ushort layer=0) const
Gets the number of times the texture should repeat vertically.
Ogre::PanelOverlayElement::CmdTiling::doGet
String doGet(const void *target) const
Ogre::PanelOverlayElement::~PanelOverlayElement
virtual ~PanelOverlayElement()
Ogre::PanelOverlayElement::msCmdTiling
static CmdTiling msCmdTiling
Definition: OgrePanelOverlayElement.h:151
Ogre::PanelOverlayElement::getUV
void getUV(Real &u1, Real &v1, Real &u2, Real &v2) const
Get the uv coordinates for the panel.
Ogre::PanelOverlayElement::setTiling
void setTiling(Real x, Real y, ushort layer=0)
Sets the number of times textures should repeat.
Ogre::PanelOverlayElement::isTransparent
bool isTransparent(void) const
Returns whether this panel is transparent.
Ogre::PanelOverlayElement::CmdUVCoords::doSet
void doSet(void *target, const String &val)
Ogre::PanelOverlayElement::CmdTransparent::doSet
void doSet(void *target, const String &val)
Ogre::PanelOverlayElement::PanelOverlayElement
PanelOverlayElement(const String &name)
Constructor.
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::PanelOverlayElement::mTransparent
bool mTransparent
Flag indicating if this panel should be visual or just group things.
Definition: OgrePanelOverlayElement.h:130
Ogre::PanelOverlayElement::initialise
virtual void initialise(void)
Initialise.
Ogre::PanelOverlayElement::CmdTiling
Command object for specifying tiling (see ParamCommand).
Definition: OgrePanelOverlayElement.h:109
Ogre::ParamCommand
Abstract class which is command object which gets/sets parameters.
Definition: OgreStringInterface.h:80
Ogre::PanelOverlayElement::CmdTiling::doSet
void doSet(void *target, const String &val)
Ogre::PanelOverlayElement::addBaseParameters
void addBaseParameters(void)
Method for setting up base parameters for this class.
Ogre::PanelOverlayElement::_updateRenderQueue
void _updateRenderQueue(RenderQueue *queue)
Overridden from OverlayContainer.
Ogre::PanelOverlayElement::CmdUVCoords::doGet
String doGet(const void *target) const
Ogre::PanelOverlayElement::mRenderOp
RenderOperation mRenderOp
Definition: OgrePanelOverlayElement.h:137
_OgreOverlayExport
#define _OgreOverlayExport
Definition: OgreOverlayPrerequisites.h:58
Ogre::PanelOverlayElement::mV2
Real mV2
Definition: OgrePanelOverlayElement.h:135
Ogre::PanelOverlayElement::setMaterialName
void setMaterialName(const String &matName)
Overridden from OverlayElement.
OgreOverlayContainer.h
Ogre::PanelOverlayElement::mNumTexCoordsInBuffer
size_t mNumTexCoordsInBuffer
Definition: OgrePanelOverlayElement.h:134
Ogre::PanelOverlayElement::updatePositionGeometry
virtual void updatePositionGeometry(void)
Internal method for setting up geometry, called by OverlayElement::update.
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
Ogre::PanelOverlayElement::msTypeName
static String msTypeName
Definition: OgrePanelOverlayElement.h:148
Ogre::PanelOverlayElement::getTileX
Real getTileX(ushort layer=0) const
Ogre::PanelOverlayElement::setUV
void setUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the panel.
Ogre::PanelOverlayElement::getTypeName
virtual const String & getTypeName(void) const
See OverlayElement.
Ogre::PanelOverlayElement::CmdTransparent::doGet
String doGet(const void *target) const
Ogre::PanelOverlayElement::updateTextureGeometry
virtual void updateTextureGeometry(void)
Called to update the texture coords when layers change.
_OgrePrivate
#define _OgrePrivate
Definition: OgrePlatform.h:258
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::PanelOverlayElement::getRenderOperation
void getRenderOperation(RenderOperation &op)
See Renderable.
Ogre::PanelOverlayElement::msCmdUVCoords
static CmdUVCoords msCmdUVCoords
Definition: OgrePanelOverlayElement.h:153
Ogre::RenderOperation
'New' rendering operation using vertex buffers.
Definition: OgreRenderOperation.h:45
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:93
Ogre::OverlayContainer
A 2D element which contains other OverlayElement instances.
Definition: OgreOverlayContainer.h:57
Ogre::PanelOverlayElement::msCmdTransparent
static CmdTransparent msCmdTransparent
Definition: OgrePanelOverlayElement.h:152

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