The IView graph node interface. More...

#include "murl_graph_i_view.h"

Inheritance diagram for Murl::Graph::IView:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual IFrameBufferNodeTargetGetFrameBufferNodeTarget ()=0
 Get the mutable IFrameBufferNodeTarget container. More...
 
virtual const IFrameBufferNodeTargetGetFrameBufferNodeTarget () 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::IViewGetVideoViewObject (UInt32 stage) const =0
 Get the view's internal video renderer object. More...
 
virtual Audio::IViewGetAudioViewObject (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]

virtual INode* Murl::Graph::IView::GetNodeInterface ( )
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]

virtual const INode* Murl::Graph::IView::GetNodeInterface ( ) const
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]

virtual IFrameBufferNodeTarget* Murl::Graph::IView::GetFrameBufferNodeTarget ( )
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]

virtual const IFrameBufferNodeTarget* Murl::Graph::IView::GetFrameBufferNodeTarget ( ) const
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()

virtual Bool Murl::Graph::IView::SetDepthOrder ( SInt32  depthOrder)
pure virtual

Set the view's absolute depth order.

Analogous to Graph::ICamera::SetDepthOrder().

Parameters
depthOrderThe absolute order of this view within its frame buffer.
Returns
true if successful.

◆ GetDepthOrder()

virtual SInt32 Murl::Graph::IView::GetDepthOrder ( ) const
pure virtual

Get the view's absolute depth order.

Returns
The absolute order of this view within its frame buffer.

◆ SetMaskCoords()

virtual Bool Murl::Graph::IView::SetMaskCoords ( SInt32  left,
SInt32  right,
SInt32  top,
SInt32  bottom 
)
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
leftThe left mask coordinate. Positive values run to the right.
rightThe right mask coordinate. Positive values run to the right.
topThe top mask coordinate. Positive values run up.
bottomThe bottom mask coordinate. Positive values run up.
Returns
true if successful.

◆ SetMaskCoordsX()

virtual Bool Murl::Graph::IView::SetMaskCoordsX ( SInt32  left,
SInt32  right 
)
pure virtual

Set the view mask's horizontal border coordinates.

See SetMaskCoords() for details.

Parameters
leftThe left mask coordinate.
rightThe right mask coordinate.
Returns
true if successful.

◆ SetMaskCoordsY()

virtual Bool Murl::Graph::IView::SetMaskCoordsY ( SInt32  top,
SInt32  bottom 
)
pure virtual

Set the view mask's vertical border coordinates.

See SetMaskCoords() for details.

Parameters
topThe top mask coordinate.
bottomThe bottom mask coordinate.
Returns
true if successful.

◆ GetLeftMaskCoord()

virtual SInt32 Murl::Graph::IView::GetLeftMaskCoord ( ) const
pure virtual

Get the view mask's left border coordinate.

See SetMaskCoords() for details.

Returns
The left mask coordinate.

◆ GetRightMaskCoord()

virtual SInt32 Murl::Graph::IView::GetRightMaskCoord ( ) const
pure virtual

Get the view mask's right border coordinate.

See SetMaskCoords() for details.

Returns
The right mask coordinate.

◆ GetTopMaskCoord()

virtual SInt32 Murl::Graph::IView::GetTopMaskCoord ( ) const
pure virtual

Get the view mask's top border coordinate.

See SetMaskCoords() for details.

Returns
The top mask coordinate.

◆ GetBottomMaskCoord()

virtual SInt32 Murl::Graph::IView::GetBottomMaskCoord ( ) const
pure virtual

Get the view mask's bottom border coordinate.

See SetMaskCoords() for details.

Returns
The bottom mask coordinate.

◆ SetMaskAnchors()

virtual Bool Murl::Graph::IView::SetMaskAnchors ( IEnums::AlignmentX  left,
IEnums::AlignmentX  right,
IEnums::AlignmentY  top,
IEnums::AlignmentY  bottom 
)
pure virtual

Set the view mask's border anchors.

See SetMaskCoords() for details.

Parameters
leftThe left mask anchor.
rightThe right mask anchor.
topThe top mask anchor.
bottomThe bottom mask anchor.
Returns
true if successful.

◆ SetMaskAnchorsX()

virtual Bool Murl::Graph::IView::SetMaskAnchorsX ( IEnums::AlignmentX  left,
IEnums::AlignmentX  right 
)
pure virtual

Set the view mask's horizontal border anchors.

See SetMaskCoords() for details.

Parameters
leftThe left mask anchor.
rightThe right mask anchor.
Returns
true if successful.

◆ SetMaskAnchorsY()

virtual Bool Murl::Graph::IView::SetMaskAnchorsY ( IEnums::AlignmentY  top,
IEnums::AlignmentY  bottom 
)
pure virtual

Set the view mask's vertical border anchors.

See SetMaskCoords() for details.

Parameters
topThe top mask anchor.
bottomThe bottom mask anchor.
Returns
true if successful.

◆ GetLeftMaskAnchor()

virtual IEnums::AlignmentX Murl::Graph::IView::GetLeftMaskAnchor ( ) const
pure virtual

Get the view mask's left border anchor.

See SetMaskCoords() for details.

Returns
The left mask anchor.

◆ GetRightMaskAnchor()

virtual IEnums::AlignmentX Murl::Graph::IView::GetRightMaskAnchor ( ) const
pure virtual

Get the view mask's right border anchor.

See SetMaskCoords() for details.

Returns
The right mask anchor.

◆ GetTopMaskAnchor()

virtual IEnums::AlignmentY Murl::Graph::IView::GetTopMaskAnchor ( ) const
pure virtual

Get the view mask's top border anchor.

See SetMaskCoords() for details.

Returns
The top mask anchor.

◆ GetBottomMaskAnchor()

virtual IEnums::AlignmentY Murl::Graph::IView::GetBottomMaskAnchor ( ) const
pure virtual

Get the view mask's bottom border anchor.

See SetMaskCoords() for details.

Returns
The bottom mask anchor.

◆ SetUnitMeasures()

virtual Bool Murl::Graph::IView::SetUnitMeasures ( IEnums::LengthMeasure  measureX,
IEnums::LengthMeasure  measureY 
)
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
measureXThe width unit measure.
measureYThe height unit measure.
Returns
true if successful.

◆ SetUnitMeasureX()

virtual Bool Murl::Graph::IView::SetUnitMeasureX ( IEnums::LengthMeasure  measureX)
pure virtual

Set the view's width unit measure.

See SetUnitMeasures().

Parameters
measureXThe width unit measure.
Returns
true if successful.

◆ SetUnitMeasureY()

virtual Bool Murl::Graph::IView::SetUnitMeasureY ( IEnums::LengthMeasure  measureY)
pure virtual

Set the view's height unit measure.

See SetUnitMeasures().

Parameters
measureYThe height unit measure.
Returns
true if successful.

◆ GetUnitMeasureX()

virtual IEnums::LengthMeasure Murl::Graph::IView::GetUnitMeasureX ( ) const
pure virtual

Get the view's width unit measure.

Returns
The width unit measure.

◆ GetUnitMeasureY()

virtual IEnums::LengthMeasure Murl::Graph::IView::GetUnitMeasureY ( ) const
pure virtual

Get the view's height unit measure.

Returns
The height unit measure.

◆ GetUnitSizeX()

virtual Real Murl::Graph::IView::GetUnitSizeX ( ) const
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()

virtual Real Murl::Graph::IView::GetUnitSizeY ( ) const
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()

virtual Bool Murl::Graph::IView::SetFieldOfView ( Real  fovX,
Real  fovY 
)
pure virtual

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
fovXThe horizontal field of view.
fovYThe vertical field of view.
Returns
true if successful.

◆ SetFieldOfViewX()

virtual Bool Murl::Graph::IView::SetFieldOfViewX ( Real  fovX)
pure virtual

Set the horizontal field of view.

Parameters
fovXThe horizontal field of view.
Returns
true if successful.

◆ SetFieldOfViewY()

virtual Bool Murl::Graph::IView::SetFieldOfViewY ( Real  fovY)
pure virtual

Set the vertical field of view, at the near plane.

Parameters
fovYThe vertical field of view.
Returns
true if successful.

◆ GetFieldOfViewX()

virtual Real Murl::Graph::IView::GetFieldOfViewX ( ) const
pure virtual

Get the horizontal field of view.

Returns
The horizontal field of view.

◆ GetFieldOfViewY()

virtual Real Murl::Graph::IView::GetFieldOfViewY ( ) const
pure virtual

Get the vertical field of view.

Returns
The vertical field of view.

◆ GetPixelCenterX()

virtual Real Murl::Graph::IView::GetPixelCenterX ( ) const
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()

virtual Real Murl::Graph::IView::GetPixelCenterY ( ) const
pure virtual

Get the vertical pixel center offset.

Analogous to GetPixelCenterX().

Returns
The vertical pixel center offset.

◆ GetDisplaySurfaceSizeX()

virtual UInt32 Murl::Graph::IView::GetDisplaySurfaceSizeX ( ) const
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()

virtual UInt32 Murl::Graph::IView::GetDisplaySurfaceSizeY ( ) const
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()

virtual IEnums::Orientation Murl::Graph::IView::GetDisplayRendererOrientation ( ) const
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()

virtual IEnums::ScreenOrientation Murl::Graph::IView::GetScreenOrientation ( ) const
pure virtual

Get the current screen orientation.

Returns
The current screen orientation.

◆ HasDisplaySurfaceChanged()

virtual Bool Murl::Graph::IView::HasDisplaySurfaceChanged ( ) const
pure virtual

Check if the output surface changed since the most recent frame.

Returns
true if the output surface dimensions have changed.

◆ GetNumberOfStages()

virtual UInt32 Murl::Graph::IView::GetNumberOfStages ( ) const
pure virtual

Get the view's number of stages.

Returns
The number of stages.

◆ GetVideoViewObject()

virtual Video::IView* Murl::Graph::IView::GetVideoViewObject ( UInt32  stage) const
pure virtual

Get the view's internal video renderer object.

Parameters
stageThe stage to query.
Returns
The video renderer object.

◆ GetAudioViewObject()

virtual Audio::IView* Murl::Graph::IView::GetAudioViewObject ( UInt32  stage) const
pure virtual

Get the view's internal audio renderer object.

Parameters
stageThe stage to query.
Returns
The audio renderer object.

The documentation for this interface was generated from the following file:
  • murl_graph_i_view.h


Copyright © 2011-2024 Spraylight GmbH.