The IView graph node interface. More...
#include "murl_graph_i_view.h"
Public Member Functions | |
virtual INode * | GetNodeInterface ()=0 |
Get the mutable Graph::INode interface. More... | |
virtual const INode * | GetNodeInterface () const =0 |
Get the constant Graph::INode interface. More... | |
virtual IFrameBufferNodeTarget * | GetFrameBufferNodeTarget ()=0 |
Get the mutable IFrameBufferNodeTarget container. More... | |
virtual const IFrameBufferNodeTarget * | GetFrameBufferNodeTarget () const =0 |
Get the constant IFrameBufferNodeTarget container. More... | |
virtual Bool | SetDepthOrder (SInt32 depthOrder)=0 |
Set the view's absolute depth order. More... | |
virtual SInt32 | GetDepthOrder () const =0 |
Get the view's absolute depth order. More... | |
virtual Bool | SetMaskCoords (SInt32 left, SInt32 right, SInt32 top, SInt32 bottom)=0 |
Set the view mask's border coordinates. More... | |
virtual Bool | SetMaskCoordsX (SInt32 left, SInt32 right)=0 |
Set the view mask's horizontal border coordinates. More... | |
virtual Bool | SetMaskCoordsY (SInt32 top, SInt32 bottom)=0 |
Set the view mask's vertical border coordinates. More... | |
virtual SInt32 | GetLeftMaskCoord () const =0 |
Get the view mask's left border coordinate. More... | |
virtual SInt32 | GetRightMaskCoord () const =0 |
Get the view mask's right border coordinate. More... | |
virtual SInt32 | GetTopMaskCoord () const =0 |
Get the view mask's top border coordinate. More... | |
virtual SInt32 | GetBottomMaskCoord () const =0 |
Get the view mask's bottom border coordinate. More... | |
virtual Bool | SetMaskAnchors (IEnums::AlignmentX left, IEnums::AlignmentX right, IEnums::AlignmentY top, IEnums::AlignmentY bottom)=0 |
Set the view mask's border anchors. More... | |
virtual Bool | SetMaskAnchorsX (IEnums::AlignmentX left, IEnums::AlignmentX right)=0 |
Set the view mask's horizontal border anchors. More... | |
virtual Bool | SetMaskAnchorsY (IEnums::AlignmentY top, IEnums::AlignmentY bottom)=0 |
Set the view mask's vertical border anchors. More... | |
virtual IEnums::AlignmentX | GetLeftMaskAnchor () const =0 |
Get the view mask's left border anchor. More... | |
virtual IEnums::AlignmentX | GetRightMaskAnchor () const =0 |
Get the view mask's right border anchor. More... | |
virtual IEnums::AlignmentY | GetTopMaskAnchor () const =0 |
Get the view mask's top border anchor. More... | |
virtual IEnums::AlignmentY | GetBottomMaskAnchor () const =0 |
Get the view mask's bottom border anchor. More... | |
virtual Bool | SetUnitMeasures (IEnums::LengthMeasure measureX, IEnums::LengthMeasure measureY)=0 |
Set the view's unit measures for width and height. More... | |
virtual Bool | SetUnitMeasureX (IEnums::LengthMeasure measureX)=0 |
Set the view's width unit measure. More... | |
virtual Bool | SetUnitMeasureY (IEnums::LengthMeasure measureY)=0 |
Set the view's height unit measure. More... | |
virtual IEnums::LengthMeasure | GetUnitMeasureX () const =0 |
Get the view's width unit measure. More... | |
virtual IEnums::LengthMeasure | GetUnitMeasureY () const =0 |
Get the view's height unit measure. More... | |
virtual Real | GetUnitSizeX () const =0 |
Get the view's unit width. More... | |
virtual Real | GetUnitSizeY () const =0 |
Get the view's unit height. More... | |
virtual Bool | SetFieldOfView (Real fovX, Real fovY)=0 |
Set the field of view. More... | |
virtual Bool | SetFieldOfViewX (Real fovX)=0 |
Set the horizontal field of view. More... | |
virtual Bool | SetFieldOfViewY (Real fovY)=0 |
Set the vertical field of view, at the near plane. More... | |
virtual Real | GetFieldOfViewX () const =0 |
Get the horizontal field of view. More... | |
virtual Real | GetFieldOfViewY () const =0 |
Get the vertical field of view. More... | |
virtual Real | GetPixelCenterX () const =0 |
Get the horizontal pixel center offset. More... | |
virtual Real | GetPixelCenterY () const =0 |
Get the vertical pixel center offset. More... | |
virtual UInt32 | GetDisplaySurfaceSizeX () const =0 |
Get the output surface's actual width in pixels. More... | |
virtual UInt32 | GetDisplaySurfaceSizeY () const =0 |
Get the output surface's actual height in pixels. More... | |
virtual IEnums::Orientation | GetDisplayRendererOrientation () const =0 |
Get the renderer's surface orientation. More... | |
virtual IEnums::ScreenOrientation | GetScreenOrientation () const =0 |
Get the current screen orientation. More... | |
virtual Bool | HasDisplaySurfaceChanged () const =0 |
Check if the output surface changed since the most recent frame. More... | |
virtual UInt32 | GetNumberOfStages () const =0 |
Get the view's number of stages. More... | |
virtual Video::IView * | GetVideoViewObject (UInt32 stage) const =0 |
Get the view's internal video renderer object. More... | |
virtual Audio::IView * | GetAudioViewObject (UInt32 stage) const =0 |
Get the view's internal audio renderer object. More... | |
Detailed Description
The IView graph node interface.
A view specifies the actually visible area within an output surface. Which output surface is used can be controlled by setting the Graph::IFrameBufferNodeTarget retrieved from GetFrameBufferNodeTarget(). If a null pointer is given, the view will render to the system back buffer, otherwise it is possible to set the target to a given Graph::IFrameBuffer node, which will instruct the view to render to that custom frame buffer.
A view can have any number of cameras attached, see the description of Graph::ICamera and Graph::ICamera::GetViewNodeTarget().
If multiple views are attached to the same output buffer, their drawing order can be specified via SetDepthOrder(), with higher values being "nearer", i.e. rendered later.
To allow for only rendering to a rectangular sub-region of the output surface, the view's SetMaskCoords() and SetMaskAnchors() methods (and related ones) can be used. By default, the view covers the whole output surface, which is equivalent to all mask coordinates equalling zero, and the left, top, right and bottom anchors set to the corresponding alignment values (IEnums::ALIGNMENT_X_LEFT, IEnums::ALIGNMENT_Y_TOP and so on). See SetMaskCoords() for details.
Member Function Documentation
◆ GetNodeInterface() [1/2]
|
pure virtual |
Get the mutable Graph::INode interface.
This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.
- Returns
- The mutable Graph::INode interface, or null if not available
◆ GetNodeInterface() [2/2]
|
pure virtual |
Get the constant Graph::INode interface.
This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.
- Returns
- The constant Graph::INode interface, or null if not available
◆ GetFrameBufferNodeTarget() [1/2]
|
pure virtual |
Get the mutable IFrameBufferNodeTarget container.
This method returns a mutable pointer to the node's IFrameBufferNodeTarget container, which allows to set or query the frame buffer object the view is attached to.
- Returns
- The mutable IFrameBufferNodeTarget container, or null if not available
◆ GetFrameBufferNodeTarget() [2/2]
|
pure virtual |
Get the constant IFrameBufferNodeTarget container.
This method returns a constant pointer to the node's IFrameBufferNodeTarget container, which allows to query the frame buffer object the view is attached to.
- Returns
- The constant IFrameBufferNodeTarget container, or null if not available
◆ SetDepthOrder()
Set the view's absolute depth order.
Analogous to Graph::ICamera::SetDepthOrder().
- Parameters
-
depthOrder The absolute order of this view within its frame buffer.
- Returns
- true if successful.
◆ GetDepthOrder()
|
pure virtual |
Get the view's absolute depth order.
- Returns
- The absolute order of this view within its frame buffer.
◆ SetMaskCoords()
|
pure virtual |
Set the view mask's border coordinates.
To define a rectangular mask for the view, it is necessary to specify 4 values, one for each edge of the desired rectangle: left, right, top and bottom. In addition, it is necessary to specify an anchor point for each of these edges, via SetMaskAnchors() or related methods, which represents the absolute origin for the respective coordinate value. For example, if the left coordinate value is set to a value of 50 and the left anchor is set to IEnums::ALIGNMENT_X_LEFT, the mask is always anchored at the left window edge with an offset of 50 pixels to the right. If the left coordinate has a value of -200 and the left anchor is set to IEnums::ALIGNMENT_X_RIGHT, the mask's left border will always be 200 pixels left of the right window border. Note that the engine's window coordinate origin is at the left bottom corner of the surface with positive Y values running up. Therefore, to define e.g. a vertical mask that clips 100 pixels from both top and bottom, it is necessary to specify a value of +100 for the bottom coordinate (with the bottom anchor set to IEnums::ALIGNMENT_Y_BOTTOM), and a value of -100 for the top coordinate, with IEnums::ALIGNMENT_Y_TOP for the top anchor.
- Parameters
-
left The left mask coordinate. Positive values run to the right. right The right mask coordinate. Positive values run to the right. top The top mask coordinate. Positive values run up. bottom The bottom mask coordinate. Positive values run up.
- Returns
- true if successful.
◆ SetMaskCoordsX()
Set the view mask's horizontal border coordinates.
See SetMaskCoords() for details.
- Parameters
-
left The left mask coordinate. right The right mask coordinate.
- Returns
- true if successful.
◆ SetMaskCoordsY()
Set the view mask's vertical border coordinates.
See SetMaskCoords() for details.
- Parameters
-
top The top mask coordinate. bottom The bottom mask coordinate.
- Returns
- true if successful.
◆ GetLeftMaskCoord()
|
pure virtual |
Get the view mask's left border coordinate.
See SetMaskCoords() for details.
- Returns
- The left mask coordinate.
◆ GetRightMaskCoord()
|
pure virtual |
Get the view mask's right border coordinate.
See SetMaskCoords() for details.
- Returns
- The right mask coordinate.
◆ GetTopMaskCoord()
|
pure virtual |
Get the view mask's top border coordinate.
See SetMaskCoords() for details.
- Returns
- The top mask coordinate.
◆ GetBottomMaskCoord()
|
pure virtual |
Get the view mask's bottom border coordinate.
See SetMaskCoords() for details.
- Returns
- The bottom mask coordinate.
◆ SetMaskAnchors()
|
pure virtual |
Set the view mask's border anchors.
See SetMaskCoords() for details.
- Parameters
-
left The left mask anchor. right The right mask anchor. top The top mask anchor. bottom The bottom mask anchor.
- Returns
- true if successful.
◆ SetMaskAnchorsX()
|
pure virtual |
Set the view mask's horizontal border anchors.
See SetMaskCoords() for details.
- Parameters
-
left The left mask anchor. right The right mask anchor.
- Returns
- true if successful.
◆ SetMaskAnchorsY()
|
pure virtual |
Set the view mask's vertical border anchors.
See SetMaskCoords() for details.
- Parameters
-
top The top mask anchor. bottom The bottom mask anchor.
- Returns
- true if successful.
◆ GetLeftMaskAnchor()
|
pure virtual |
Get the view mask's left border anchor.
See SetMaskCoords() for details.
- Returns
- The left mask anchor.
◆ GetRightMaskAnchor()
|
pure virtual |
Get the view mask's right border anchor.
See SetMaskCoords() for details.
- Returns
- The right mask anchor.
◆ GetTopMaskAnchor()
|
pure virtual |
◆ GetBottomMaskAnchor()
|
pure virtual |
Get the view mask's bottom border anchor.
See SetMaskCoords() for details.
- Returns
- The bottom mask anchor.
◆ SetUnitMeasures()
|
pure virtual |
Set the view's unit measures for width and height.
If a camera attached to this view is defining its view volume via its unit size parameters for either X or Y direction or both (not via its FOV parameters), the respective unit measures defined here are taken into account for calculating the camera's projection matrix. By default, the view's unit measures in both dimensions are set to IEnums::LENGTH_MEASURE_PIXELS. Note that if the view is rendering to a frame buffer, this is the only allowed value.
- Parameters
-
measureX The width unit measure. measureY The height unit measure.
- Returns
- true if successful.
◆ SetUnitMeasureX()
|
pure virtual |
Set the view's width unit measure.
See SetUnitMeasures().
- Parameters
-
measureX The width unit measure.
- Returns
- true if successful.
◆ SetUnitMeasureY()
|
pure virtual |
Set the view's height unit measure.
See SetUnitMeasures().
- Parameters
-
measureY The height unit measure.
- Returns
- true if successful.
◆ GetUnitMeasureX()
|
pure virtual |
Get the view's width unit measure.
- Returns
- The width unit measure.
◆ GetUnitMeasureY()
|
pure virtual |
Get the view's height unit measure.
- Returns
- The height unit measure.
◆ GetUnitSizeX()
|
pure virtual |
Get the view's unit width.
If rendering to the system back buffer, the value returned equals the value specified in the application's IEngineConfiguration. If rendering to a frame buffer, this value is always 1.
- Returns
- The view's unit width
◆ GetUnitSizeY()
|
pure virtual |
Get the view's unit height.
If rendering to the system back buffer, the value returned equals the value specified in the application's IEngineConfiguration. If rendering to a frame buffer, this value is always 1.
- Returns
- The view's unit height
◆ SetFieldOfView()
Set the field of view.
This method sets the view's field of view in both horizontal and vertical direction. These values act as multiplicators for any attached cameras, i.e. if the view has a FOV of 3 and the camera a FOV of 2, the resulting visible FOV will be 6. By default, both values are set to 1.
- Parameters
-
fovX The horizontal field of view. fovY The vertical field of view.
- Returns
- true if successful.
◆ SetFieldOfViewX()
Set the horizontal field of view.
- Parameters
-
fovX The horizontal field of view.
- Returns
- true if successful.
◆ SetFieldOfViewY()
Set the vertical field of view, at the near plane.
- Parameters
-
fovY The vertical field of view.
- Returns
- true if successful.
◆ GetFieldOfViewX()
|
pure virtual |
Get the horizontal field of view.
- Returns
- The horizontal field of view.
◆ GetFieldOfViewY()
|
pure virtual |
Get the vertical field of view.
- Returns
- The vertical field of view.
◆ GetPixelCenterX()
|
pure virtual |
Get the horizontal pixel center offset.
The value returned by this method represents a horizontal offset usually in the range from 0.0 to 1.0, which should be applied to the projection so that integer coordinate values directly map to a unique pixel in the output surface. This method returns the corresponding value from the IEngineConfiguration, which is usually set by the platform at application startup.
- Returns
- The horizontal pixel center offset.
◆ GetPixelCenterY()
|
pure virtual |
Get the vertical pixel center offset.
Analogous to GetPixelCenterX().
- Returns
- The vertical pixel center offset.
◆ GetDisplaySurfaceSizeX()
|
pure virtual |
Get the output surface's actual width in pixels.
If rendering to the system back buffer, this value reflects the current width of the output surface from the application's IAppConfiguration; this value may change when e.g. the window size is changed in a windowed application. If rendering to a frame buffer, this value reflects the frame buffer's actual width.
- Returns
- The output surface width in pixels.
◆ GetDisplaySurfaceSizeY()
|
pure virtual |
Get the output surface's actual height in pixels.
If rendering to the system back buffer, this value reflects the current height of the output surface from the application's IAppConfiguration; this value may change when e.g. the window size is changed in a windowed application. If rendering to a frame buffer, this value reflects the frame buffer's actual height.
- Returns
- The output surface height in pixels.
◆ GetDisplayRendererOrientation()
|
pure virtual |
Get the renderer's surface orientation.
If rendering to the system back buffer, this value represents the current renderer orientation in the application's IAppConfiguration. If rendering to a frame buffer, the actual value is controlled by the orientation specified in the Graph::IFrameBuffer node; see Graph::IFrameBuffer::SetRendererOrientation() for details.
- Returns
- The current renderer orientation.
◆ GetScreenOrientation()
|
pure virtual |
Get the current screen orientation.
- Returns
- The current screen orientation.
◆ HasDisplaySurfaceChanged()
|
pure virtual |
Check if the output surface changed since the most recent frame.
- Returns
- true if the output surface dimensions have changed.
◆ GetNumberOfStages()
|
pure virtual |
Get the view's number of stages.
- Returns
- The number of stages.
◆ GetVideoViewObject()
|
pure virtual |
Get the view's internal video renderer object.
- Parameters
-
stage The stage to query.
- Returns
- The video renderer object.
◆ GetAudioViewObject()
|
pure virtual |
Get the view's internal audio renderer object.
- Parameters
-
stage The stage to query.
- Returns
- The audio renderer object.
The documentation for this interface was generated from the following file:
- murl_graph_i_view.h