OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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-2014 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 #include "OgreRenderOperation.h"
34 
35 namespace Ogre {
36 
59  {
60  public:
62  PanelOverlayElement(const String& name);
63  virtual ~PanelOverlayElement();
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;
100  void getRenderOperation(RenderOperation& op);
102  void setMaterialName(const String& matName);
104  void _updateRenderQueue(RenderQueue* queue, Camera *camera, const Camera *lodCamera);
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
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:82
OverlayElement representing a flat, single-material (or transparent) panel which can contain other el...
float Real
Software floating point type.
#define _OgreOverlayExport
Command object for specifying tiling (see ParamCommand).
A 2D element which contains other OverlayElement instances.
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
Definition: OgreConfig.h:72
#define _OgrePrivate
Definition: OgrePlatform.h:256
Command object for specifying transparency (see ParamCommand).
unsigned short ushort
'New' rendering operation using vertex buffers.
Command object for specifying UV coordinates (see ParamCommand).
static CmdTransparent msCmdTransparent
Class to manage the scene object rendering queue.
bool mTransparent
Flag indicating if this panel should be visual or just group things.
_StringBase String
Definition: OgreCommon.h:53
Abstract class which is command object which gets/sets parameters.