![]() |
Murl Engine API
Version 2018.3
|
The IView graph node interface. More...
#include <murl_graph_i_view.h>
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.
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... | |
|
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.
|
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.
|
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.
|
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.
Set the view's absolute depth order.
Analogous to Graph::ICamera::SetDepthOrder().
depthOrder | The absolute order of this view within its frame buffer. |
|
pure virtual |
Get the view's absolute depth order.
|
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.
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. |
Set the view mask's horizontal border coordinates.
See SetMaskCoords() for details.
left | The left mask coordinate. |
right | The right mask coordinate. |
Set the view mask's vertical border coordinates.
See SetMaskCoords() for details.
top | The top mask coordinate. |
bottom | The bottom mask coordinate. |
|
pure virtual |
Get the view mask's left border coordinate.
See SetMaskCoords() for details.
|
pure virtual |
Get the view mask's right border coordinate.
See SetMaskCoords() for details.
|
pure virtual |
Get the view mask's top border coordinate.
See SetMaskCoords() for details.
|
pure virtual |
Get the view mask's bottom border coordinate.
See SetMaskCoords() for details.
|
pure virtual |
Set the view mask's border anchors.
See SetMaskCoords() for details.
left | The left mask anchor. |
right | The right mask anchor. |
top | The top mask anchor. |
bottom | The bottom mask anchor. |
|
pure virtual |
Set the view mask's horizontal border anchors.
See SetMaskCoords() for details.
left | The left mask anchor. |
right | The right mask anchor. |
|
pure virtual |
Set the view mask's vertical border anchors.
See SetMaskCoords() for details.
top | The top mask anchor. |
bottom | The bottom mask anchor. |
|
pure virtual |
Get the view mask's left border anchor.
See SetMaskCoords() for details.
|
pure virtual |
Get the view mask's right border anchor.
See SetMaskCoords() for details.
|
pure virtual |
|
pure virtual |
Get the view mask's bottom border anchor.
See SetMaskCoords() for details.
|
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.
measureX | The width unit measure. |
measureY | The height unit measure. |
|
pure virtual |
Set the view's width unit measure.
See SetUnitMeasures().
measureX | The width unit measure. |
|
pure virtual |
Set the view's height unit measure.
See SetUnitMeasures().
measureY | The height unit measure. |
|
pure virtual |
Get the view's width unit measure.
|
pure virtual |
Get the view's height unit measure.
|
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.
|
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.
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.
fovX | The horizontal field of view. |
fovY | The vertical field of view. |
Set the horizontal field of view.
fovX | The horizontal field of view. |
Set the vertical field of view, at the near plane.
fovY | The vertical field of view. |
|
pure virtual |
Get the horizontal field of view.
|
pure virtual |
Get the vertical field of view.
|
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.
|
pure virtual |
Get the vertical pixel center offset.
Analogous to GetPixelCenterX().
|
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.
|
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.
|
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.
|
pure virtual |
Get the current screen orientation.
|
pure virtual |
Check if the output surface changed since the most recent frame.
|
pure virtual |
Get the view's number of stages.
|
pure virtual |
Get the view's internal video renderer object.
stage | The stage to query. |
|
pure virtual |
Get the view's internal audio renderer object.
stage | The stage to query. |