OGRE-Next
3.0.0
Object-Oriented Graphics Rendering Engine
|
An abstraction of a viewport, i.e. More...
#include <OgreViewport.h>
Public Member Functions | |
Viewport () | |
Viewport (Real left, Real top, Real width, Real height) | |
The usual constructor. More... | |
virtual | ~Viewport () |
Default destructor. More... | |
void | _clearUpdatedFlag () |
bool | _isUpdated () const |
void | _setupAspectRatio (Camera *cullCamera) |
void | _setVisibilityMask (uint32 mask, uint32 lightMask) |
Sets a per-viewport visibility mask. More... | |
void | _updateCullPhase01 (Camera *renderCamera, Camera *cullCamera, const Camera *lodCamera, uint8 firstRq, uint8 lastRq, bool reuseCullData) |
Instructs the viewport to updates its contents. More... | |
void | _updateDimensions () |
Notifies the viewport of a possible change in dimensions. More... | |
void | _updateRenderPhase02 (Camera *camera, const Camera *lodCamera, uint8 firstRq, uint8 lastRq) |
bool | coversEntireTarget () const |
void | getActualDimensions (int &left, int &top, int &width, int &height) const |
Access to actual dimensions (based on target size). More... | |
int | getActualHeight () const |
Gets one of the actual dimensions of the viewport, a value in pixels. More... | |
int | getActualLeft () const |
Gets one of the actual dimensions of the viewport, a value in pixels. More... | |
int | getActualTop () const |
Gets one of the actual dimensions of the viewport, a value in pixels. More... | |
int | getActualWidth () const |
Gets one of the actual dimensions of the viewport, a value in pixels. More... | |
uint8 | getCurrentMip () const |
TextureGpu * | getCurrentTarget () const |
ColourBufferType | getDrawBuffer () const |
Returns the current colour buffer type for this viewport. More... | |
Real | getHeight () const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. More... | |
Real | getLeft () const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. More... | |
uint32 | getLightVisibilityMask () const |
const String & | getMaterialScheme () const |
Get the material scheme which the viewport should use. More... | |
bool | getOverlaysEnabled () const |
Returns whether or not Overlay objects (created in the SceneManager) are displayed in this viewport. More... | |
int | getScissorActualHeight () const |
int | getScissorActualLeft () const |
int | getScissorActualTop () const |
int | getScissorActualWidth () const |
Real | getScissorHeight () const |
Real | getScissorLeft () const |
Real | getScissorTop () const |
Real | getScissorWidth () const |
Real | getTop () const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. More... | |
uint32 | getVisibilityMask () const |
Gets a per-viewport visibility mask. More... | |
Real | getWidth () const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0. More... | |
void | pointOrientedToScreen (const Vector2 &v, int orientationMode, Vector2 &outv) |
Convert oriented input point coordinates to screen coordinates. More... | |
void | pointOrientedToScreen (Real orientedX, Real orientedY, int orientationMode, Real &screenX, Real &screenY) |
bool | scissorsMatchViewport () const |
void | setDimensions (TextureGpu *newTarget, const Vector4 &relativeVp, const Vector4 &scissors, uint8 mipLevel) |
Sets the dimensions (after creation). More... | |
void | setDrawBuffer (ColourBufferType colourBuffer) |
Sets the draw buffer type for the next frame. More... | |
void | setMaterialScheme (const String &schemeName) |
Set the material scheme which the viewport should use. More... | |
void | setOverlaysEnabled (bool enabled) |
Tells this viewport whether it should display Overlay objects. More... | |
void | setScissors (Real left, Real top, Real width, Real height) |
Only sets the scissor regions. More... | |
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). More... | |
An abstraction of a viewport, i.e.
a rendering region on a render target.
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. |
Ogre::Viewport::Viewport | ( | ) |
|
virtual |
Default destructor.
void Ogre::Viewport::_clearUpdatedFlag | ( | ) |
bool Ogre::Viewport::_isUpdated | ( | ) | const |
void Ogre::Viewport::_setupAspectRatio | ( | Camera * | cullCamera | ) |
Sets a per-viewport visibility mask.
void Ogre::Viewport::_updateCullPhase01 | ( | Camera * | renderCamera, |
Camera * | cullCamera, | ||
const Camera * | lodCamera, | ||
uint8 | firstRq, | ||
uint8 | lastRq, | ||
bool | reuseCullData | ||
) |
Instructs the viewport to updates its contents.
void Ogre::Viewport::_updateDimensions | ( | ) |
Notifies the viewport of a possible change in dimensions.
void Ogre::Viewport::_updateRenderPhase02 | ( | Camera * | camera, |
const Camera * | lodCamera, | ||
uint8 | firstRq, | ||
uint8 | lastRq | ||
) |
bool Ogre::Viewport::coversEntireTarget | ( | ) | const |
void Ogre::Viewport::getActualDimensions | ( | int & | left, |
int & | top, | ||
int & | width, | ||
int & | height | ||
) | const |
Access to actual dimensions (based on target size).
int Ogre::Viewport::getActualHeight | ( | ) | const |
Gets one of the actual dimensions of the viewport, a value in pixels.
int Ogre::Viewport::getActualLeft | ( | ) | const |
Gets one of the actual dimensions of the viewport, a value in pixels.
int Ogre::Viewport::getActualTop | ( | ) | const |
Gets one of the actual dimensions of the viewport, a value in pixels.
int Ogre::Viewport::getActualWidth | ( | ) | const |
Gets one of the actual dimensions of the viewport, a value in pixels.
|
inline |
|
inline |
ColourBufferType Ogre::Viewport::getDrawBuffer | ( | ) | const |
Returns the current colour buffer type for this viewport.
Real Ogre::Viewport::getHeight | ( | ) | const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
Real Ogre::Viewport::getLeft | ( | ) | const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
|
inline |
|
inline |
Get the material scheme which the viewport should use.
bool Ogre::Viewport::getOverlaysEnabled | ( | ) | const |
Returns whether or not Overlay objects (created in the SceneManager) are displayed in this viewport.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Real Ogre::Viewport::getTop | ( | ) | const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
|
inline |
Gets a per-viewport visibility mask.
Real Ogre::Viewport::getWidth | ( | ) | const |
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
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 | ||
) |
bool Ogre::Viewport::scissorsMatchViewport | ( | ) | const |
void Ogre::Viewport::setDimensions | ( | TextureGpu * | newTarget, |
const Vector4 & | relativeVp, | ||
const Vector4 & | scissors, | ||
uint8 | mipLevel | ||
) |
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 |
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. |
|
inline |
Set the material scheme which the viewport should use.
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. |
Only sets the scissor regions.
The scissor rectangle must be fully inside the viewport rectangle. See setDimensions() for param description
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.