OGRE  1.9.0
OgrePanelOverlayElement.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2014 Torus Knot Software Ltd
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25THE SOFTWARE.
26-----------------------------------------------------------------------------
27*/
28
29#ifndef __PanelOverlayElement_H__
30#define __PanelOverlayElement_H__
31
33
34namespace 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
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:261
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.
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.
virtual const String & getTypeName(void) const
See 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