OGRE 2.1
Object-Oriented Graphics Rendering Engine
|
An abstraction of a viewport, i.e. More...
#include <OgreViewport.h>
Public Member Functions | |
Viewport (RenderTarget *target, Real left, Real top, Real width, Real height) | |
The usual constructor. | |
virtual | ~Viewport () |
Default destructor. | |
void | _clearUpdatedFlag (void) |
bool | _isUpdated (void) const |
void | _setVisibilityMask (uint32 mask, uint32 lightMask) |
Sets a per-viewport visibility mask. | |
void | _updateCullPhase01 (Camera *camera, const Camera *lodCamera, uint8 firstRq, uint8 lastRq) |
Instructs the viewport to updates its contents. | |
void | _updateDimensions (void) |
Notifies the viewport of a possible change in dimensions. | |
void | _updateRenderPhase02 (Camera *camera, const Camera *lodCamera, uint8 firstRq, uint8 lastRq) |
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. | |
bool | coversEntireTarget (void) const |
void | discard (unsigned int buffers=FBT_COLOUR|FBT_DEPTH) |
Instructs the viewport to 'discard' the buffers. | |
void | getActualDimensions (int &left, int &top, int &width, int &height) const |
Access to actual dimensions (based on target size). | |
int | getActualHeight (void) const |
Gets one of the actual dimensions of the viewport, a value in pixels. | |
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. | |
bool | getColourWrite (void) const |
ColourBufferType | getDrawBuffer () const |
Returns the current colour buffer type for this viewport. | |
Real | getHeight (void) const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. | |
Real | getLeft (void) const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. | |
uint32 | getLightVisibilityMask (void) const |
const String & | getMaterialScheme (void) const |
Get the material scheme which the viewport should use. | |
OrientationMode | getOrientationMode () const |
Get the orientation mode of the viewport. | |
bool | getOverlaysEnabled (void) const |
Returns whether or not Overlay objects (created in the SceneManager) are displayed in this viewport. | |
bool | getReadOnlStencil (void) const |
bool | getReadOnlyDepth (void) const |
int | getScissorActualHeight (void) const |
int | getScissorActualLeft (void) const |
int | getScissorActualTop (void) const |
int | getScissorActualWidth (void) const |
Real | getScissorHeight (void) const |
Real | getScissorLeft (void) const |
Real | getScissorTop (void) const |
Real | getScissorWidth (void) const |
bool | getSkiesEnabled (void) const |
Returns whether or not skies (created in the SceneManager) are displayed in this viewport. | |
RenderTarget * | getTarget (void) const |
Retrieves a pointer to the render target for this viewport. | |
Real | getTop (void) const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. | |
uint8 | getViewportRenderTargetFlags (void) const |
uint32 | getVisibilityMask (void) const |
Gets a per-viewport visibility mask. | |
Real | getWidth (void) const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz) |
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 *ptr) |
placement operator new | |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
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) |
bool | scissorsMatchViewport (void) const |
void | setColourWrite (bool colourWrite) |
void | setDimensions (Real left, Real top, Real width, Real height, bool overrideScissors=true) |
Sets the dimensions (after creation). | |
void | setDrawBuffer (ColourBufferType colourBuffer) |
Sets the draw buffer type for the next frame. | |
void | setMaterialScheme (const String &schemeName) |
Set the material scheme which the viewport should use. | |
void | setOrientationMode (OrientationMode orientationMode, bool setDefault=true) |
Set the orientation mode of the viewport. | |
void | setOverlaysEnabled (bool enabled) |
Tells this viewport whether it should display Overlay objects. | |
void | setReadOnly (bool readOnlyDepth, bool readOnlyStencil) |
void | setScissors (Real left, Real top, Real width, Real height) |
Only sets the scissor regions. | |
void | setSkiesEnabled (bool enabled) |
Tells this viewport whether it should display skies. | |
Static Public Member Functions | |
static OrientationMode | getDefaultOrientationMode () |
Get the initial orientation mode of viewports. | |
static void | setDefaultOrientationMode (OrientationMode orientationMode) |
Set the initial orientation mode of viewports. | |
Public Attributes | |
size_t | mGlobalIndex |
Index in the vector holding this MO reference (could be our parent node, or a global array tracking all movable objecst to avoid memory leaks). | |
An abstraction of a viewport, i.e.
a rendering region on a render target.
Ogre::Viewport::Viewport | ( | RenderTarget * | target, |
Real | left, | ||
Real | top, | ||
Real | width, | ||
Real | height | ||
) |
The usual constructor.
camera | 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 |
Default destructor.
Sets a per-viewport visibility mask.
void Ogre::Viewport::_updateCullPhase01 | ( | Camera * | camera, |
const Camera * | lodCamera, | ||
uint8 | firstRq, | ||
uint8 | lastRq | ||
) |
Instructs the viewport to updates its contents.
Notifies the viewport of a possible change in dimensions.
void Ogre::Viewport::_updateRenderPhase02 | ( | Camera * | camera, |
const Camera * | lodCamera, | ||
uint8 | firstRq, | ||
uint8 | lastRq | ||
) |
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 |
void Ogre::Viewport::discard | ( | unsigned int | buffers = FBT_COLOUR|FBT_DEPTH | ) |
Instructs the viewport to 'discard' the buffers.
Access to actual dimensions (based on target size).
Gets one of the actual dimensions of the viewport, a value in pixels.
Gets one of the actual dimensions of the viewport, a value in pixels.
Gets one of the actual dimensions of the viewport, a value in pixels.
Gets one of the actual dimensions of the viewport, a value in pixels.
|
static |
Get the initial orientation mode of viewports.
ColourBufferType Ogre::Viewport::getDrawBuffer | ( | ) | const |
Returns the current colour buffer type for this viewport.
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
Get the material scheme which the viewport should use.
OrientationMode Ogre::Viewport::getOrientationMode | ( | ) | const |
Get the orientation mode of the viewport.
Returns whether or not Overlay objects (created in the SceneManager) are displayed in this viewport.
Returns whether or not skies (created in the SceneManager) are displayed in this viewport.
RenderTarget * Ogre::Viewport::getTarget | ( | void | ) | const |
Retrieves a pointer to the render target for this viewport.
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
Gets a per-viewport visibility mask.
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
placement operator new
|
inlineinherited |
|
inlineinherited |
array operator new, with debug line info
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 | ||
) |
|
static |
Set the initial orientation mode of viewports.
void Ogre::Viewport::setDimensions | ( | Real | left, |
Real | top, | ||
Real | width, | ||
Real | height, | ||
bool | overrideScissors = true |
||
) |
Sets the dimensions (after creation).
left | Left point of viewport. |
top | Top point of the viewport. |
width | Width of the viewport. |
height | Height of the viewport. |
overrideScissors | When true, the scissor dimensions will be the same as the viewport's @See setScissors |
void Ogre::Viewport::setDrawBuffer | ( | ColourBufferType | colourBuffer | ) |
Sets the draw buffer type for the next frame.
buffer | Specifies the particular buffer that will be targeted by the render target. |
Set the material scheme which the viewport should use.
void Ogre::Viewport::setOrientationMode | ( | OrientationMode | orientationMode, |
bool | setDefault = true |
||
) |
Set the orientation mode of the viewport.
Tells this viewport whether it should display Overlay objects.
enabled | If true, any overlays are displayed, if false they are not. |
Only sets the scissor regions.
The scissor rectangle must be fully inside the viewport rectangle. @See setDimensions for param description
Tells this viewport whether it should display skies.
enabled | If true, any skies are displayed, if false they are not. |
size_t Ogre::Viewport::mGlobalIndex |
Index in the vector holding this MO reference (could be our parent node, or a global array tracking all movable objecst to avoid memory leaks).
Used for O(1) removals.