#include <OgreViewport.h>
Public Member Functions | |
Viewport (Camera *camera, RenderTarget *target, Real left, Real top, Real width, Real height, int ZOrder) | |
The usual constructor. | |
virtual | ~Viewport () |
Default destructor. | |
void | _updateDimensions (void) |
Notifies the viewport of a possible change in dimensions. | |
void | update (void) |
Instructs the viewport to updates its contents. | |
void | clear (unsigned int buffers=FBT_COLOUR|FBT_DEPTH, const ColourValue &colour=ColourValue::Black, Real depth=1.0f, unsigned short stencil=0) |
Instructs the viewport to clear itself, without performing an update. | |
RenderTarget * | getTarget (void) const |
Retrieves a pointer to the render target for this viewport. | |
Camera * | getCamera (void) const |
Retrieves a pointer to the camera for this viewport. | |
void | setCamera (Camera *cam) |
Sets the camera to use for rendering to this viewport. | |
int | getZOrder (void) const |
Gets the Z-Order of this viewport. | |
Real | getLeft (void) const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. | |
Real | getTop (void) const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. | |
Real | getWidth (void) const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. | |
Real | getHeight (void) const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. | |
int | getActualLeft (void) const |
Gets one of the actual dimensions of the viewport, a value in pixels. | |
int | getActualTop (void) const |
Gets one of the actual dimensions of the viewport, a value in pixels. | |
int | getActualWidth (void) const |
Gets one of the actual dimensions of the viewport, a value in pixels. | |
int | getActualHeight (void) const |
Gets one of the actual dimensions of the viewport, a value in pixels. | |
void | setDimensions (Real left, Real top, Real width, Real height) |
Sets the dimensions (after creation). | |
void | setOrientationMode (OrientationMode orientationMode, bool setDefault=true) |
Set the orientation mode of the viewport. | |
OrientationMode | getOrientationMode () const |
Get the orientation mode of the viewport. | |
void | setBackgroundColour (const ColourValue &colour) |
Sets the initial background colour of the viewport (before rendering). | |
const ColourValue & | getBackgroundColour (void) const |
Gets the background colour. | |
void | setClearEveryFrame (bool clear, unsigned int buffers=FBT_COLOUR|FBT_DEPTH) |
Determines whether to clear the viewport before rendering. | |
bool | getClearEveryFrame (void) const |
Determines if the viewport is cleared before every frame. | |
unsigned int | getClearBuffers (void) const |
Gets which buffers are to be cleared each frame. | |
void | setAutoUpdated (bool autoupdate) |
Sets whether this viewport should be automatically updated if Ogre's rendering loop or RenderTarget::update is being used. | |
bool | isAutoUpdated () const |
Gets whether this viewport is automatically updated if Ogre's rendering loop or RenderTarget::update is being used. | |
void | setMaterialScheme (const String &schemeName) |
Set the material scheme which the viewport should use. | |
const String & | getMaterialScheme (void) const |
Get the material scheme which the viewport should use. | |
void | getActualDimensions (int &left, int &top, int &width, int &height) const |
Access to actual dimensions (based on target size). | |
bool | _isUpdated (void) const |
void | _clearUpdatedFlag (void) |
unsigned int | _getNumRenderedFaces (void) const |
Gets the number of rendered faces in the last update. | |
unsigned int | _getNumRenderedBatches (void) const |
Gets the number of rendered batches in the last update. | |
void | setOverlaysEnabled (bool enabled) |
Tells this viewport whether it should display Overlay objects. | |
bool | getOverlaysEnabled (void) const |
Returns whether or not Overlay objects (created in the SceneManager) are displayed in this viewport. | |
void | setSkiesEnabled (bool enabled) |
Tells this viewport whether it should display skies. | |
bool | getSkiesEnabled (void) const |
Returns whether or not skies (created in the SceneManager) are displayed in this viewport. | |
void | setShadowsEnabled (bool enabled) |
Tells this viewport whether it should display shadows. | |
bool | getShadowsEnabled (void) const |
Returns whether or not shadows (defined in the SceneManager) are displayed in this viewport. | |
void | setVisibilityMask (uint32 mask) |
Sets a per-viewport visibility mask. | |
uint | getVisibilityMask (void) const |
Gets a per-viewport visibility mask. | |
virtual void | setRenderQueueInvocationSequenceName (const String &sequenceName) |
Sets the use of a custom RenderQueueInvocationSequence for rendering this target. | |
virtual const String & | getRenderQueueInvocationSequenceName (void) const |
Gets the name of the render queue invocation sequence for this target. | |
RenderQueueInvocationSequence * | _getRenderQueueInvocationSequence (void) |
Get the invocation sequence - will return null if using standard. | |
void | pointOrientedToScreen (const Vector2 &v, int orientationMode, Vector2 &outv) |
Convert oriented input point coordinates to screen coordinates. | |
void | pointOrientedToScreen (Real orientedX, Real orientedY, int orientationMode, Real &screenX, Real &screenY) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void * | operator new[] (size_t sz) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
Static Public Member Functions | |
static void | setDefaultOrientationMode (OrientationMode orientationMode) |
Set the initial orientation mode of viewports. | |
static OrientationMode | getDefaultOrientationMode () |
Get the initial orientation mode of viewports. | |
Protected Attributes | |
Camera * | mCamera |
RenderTarget * | mTarget |
float | mRelLeft |
float | mRelTop |
float | mRelWidth |
float | mRelHeight |
int | mActLeft |
int | mActTop |
int | mActWidth |
int | mActHeight |
int | mZOrder |
ZOrder. | |
ColourValue | mBackColour |
Background options. | |
bool | mClearEveryFrame |
unsigned int | mClearBuffers |
bool | mUpdated |
bool | mShowOverlays |
bool | mShowSkies |
bool | mShowShadows |
uint32 | mVisibilityMask |
String | mRQSequenceName |
RenderQueueInvocationSequence * | mRQSequence |
String | mMaterialSchemeName |
Material scheme. | |
OrientationMode | mOrientationMode |
Viewport orientation mode. | |
bool | mIsAutoUpdated |
Automatic rendering on/off. | |
Static Protected Attributes | |
static OrientationMode | mDefaultOrientationMode |
a rendering region on a render target.
Definition at line 56 of file OgreViewport.h.
Ogre::Viewport::Viewport | ( | Camera * | camera, | |
RenderTarget * | target, | |||
Real | left, | |||
Real | top, | |||
Real | width, | |||
Real | height, | |||
int | ZOrder | |||
) |
The usual constructor.
cam | Pointer to a camera to be the source for the image. | |
target | Pointer to the render target to be the destination for the rendering. | |
left | ||
top | ||
width | ||
height | Dimensions of the viewport, expressed as a value between 0 and 1. This allows the dimensions to apply irrespective of changes in the target's size: e.g. to fill the whole area, values of 0,0,1,1 are appropriate. | |
ZOrder | Relative Z-order on the target. Lower = further to the front. |
virtual Ogre::Viewport::~Viewport | ( | ) | [virtual] |
Default destructor.
void Ogre::Viewport::_updateDimensions | ( | void | ) |
Notifies the viewport of a possible change in dimensions.
void Ogre::Viewport::update | ( | void | ) |
Instructs the viewport to updates its contents.
void Ogre::Viewport::clear | ( | unsigned int | buffers = FBT_COLOUR|FBT_DEPTH , |
|
const ColourValue & | colour = ColourValue::Black , |
|||
Real | depth = 1.0f , |
|||
unsigned short | stencil = 0 | |||
) |
Instructs the viewport to clear itself, without performing an update.
buffers | Bitmask identifying which buffer elements to clear | |
colour | The colour value to clear to, if FBT_COLOUR is included | |
depth | The depth value to clear to, if FBT_DEPTH is included | |
stencil | The stencil value to clear to, if FBT_STENCIL is included |
RenderTarget* Ogre::Viewport::getTarget | ( | void | ) | const |
Retrieves a pointer to the render target for this viewport.
Camera* Ogre::Viewport::getCamera | ( | void | ) | const |
Retrieves a pointer to the camera for this viewport.
void Ogre::Viewport::setCamera | ( | Camera * | cam | ) |
Sets the camera to use for rendering to this viewport.
int Ogre::Viewport::getZOrder | ( | void | ) | const |
Gets the Z-Order of this viewport.
Real Ogre::Viewport::getLeft | ( | void | ) | const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
Real Ogre::Viewport::getTop | ( | void | ) | const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
Real Ogre::Viewport::getWidth | ( | void | ) | const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
Real Ogre::Viewport::getHeight | ( | void | ) | const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
int Ogre::Viewport::getActualLeft | ( | void | ) | const |
Gets one of the actual dimensions of the viewport, a value in pixels.
int Ogre::Viewport::getActualTop | ( | void | ) | const |
Gets one of the actual dimensions of the viewport, a value in pixels.
int Ogre::Viewport::getActualWidth | ( | void | ) | const |
Gets one of the actual dimensions of the viewport, a value in pixels.
int Ogre::Viewport::getActualHeight | ( | void | ) | const |
Gets one of the actual dimensions of the viewport, a value in pixels.
Sets the dimensions (after creation).
left | ||
top | ||
width | ||
height | Dimensions relative to the size of the target, represented as real values between 0 and 1. i.e. the full target area is 0, 0, 1, 1. |
void Ogre::Viewport::setOrientationMode | ( | OrientationMode | orientationMode, | |
bool | setDefault = true | |||
) |
Set the orientation mode of the viewport.
OrientationMode Ogre::Viewport::getOrientationMode | ( | ) | const |
Get the orientation mode of the viewport.
static void Ogre::Viewport::setDefaultOrientationMode | ( | OrientationMode | orientationMode | ) | [static] |
Set the initial orientation mode of viewports.
static OrientationMode Ogre::Viewport::getDefaultOrientationMode | ( | ) | [static] |
Get the initial orientation mode of viewports.
void Ogre::Viewport::setBackgroundColour | ( | const ColourValue & | colour | ) |
Sets the initial background colour of the viewport (before rendering).
const ColourValue& Ogre::Viewport::getBackgroundColour | ( | void | ) | const |
Gets the background colour.
void Ogre::Viewport::setClearEveryFrame | ( | bool | clear, | |
unsigned int | buffers = FBT_COLOUR|FBT_DEPTH | |||
) |
Determines whether to clear the viewport before rendering.
clear | Whether or not to clear any buffers | |
buffers | One or more values from FrameBufferType denoting which buffers to clear, if clear is set to true. Note you should not clear the stencil buffer here unless you know what you're doing. |
bool Ogre::Viewport::getClearEveryFrame | ( | void | ) | const |
Determines if the viewport is cleared before every frame.
unsigned int Ogre::Viewport::getClearBuffers | ( | void | ) | const |
Gets which buffers are to be cleared each frame.
void Ogre::Viewport::setAutoUpdated | ( | bool | autoupdate | ) |
Sets whether this viewport should be automatically updated if Ogre's rendering loop or RenderTarget::update is being used.
autoupdate | If true, the viewport is updated during the automatic render loop or when RenderTarget::update() is called. If false, the viewport is only updated when its update() method is called explicitly. |
bool Ogre::Viewport::isAutoUpdated | ( | ) | const |
Gets whether this viewport is automatically updated if Ogre's rendering loop or RenderTarget::update is being used.
void Ogre::Viewport::setMaterialScheme | ( | const String & | schemeName | ) |
Set the material scheme which the viewport should use.
Definition at line 255 of file OgreViewport.h.
const String& Ogre::Viewport::getMaterialScheme | ( | void | ) | const |
Get the material scheme which the viewport should use.
Definition at line 260 of file OgreViewport.h.
void Ogre::Viewport::getActualDimensions | ( | int & | left, | |
int & | top, | |||
int & | width, | |||
int & | height | |||
) | const |
Access to actual dimensions (based on target size).
bool Ogre::Viewport::_isUpdated | ( | void | ) | const |
void Ogre::Viewport::_clearUpdatedFlag | ( | void | ) |
unsigned int Ogre::Viewport::_getNumRenderedFaces | ( | void | ) | const |
Gets the number of rendered faces in the last update.
unsigned int Ogre::Viewport::_getNumRenderedBatches | ( | void | ) | const |
Gets the number of rendered batches in the last update.
void Ogre::Viewport::setOverlaysEnabled | ( | bool | enabled | ) |
Tells this viewport whether it should display Overlay objects.
enabled | If true, any overlays are displayed, if false they are not. |
bool Ogre::Viewport::getOverlaysEnabled | ( | void | ) | const |
Returns whether or not Overlay objects (created in the SceneManager) are displayed in this viewport.
void Ogre::Viewport::setSkiesEnabled | ( | bool | enabled | ) |
Tells this viewport whether it should display skies.
enabled | If true, any skies are displayed, if false they are not. |
bool Ogre::Viewport::getSkiesEnabled | ( | void | ) | const |
Returns whether or not skies (created in the SceneManager) are displayed in this viewport.
void Ogre::Viewport::setShadowsEnabled | ( | bool | enabled | ) |
Tells this viewport whether it should display shadows.
enabled | If true, any shadows are displayed, if false they are not. |
bool Ogre::Viewport::getShadowsEnabled | ( | void | ) | const |
Returns whether or not shadows (defined in the SceneManager) are displayed in this viewport.
void Ogre::Viewport::setVisibilityMask | ( | uint32 | mask | ) |
Sets a per-viewport visibility mask.
Definition at line 334 of file OgreViewport.h.
uint Ogre::Viewport::getVisibilityMask | ( | void | ) | const |
Gets a per-viewport visibility mask.
Definition at line 339 of file OgreViewport.h.
virtual void Ogre::Viewport::setRenderQueueInvocationSequenceName | ( | const String & | sequenceName | ) | [virtual] |
Sets the use of a custom RenderQueueInvocationSequence for rendering this target.
The | name of the RenderQueueInvocationSequence to use. If you specify a blank string, behaviour will return to the default render queue management. |
virtual const String& Ogre::Viewport::getRenderQueueInvocationSequenceName | ( | void | ) | const [virtual] |
Gets the name of the render queue invocation sequence for this target.
RenderQueueInvocationSequence* Ogre::Viewport::_getRenderQueueInvocationSequence | ( | void | ) |
Get the invocation sequence - will return null if using standard.
void Ogre::Viewport::pointOrientedToScreen | ( | const Vector2 & | v, | |
int | orientationMode, | |||
Vector2 & | outv | |||
) |
Convert oriented input point coordinates to screen coordinates.
void Ogre::Viewport::pointOrientedToScreen | ( | Real | orientedX, | |
Real | orientedY, | |||
int | orientationMode, | |||
Real & | screenX, | |||
Real & | screenY | |||
) |
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
void * | ptr | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
void * | ||||
) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
Camera* Ogre::Viewport::mCamera [protected] |
Definition at line 365 of file OgreViewport.h.
RenderTarget* Ogre::Viewport::mTarget [protected] |
Definition at line 366 of file OgreViewport.h.
float Ogre::Viewport::mRelLeft [protected] |
Definition at line 368 of file OgreViewport.h.
float Ogre::Viewport::mRelTop [protected] |
Definition at line 368 of file OgreViewport.h.
float Ogre::Viewport::mRelWidth [protected] |
Definition at line 368 of file OgreViewport.h.
float Ogre::Viewport::mRelHeight [protected] |
Definition at line 368 of file OgreViewport.h.
int Ogre::Viewport::mActLeft [protected] |
Definition at line 370 of file OgreViewport.h.
int Ogre::Viewport::mActTop [protected] |
Definition at line 370 of file OgreViewport.h.
int Ogre::Viewport::mActWidth [protected] |
Definition at line 370 of file OgreViewport.h.
int Ogre::Viewport::mActHeight [protected] |
Definition at line 370 of file OgreViewport.h.
int Ogre::Viewport::mZOrder [protected] |
ColourValue Ogre::Viewport::mBackColour [protected] |
bool Ogre::Viewport::mClearEveryFrame [protected] |
Definition at line 375 of file OgreViewport.h.
unsigned int Ogre::Viewport::mClearBuffers [protected] |
Definition at line 376 of file OgreViewport.h.
bool Ogre::Viewport::mUpdated [protected] |
Definition at line 377 of file OgreViewport.h.
bool Ogre::Viewport::mShowOverlays [protected] |
Definition at line 378 of file OgreViewport.h.
bool Ogre::Viewport::mShowSkies [protected] |
Definition at line 379 of file OgreViewport.h.
bool Ogre::Viewport::mShowShadows [protected] |
Definition at line 380 of file OgreViewport.h.
uint32 Ogre::Viewport::mVisibilityMask [protected] |
Definition at line 381 of file OgreViewport.h.
String Ogre::Viewport::mRQSequenceName [protected] |
Definition at line 383 of file OgreViewport.h.
RenderQueueInvocationSequence* Ogre::Viewport::mRQSequence [protected] |
Definition at line 384 of file OgreViewport.h.
String Ogre::Viewport::mMaterialSchemeName [protected] |
OrientationMode Ogre::Viewport::mOrientationMode [protected] |
OrientationMode Ogre::Viewport::mDefaultOrientationMode [static, protected] |
Definition at line 389 of file OgreViewport.h.
bool Ogre::Viewport::mIsAutoUpdated [protected] |
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 28 21:18:28 2010