#include <OgreOverlay.h>
Inheritance diagram for Ogre::Overlay:
Public Methods | |
Overlay (const String &name) | |
Constructor: do not call direct, use SceneManager::createOverlay. | |
virtual | ~Overlay () |
virtual void | load (void) |
Generic load - called by OverlayManager. | |
virtual void | unload (void) |
Generic unload - called by OverlayManager. | |
GuiContainer * | getChild (const String &name) |
const String & | getName (void) const |
Gets the name of this overlay. | |
void | setZOrder (ushort zorder) |
Alters the ZOrder of this overlay. | |
ushort | getZOrder (void) const |
Gets the ZOrder of this overlay. | |
bool | isVisible (void) const |
Gets whether the overlay is displayed or not. | |
void | show (void) |
Shows the overlay if it was hidden. | |
void | hide (void) |
Hides the overlay if it was visible. | |
void | add2D (GuiContainer *cont) |
Adds a 2D 'container' to the overlay. | |
void | remove2D (GuiContainer *cont) |
Removes a 2D container from the overlay. | |
void | add3D (SceneNode *node) |
Adds a node capable of holding 3D objects to the overlay. | |
void | remove3D (SceneNode *node) |
Removes a 3D element from the overlay. | |
void | clear () |
Clears the overlay of all attached items. | |
void | setScroll (Real x, Real y) |
Sets the scrolling factor of this overlay. | |
Real | getScrollX (void) const |
Gets the current X scroll value. | |
Real | getScrollY (void) const |
Gets the current Y scroll value. | |
void | scroll (Real xoff, Real yoff) |
Scrolls the overlay by the offsets provided. | |
void | setRotate (Real degrees) |
Sets the rotation applied to this overlay, in degrees. | |
Real | getRotate (void) const |
Gets the rotation applied to this overlay, in degrees. | |
void | rotate (Real degrees) |
Adds the passed in angle to the rotation applied to this overlay. | |
void | setScale (Real x, Real y) |
Sets the scaling factor of this overlay. | |
Real | getScaleX (void) const |
Gets the current X scale value. | |
Real | getScaleY (void) const |
Gets the current Y scale value. | |
void | _getWorldTransforms (Matrix4 *xform) const |
Used to transform the overlay when scrolling, scaling etc. | |
const Quaternion & | getWorldOrientation (void) const |
@copydoc Renderable::getWorldOrientation | |
const Vector3 & | getWorldPosition (void) const |
@copydoc Renderable::getWorldPosition | |
void | _findVisibleObjects (Camera *cam, RenderQueue *queue) |
Internal method to put the overlay contents onto the render queue. | |
virtual GuiElement * | findElementAt (Real x, Real y) |
This returns a GuiElement at position x,y. | |
virtual size_t | getSize (void) const |
Retrieves info about the size of the resource. | |
virtual void | touch (void) |
'Touches' the resource to indicate it has been used. | |
time_t | getLastAccess (void) const |
Gets the last time the resource was 'touched'. | |
ResourceHandle | getHandle (void) const |
bool | isLoaded (void) const |
Returns true if the Resource has been loaded, false otherwise. | |
virtual void | destroy () |
A method to make the resource delete itself. | |
Protected Types | |
typedef std::list< GuiContainer * > | GuiContainerList |
Protected Methods | |
void | updateTransform (void) const |
Internal lazy update method. | |
Protected Attributes | |
ushort | mZOrder |
bool | mVisible |
SceneNode * | mRootNode |
Internal root node, used as parent for 3D objects. | |
GuiContainerList | m2DElements |
Real | mRotate |
Real | mScrollX |
Real | mScrollY |
Real | mScaleX |
Real | mScaleY |
Matrix4 | mTransform |
bool | mTransformOutOfDate |
String | mName |
ResourceHandle | mHandle |
bool | mIsLoaded |
time_t | mLastAccess |
size_t | mSize |
An overlay always takes up the entire size of the viewport, although the components attached to it do not have to. An overlay has no visual element in itself, it it merely a container for visual elements.
Overlays are created by calling SceneManager::createOverlay, or by defining them in special text scripts (.overlay files). As many overlays as you like can be defined; after creation an overlay is hidden i.e. not visible until you specifically enable it by calling 'show'. This allows you to have multiple overlays predefined (menus etc) which you make visible only when you want. It is possible to have multiple overlays enabled at once; in this case the relative 'zorder' parameter of the overlays determine which one is displayed on top.
By default overlays are rendered into all viewports. This is fine when you only have fullscreen viewports, but if you have picture-in-picture views, you probably don't want the overlay displayed in the smaller viewports. You turn this off for a specific viewport by calling the Viewport::setDisplayOverlays method.
Definition at line 62 of file OgreOverlay.h.
|
Definition at line 73 of file OgreOverlay.h. |
|
Constructor: do not call direct, use SceneManager::createOverlay.
Definition at line 39 of file OgreOverlay.cpp. References Ogre::Resource::mName, mRootNode, mRotate, mScaleX, mScaleY, mScrollX, mScrollY, mTransformOutOfDate, mVisible, mZOrder, and Ogre::ST_GENERIC. |
|
Definition at line 54 of file OgreOverlay.cpp. |
|
Internal method to put the overlay contents onto the render queue.
Definition at line 225 of file OgreOverlay.cpp. References Ogre::SceneNode::_findVisibleObjects(), Ogre::SceneNode::_update(), Ogre::RenderQueue::getDefaultQueueGroup(), Ogre::Camera::getDerivedOrientation(), Ogre::Camera::getDerivedPosition(), m2DElements, mRootNode, mVisible, Ogre::RENDER_QUEUE_OVERLAY, Ogre::RenderQueueGroupID, Ogre::RenderQueue::setDefaultQueueGroup(), Ogre::Node::setOrientation(), and Ogre::Node::setPosition(). Referenced by Ogre::OverlayManager::_queueOverlaysForRendering(). |
|
Used to transform the overlay when scrolling, scaling etc.
Definition at line 203 of file OgreOverlay.cpp. References mTransform, and updateTransform(). Referenced by Ogre::GuiElement::getWorldTransforms(). |
|
Adds a 2D 'container' to the overlay.
Definition at line 98 of file OgreOverlay.cpp. References Ogre::GuiContainer::_notifyParent(), Ogre::GuiContainer::_notifyZOrder(), m2DElements, and mZOrder. Referenced by Ogre::OverlayManager::createCursorOverlay(), Ogre::Profiler::initialize(), and Ogre::OverlayManager::parseNewElement(). |
|
Adds a node capable of holding 3D objects to the overlay.
Definition at line 113 of file OgreOverlay.cpp. References Ogre::Node::addChild(), and mRootNode. Referenced by Ogre::OverlayManager::parseNewMesh(). |
|
Clears the overlay of all attached items.
Definition at line 123 of file OgreOverlay.cpp. References m2DElements, mRootNode, and Ogre::Node::removeAllChildren(). |
|
A method to make the resource delete itself.
Definition at line 137 of file OgreResource.h. |
|
This returns a GuiElement at position x,y.
Definition at line 286 of file OgreOverlay.cpp. References Ogre::GuiElement::getZOrder(), m2DElements, and Ogre::Real. Referenced by Ogre::OverlayManager::getPositionTargetAt(). |
|
Definition at line 147 of file OgreOverlay.cpp. References m2DElements. |
|
Definition at line 120 of file OgreResource.h. References Ogre::ResourceHandle. Referenced by Ogre::Material::clone(), Ogre::BspLevel::loadQuake3Level(), and Ogre::ResourceManager::unload(). |
|
Gets the last time the resource was 'touched'.
Definition at line 108 of file OgreResource.h. |
|
Gets the name of this overlay.
Reimplemented from Ogre::Resource. Definition at line 59 of file OgreOverlay.cpp. References Ogre::Resource::mName. Referenced by Ogre::OverlayManager::parseAttrib(), Ogre::OverlayManager::parseElementAttrib(), Ogre::OverlayManager::parseNewMesh(), and Ogre::OverlayManager::parseOverlayFile(). |
|
Gets the rotation applied to this overlay, in degrees.
Definition at line 176 of file OgreOverlay.cpp. References mRotate, and Ogre::Real. |
|
Gets the current X scale value.
Definition at line 193 of file OgreOverlay.cpp. References mScaleX, and Ogre::Real. |
|
Gets the current Y scale value.
Definition at line 198 of file OgreOverlay.cpp. References mScaleY, and Ogre::Real. |
|
Gets the current X scroll value.
Definition at line 137 of file OgreOverlay.cpp. References mScrollX, and Ogre::Real. |
|
Gets the current Y scroll value.
Definition at line 142 of file OgreOverlay.cpp. References mScrollY, and Ogre::Real. |
|
Retrieves info about the size of the resource.
Definition at line 93 of file OgreResource.h. Referenced by Ogre::ResourceManager::unload(). |
|
@copydoc Renderable::getWorldOrientation
Definition at line 213 of file OgreOverlay.cpp. Referenced by Ogre::GuiElement::getWorldOrientation(). |
|
@copydoc Renderable::getWorldPosition
Definition at line 219 of file OgreOverlay.cpp. Referenced by Ogre::GuiElement::getWorldPosition(). |
|
Gets the ZOrder of this overlay.
Definition at line 78 of file OgreOverlay.cpp. References mZOrder, and Ogre::ushort. Referenced by Ogre::OverlayManager::getPositionTargetAt(). |
|
Hides the overlay if it was visible.
Definition at line 93 of file OgreOverlay.cpp. References mVisible. Referenced by Ogre::Profiler::changeEnableState(). |
|
Returns true if the Resource has been loaded, false otherwise.
Definition at line 127 of file OgreResource.h. Referenced by Ogre::GpuProgramUsage::_load(), Ogre::Technique::isLoaded(), Ogre::D3D9Texture::load(), Ogre::D3D9Texture::unload(), and Ogre::D3D9Texture::~D3D9Texture(). |
|
Gets whether the overlay is displayed or not.
Definition at line 83 of file OgreOverlay.cpp. References mVisible. Referenced by Ogre::OverlayManager::getPositionTargetAt(). |
|
Generic load - called by OverlayManager.
Implements Ogre::Resource. Definition at line 276 of file OgreOverlay.cpp. |
|
Removes a 2D container from the overlay.
Definition at line 108 of file OgreOverlay.cpp. References m2DElements. |
|
Removes a 3D element from the overlay.
Definition at line 118 of file OgreOverlay.cpp. References Ogre::Node::getName(), mRootNode, and Ogre::Node::removeChild(). |
|
Adds the passed in angle to the rotation applied to this overlay.
Definition at line 181 of file OgreOverlay.cpp. References mRotate, Ogre::Real, and setRotate(). |
|
Scrolls the overlay by the offsets provided.
Definition at line 163 of file OgreOverlay.cpp. References mScrollX, mScrollY, mTransformOutOfDate, and Ogre::Real. |
|
Sets the rotation applied to this overlay, in degrees.
Definition at line 170 of file OgreOverlay.cpp. References mRotate, mTransformOutOfDate, and Ogre::Real. Referenced by rotate(). |
|
Sets the scaling factor of this overlay.
Definition at line 186 of file OgreOverlay.cpp. References mScaleX, mScaleY, mTransformOutOfDate, and Ogre::Real. |
|
Sets the scrolling factor of this overlay.
Definition at line 130 of file OgreOverlay.cpp. References mScrollX, mScrollY, mTransformOutOfDate, and Ogre::Real. |
|
Alters the ZOrder of this overlay.
Definition at line 64 of file OgreOverlay.cpp. References m2DElements, mZOrder, and Ogre::ushort. Referenced by Ogre::OverlayManager::createCursorOverlay(), Ogre::SceneManager::createOverlay(), Ogre::Profiler::initialize(), and Ogre::OverlayManager::parseAttrib(). |
|
Shows the overlay if it was hidden.
Definition at line 88 of file OgreOverlay.cpp. References mVisible. Referenced by Ogre::Profiler::changeEnableState(), Ogre::OverlayManager::createCursorOverlay(), and Ogre::Profiler::initialize(). |
|
'Touches' the resource to indicate it has been used.
Reimplemented in Ogre::Material. Definition at line 100 of file OgreResource.h. Referenced by Ogre::ResourceManager::load(). |
|
Generic unload - called by OverlayManager.
Reimplemented from Ogre::Resource. Definition at line 281 of file OgreOverlay.cpp. |
|
Internal lazy update method.
Definition at line 254 of file OgreOverlay.cpp. References Ogre::Matrix3::FromEulerAnglesXYZ(), mRotate, mScaleX, mScaleY, mScrollX, mScrollY, mTransform, mTransformOutOfDate, and Ogre::Matrix4::setTrans(). Referenced by _getWorldTransforms(). |
|
Definition at line 74 of file OgreOverlay.h. Referenced by _findVisibleObjects(), add2D(), clear(), findElementAt(), getChild(), remove2D(), and setZOrder(). |
|
Definition at line 57 of file OgreResource.h. Referenced by Ogre::ResourceManager::add(), Ogre::Material::clone(), Ogre::Material::copyDetailsTo(), and Ogre::Material::operator=(). |
|
|
Definition at line 59 of file OgreResource.h. Referenced by Ogre::Material::operator=(). |
|
|
Internal root node, used as parent for 3D objects.
Definition at line 69 of file OgreOverlay.h. Referenced by _findVisibleObjects(), add3D(), clear(), Overlay(), and remove3D(). |
|
Definition at line 77 of file OgreOverlay.h. Referenced by getRotate(), Overlay(), rotate(), setRotate(), and updateTransform(). |
|
Definition at line 81 of file OgreOverlay.h. Referenced by getScaleX(), Overlay(), setScale(), and updateTransform(). |
|
Definition at line 81 of file OgreOverlay.h. Referenced by getScaleY(), Overlay(), setScale(), and updateTransform(). |
|
Definition at line 79 of file OgreOverlay.h. Referenced by getScrollX(), Overlay(), scroll(), setScroll(), and updateTransform(). |
|
Definition at line 79 of file OgreOverlay.h. Referenced by getScrollY(), Overlay(), scroll(), setScroll(), and updateTransform(). |
|
Definition at line 60 of file OgreResource.h. Referenced by Ogre::D3D9Texture::_setFinalAttributes(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), and Ogre::Material::operator=(). |
|
Definition at line 83 of file OgreOverlay.h. Referenced by _getWorldTransforms(), and updateTransform(). |
|
Definition at line 84 of file OgreOverlay.h. Referenced by Overlay(), scroll(), setRotate(), setScale(), setScroll(), and updateTransform(). |
|
Definition at line 67 of file OgreOverlay.h. Referenced by _findVisibleObjects(), hide(), isVisible(), Overlay(), and show(). |
|
Definition at line 66 of file OgreOverlay.h. Referenced by add2D(), getZOrder(), Overlay(), and setZOrder(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:18:45 2004