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
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
Definition: OgreConfig.h:72
#define _OgreOverlayExport
#define _OgrePrivate
Definition: OgrePlatform.h:258
A 2D element which contains other OverlayElement instances.
Command object for specifying tiling (see ParamCommand).
void doSet(void *target, const String &val)
String doGet(const void *target) const
Command object for specifying transparency (see ParamCommand).
String doGet(const void *target) const
void doSet(void *target, const String &val)
Command object for specifying UV coordinates (see ParamCommand).
String doGet(const void *target) const
void doSet(void *target, const String &val)
OverlayElement representing a flat, single-material (or transparent) panel which can contain other el...
Real getTileY(ushort layer=0) const
Gets the number of times the texture should repeat vertically.
void setUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the panel.
void getUV(Real &u1, Real &v1, Real &u2, Real &v2) const
Get the uv coordinates for the panel.
Real getTileX(ushort layer=0) const
bool isTransparent(void) const
Returns whether this panel is transparent.
void setTiling(Real x, Real y, ushort layer=0)
Sets the number of times textures should repeat.
virtual void initialise(void)
Initialise.
void _updateRenderQueue(RenderQueue *queue)
Overridden from OverlayContainer.
virtual const String & getTypeName(void) const
See OverlayElement.
static CmdTransparent msCmdTransparent
PanelOverlayElement(const String &name)
Constructor.
void getRenderOperation(RenderOperation &op)
See Renderable.
bool mTransparent
Flag indicating if this panel should be visual or just group things.
virtual void updateTextureGeometry(void)
Called to update the texture coords when layers change.
void setTransparent(bool isTransparent)
Sets whether this panel is transparent (used only as a grouping level), or if it is actually rendered...
void addBaseParameters(void)
Method for setting up base parameters for this class.
virtual void updatePositionGeometry(void)
Internal method for setting up geometry, called by OverlayElement::update.
void setMaterialName(const String &matName)
Overridden from OverlayElement.
Abstract class which is command object which gets/sets parameters.
'New' rendering operation using vertex buffers.
Class to manage the scene object rendering queue.
float Real
Software floating point type.
_StringBase String
unsigned short ushort

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