Go to the documentation of this file.
28 #ifndef __Viewport_H__
29 #define __Viewport_H__
129 Real depth = 1.0f,
unsigned short stencil = 0);
276 { mMaterialSchemeName = schemeName; }
281 {
return mMaterialSchemeName; }
286 int &left,
int &top,
int &width,
int &height )
const;
const String & getMaterialScheme(void) const
Get the material scheme which the viewport should use.
bool getOverlaysEnabled(void) const
Returns whether or not Overlay objects (created in the SceneManager) are displayed in this viewport.
void setBackgroundColour(const ColourValue &colour)
Sets the initial background colour of the viewport (before rendering).
OrientationMode mOrientationMode
Viewport orientation mode.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
vector< Listener * >::type ListenerList
unsigned int _getNumRenderedFaces(void) const
Gets the number of rendered faces in the last update.
void removeListener(Listener *l)
Remove a listener to this camera.
A viewpoint from which the scene will be rendered.
Real getDepthClear(void) const
Gets the default depth buffer value to which the viewport is cleared.
void _updateDimensions(void)
Notifies the viewport of a possible change in dimensions.
bool mIsAutoUpdated
Automatic rendering on/off.
ColourValue mBackColour
Background options.
const ColourValue & getBackgroundColour(void) const
Gets the background colour.
static OrientationMode mDefaultOrientationMode
void update(void)
Instructs the viewport to updates its contents.
unsigned int mClearBuffers
void setOverlaysEnabled(bool enabled)
Tells this viewport whether it should display Overlay objects.
Listener interface so you can be notified of Viewport changes.
static void setDefaultOrientationMode(OrientationMode orientationMode)
Set the initial orientation mode of viewports.
bool getSkiesEnabled(void) const
Returns whether or not skies (created in the SceneManager) are displayed in this viewport.
void setDimensions(Real left, Real top, Real width, Real height)
Sets the dimensions (after creation).
void setVisibilityMask(uint32 mask)
Sets a per-viewport visibility mask.
unsigned int _getNumRenderedBatches(void) const
Gets the number of rendered batches in the last update.
Real getWidth(void) const
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
RenderTarget * getTarget(void) const
Retrieves a pointer to the render target for this viewport.
OrientationMode
Specifies orientation mode.
RenderQueueInvocationSequence * mRQSequence
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.
A 'canvas' which can receive the results of a rendering operation.
String mMaterialSchemeName
Material scheme.
virtual void viewportDimensionsChanged(Viewport *viewport)
Notification of when target listening Viewport's dimensions changed.
Class to hold a linear sequence of RenderQueueInvocation objects.
An abstraction of a viewport, i.e.
virtual void setRenderQueueInvocationSequenceName(const String &sequenceName)
Sets the use of a custom RenderQueueInvocationSequence for rendering this target.
void getActualDimensions(int &left, int &top, int &width, int &height) const
Access to actual dimensions (based on target size).
virtual const String & getRenderQueueInvocationSequenceName(void) const
Gets the name of the render queue invocation sequence for this target.
unsigned int getClearBuffers(void) const
Gets which buffers are to be cleared each frame.
int getActualWidth(void) const
Gets one of the actual dimensions of the viewport, a value in pixels.
void setCamera(Camera *cam)
Sets the camera to use for rendering to this viewport.
int getActualLeft(void) const
Gets one of the actual dimensions of the viewport, a value in pixels.
uint getVisibilityMask(void) const
Gets a per-viewport visibility mask.
void addListener(Listener *l)
Add a listener to this camera.
RenderQueueInvocationSequence * _getRenderQueueInvocationSequence(void)
Get the invocation sequence - will return null if using standard.
Real getHeight(void) const
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
int getActualHeight(void) const
Gets one of the actual dimensions of the viewport, a value in pixels.
void setSkiesEnabled(bool enabled)
Tells this viewport whether it should display skies.
bool getClearEveryFrame(void) const
Determines if the viewport is cleared before every frame.
OrientationMode getOrientationMode() const
Get the orientation mode of the viewport.
Viewport(Camera *camera, RenderTarget *target, Real left, Real top, Real width, Real height, int ZOrder)
The usual constructor.
static OrientationMode getDefaultOrientationMode()
Get the initial orientation mode of viewports.
int getActualTop(void) const
Gets one of the actual dimensions of the viewport, a value in pixels.
void pointOrientedToScreen(const Vector2 &v, int orientationMode, Vector2 &outv)
Convert oriented input point coordinates to screen coordinates.
virtual ~Viewport()
Default destructor.
void setMaterialScheme(const String &schemeName)
Set the material scheme which the viewport should use.
void setClearEveryFrame(bool clear, unsigned int buffers=FBT_COLOUR|FBT_DEPTH)
Determines whether to clear the viewport before rendering.
int getZOrder(void) const
Gets the Z-Order of this viewport.
Class representing colour.
bool isAutoUpdated() const
Gets whether this viewport is automatically updated if Ogre's rendering loop or RenderTarget::update ...
void setAutoUpdated(bool autoupdate)
Sets whether this viewport should be automatically updated if Ogre's rendering loop or RenderTarget::...
Standard 2-dimensional vector.
static const ColourValue Black
void setDepthClear(Real depth)
Sets the initial depth buffer value of the viewport (before rendering).
virtual void viewportCameraChanged(Viewport *viewport)
Notification of when a new camera is set to target listening Viewport.
float Real
Software floating point type.
Real getTop(void) const
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
void pointOrientedToScreen(Real orientedX, Real orientedY, int orientationMode, Real &screenX, Real &screenY)
virtual void viewportDestroyed(Viewport *viewport)
Notification of when target listening Viewport's is destroyed.
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 _clearUpdatedFlag(void)
bool _isUpdated(void) const
void setOrientationMode(OrientationMode orientationMode, bool setDefault=true)
Set the orientation mode of the viewport.
Real getLeft(void) const
Gets one of the relative dimensions of the viewport, a value between 0.0 and 1.0.
Camera * getCamera(void) const
Retrieves a pointer to the camera for this viewport.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.