29 #ifndef __OverlayElement_H__
30 #define __OverlayElement_H__
35 #include "OgreUTFString.h"
49 #if OGRE_UNICODE_SUPPORT
51 # define OGRE_DEREF_DISPLAYSTRING_ITERATOR(it) it.getCharacter()
54 # define OGRE_DEREF_DISPLAYSTRING_ITERATOR(it) *it
186 virtual void updatePositionGeometry(
void) = 0;
191 virtual void updateTextureGeometry(
void) = 0;
201 virtual void addBaseParameters(
void);
209 virtual void initialise(
void) = 0;
212 const String& getName(
void)
const;
216 virtual void show(
void);
219 virtual void hide(
void);
222 bool isVisible(
void)
const;
224 bool isEnabled()
const;
225 virtual void setEnabled(
bool b);
229 void setDimensions(
Real width,
Real height);
233 void setPosition(
Real left,
Real top);
236 void setWidth(
Real width);
238 Real getWidth(
void)
const;
241 void setHeight(
Real height);
243 Real getHeight(
void)
const;
246 void setLeft(
Real left);
248 Real getLeft(
void)
const;
251 void setTop(
Real Top);
253 Real getTop(
void)
const;
264 void _setLeft(
Real left);
266 void _setTop(
Real top);
268 void _setWidth(
Real width);
270 void _setHeight(
Real height);
272 void _setPosition(
Real left,
Real top);
274 void _setDimensions(
Real width,
Real height);
277 virtual const String& getMaterialName(
void)
const;
289 virtual void setMaterialName(
const String& matName);
299 void getWorldTransforms(
Matrix4* xform)
const;
302 virtual void _positionsOutOfDate(
void);
305 virtual void _update(
void);
308 virtual void _updateFromParent(
void);
314 virtual Real _getDerivedLeft(
void);
317 virtual Real _getDerivedTop(
void);
320 virtual Real _getRelativeWidth(
void);
322 virtual Real _getRelativeHeight(
void);
326 virtual void _getClippingRegion(
RealRect &clippingRegion);
345 virtual void _notifyWorldTransforms(
const Matrix4& xform);
350 virtual void _notifyViewport();
353 virtual void _updateRenderQueue(
RenderQueue* queue);
357 bool debugRenderables =
false);
360 virtual const String& getTypeName(
void)
const = 0;
436 virtual bool contains(
Real x,
Real y)
const;
451 {
return mCloneable; }
472 return 10000.0f - (
Real)getZOrder();
488 return mSourceTemplate ;
Abstract class defining the interface all renderable objects must implement.
bool mGeomPositionsOutOfDate
Flag indicating if the vertex positions need recalculating.
'left', 'top', 'height' and 'width' are parametrics from 0.0 to 1.0
Real getSquaredViewDepth(const Camera *cam) const
Overridden from Renderable.
GuiMetricsMode
Enum describing how the position / size of an element is to be recorded.
Real _getHeight(void) const
Gets the height of this element in relation to the screen (where 1.0 = screen height) ...
Command object for OverlayElement - see ParamCommand.
Class representing colour.
float Real
Software floating point type.
Class to manage the scene object rendering queue.
static OverlayElementCommands::CmdTop msTopCmd
Positions & sizes are in absolute pixels.
#define _OgreOverlayExport
ushort mZOrder
Zorder for when sending to render queue.
GuiHorizontalAlignment
Enum describing where '0' is in relation to the parent in the horizontal dimension.
virtual void setCloneable(bool c)
static OverlayElementCommands::CmdCaption msCaptionCmd
static OverlayElementCommands::CmdWidth msWidthCmd
Real _getTop(void) const
Gets the top of this element in relation to the screen (where 0 = far left, 1.0 = far right) ...
Command object for OverlayElement - see ParamCommand.
static OverlayElementCommands::CmdVerticalAlign msVerticalAlignCmd
Command object for OverlayElement - see ParamCommand.
ushort getZOrder() const
Returns the zOrder of the element.
static OverlayElementCommands::CmdHeight msHeightCmd
Class encapsulating a standard 4x4 homogeneous matrix.
bool mInitialised
Is element initialised?
static OverlayElementCommands::CmdMetricsMode msMetricsModeCmd
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable. ...
OverlayContainer * mParent
Parent pointer.
static OverlayElementCommands::CmdVisible msVisibleCmd
Command object for OverlayElement - see ParamCommand.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
OverlayElement * mSourceTemplate
Used to see if this element is created from a Template.
Class defining the common interface which classes can use to present a reflection-style, self-defining parameter set to callers.
const OverlayElement * getSourceTemplate() const
Returns the SourceTemplate for this element.
virtual bool isKeyEnabled() const
static OverlayElementCommands::CmdMaterial msMaterialCmd
GuiVerticalAlignment mVertAlign
A viewpoint from which the scene will be rendered.
GuiHorizontalAlignment mHorzAlign
Command object for OverlayElement - see ParamCommand.
Positions & sizes are in virtual pixels.
Matrix4 mXForm
World transforms.
Overlay * mOverlay
Overlay attached to.
Real _getWidth(void) const
Gets the width of this element in relation to the screen (where 1.0 = screen width) ...
GuiVerticalAlignment
Enum describing where '0' is in relation to the parent in the vertical dimension. ...
void _setParent(OverlayContainer *parent)
bool mGeomUVsOutOfDate
Flag indicating if the vertex uvs need recalculating.
Real _getLeft(void) const
Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right) ...
static OverlayElementCommands::CmdLeft msLeftCmd
Abstract definition of a 2D element to be displayed in an Overlay.
A 2D element which contains other OverlayElement instances.
virtual bool isCloneable() const
Command object for OverlayElement - see ParamCommand.
GuiMetricsMode mMetricsMode
static OverlayElementCommands::CmdHorizontalAlign msHorizontalAlignCmd
Represents a layer which is rendered on top of the 'normal' scene contents.
Command object for OverlayElement - see ParamCommand.
Command object for OverlayElement - see ParamCommand.
Command object for OverlayElement - see ParamCommand.
Command object for OverlayElement - see ParamCommand.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
bool mEnabled
Is element enabled?
virtual bool isContainer() const
returns false as this class is not a container type