The ICamera graph node interface. More...

#include "murl_graph_i_camera.h"

Inheritance diagram for Murl::Graph::ICamera:

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 ISubjectGetSubjectInterface ()=0
 Get the mutable ISubject interface. More...
 
virtual const ISubjectGetSubjectInterface () const =0
 Get the constant ISubject interface. More...
 
virtual ICameraNodeTargetGetSubCameraNodeTarget ()=0
 Get the mutable container holding the optional child cameras. More...
 
virtual const ICameraNodeTargetGetSubCameraNodeTarget () const =0
 Get the constant container holding the optional child cameras. More...
 
virtual IViewNodeTargetGetViewNodeTarget ()=0
 Get the mutable IViewNodeTarget container. More...
 
virtual const IViewNodeTargetGetViewNodeTarget () const =0
 Get the constant IViewNodeTarget container. More...
 
virtual Bool SetProjectionType (IEnums::ProjectionType type)=0
 Set the projection type. More...
 
virtual IEnums::ProjectionType GetProjectionType () const =0
 Get the projection type. More...
 
virtual Bool SetDepthOrder (SInt32 depthOrder)=0
 Set the camera's absolute depth order. More...
 
virtual SInt32 GetDepthOrder () const =0
 Get the camera's absolute depth order. More...
 
virtual Bool SetFrontFacingVertexOrder (IEnums::VertexOrder order)=0
 Set the winding order for front-facing polygons. More...
 
virtual IEnums::VertexOrder GetFrontFacingVertexOrder () const =0
 Get the winding order for front-facing polygons. More...
 
virtual Bool SetDepthSortMode (IEnums::DepthSortMode mode)=0
 Set the depth sort mode for geometries within this camera. More...
 
virtual IEnums::DepthSortMode GetDepthSortMode () const =0
 Get the depth sort mode for geometries within this camera. More...
 
virtual Bool SetScreenOrientation (IEnums::ScreenOrientation orientation)=0
 Set the allowed screen orientation of the camera. More...
 
virtual IEnums::ScreenOrientation GetScreenOrientation () const =0
 Get the depth sort mode for geometries within this camera. More...
 
virtual Bool SetAutoDeactivationEnabled (Bool enabled)=0
 Enable/disable automatic deactivation if no geometry is to be rendered. More...
 
virtual Bool IsAutoDeactivationEnabled () const =0
 Check if automatic deactivation is enabled if no geometry is to be rendered. More...
 
virtual Bool SetColorBufferClearingEnabled (Bool enabled)=0
 Enable/disable clearing of the render target's color buffer. More...
 
virtual Bool IsColorBufferClearingEnabled () const =0
 Check if clearing of the render target's color buffer is enabled. More...
 
virtual Bool SetDepthBufferClearingEnabled (Bool enabled)=0
 Enable/disable clearing of the render target's depth buffer. More...
 
virtual Bool IsDepthBufferClearingEnabled () const =0
 Check if clearing of the render target's depth buffer is enabled. More...
 
virtual Bool SetStencilBufferClearingEnabled (Bool enabled)=0
 Enable/disable clearing of the render target's stencil buffer. More...
 
virtual Bool IsStencilBufferClearingEnabled () const =0
 Check if clearing of the render target's stencil buffer is enabled. More...
 
virtual Bool SetColorBufferClearValue (const Color &value)=0
 Set the clear color in effect when color buffer clearing is enabled. More...
 
virtual const ColorGetColorBufferClearValue () const =0
 Get the clear color in effect when color buffer clearing is enabled. More...
 
virtual Bool SetDepthBufferClearValue (Real value)=0
 Set the clear value in effect when depth buffer clearing is enabled. More...
 
virtual Real GetDepthBufferClearValue () const =0
 Get the clear value in effect when depth buffer clearing is enabled. More...
 
virtual Bool SetStencilBufferClearValue (UInt32 value)=0
 Set the clear value in effect when stencil buffer clearing is enabled. More...
 
virtual UInt32 GetStencilBufferClearValue () const =0
 Get the clear value in effect when stencil buffer clearing is enabled. More...
 
virtual Bool SetBorderCoords (SInt32 left, SInt32 right, SInt32 top, SInt32 bottom)=0
 Set the camera's view volume border coordinates. More...
 
virtual Bool SetBorderCoordsX (SInt32 left, SInt32 right)=0
 Set the camera's horizontal view volume border coordinates. More...
 
virtual Bool SetBorderCoordsY (SInt32 top, SInt32 bottom)=0
 Set the camera's vertical view volume border coordinates. More...
 
virtual SInt32 GetLeftBorderCoord () const =0
 Get the camera's left view volume border coordinate. More...
 
virtual SInt32 GetRightBorderCoord () const =0
 Get the camera's right view volume border coordinate. More...
 
virtual SInt32 GetTopBorderCoord () const =0
 Get the camera's top view volume border coordinate. More...
 
virtual SInt32 GetBottomBorderCoord () const =0
 Get the camera's bottom view volume border coordinate. More...
 
virtual Bool SetBorderAnchors (IEnums::AlignmentX left, IEnums::AlignmentX right, IEnums::AlignmentY top, IEnums::AlignmentY bottom)=0
 Set the camera's view volume border anchors. More...
 
virtual Bool SetBorderAnchorsX (IEnums::AlignmentX left, IEnums::AlignmentX right)=0
 Set the camera's horizontal view volume border anchors. More...
 
virtual Bool SetBorderAnchorsY (IEnums::AlignmentY top, IEnums::AlignmentY bottom)=0
 Set the camera's vertical view volume border anchors. More...
 
virtual IEnums::AlignmentX GetLeftBorderAnchor () const =0
 Get the camera's left view volume border anchor. More...
 
virtual IEnums::AlignmentX GetRightBorderAnchor () const =0
 Get the camera's right view volume border anchor. More...
 
virtual IEnums::AlignmentY GetTopBorderAnchor () const =0
 Get the camera's top view volume border anchor. More...
 
virtual IEnums::AlignmentY GetBottomBorderAnchor () const =0
 Get the camera's bottom view volume border anchor. More...
 
virtual Bool SetBorderMaskEnabled (Bool enabled)=0
 Enable/disable border masking. More...
 
virtual Bool IsBorderMaskEnabled () const =0
 Check if border masking is enabled. More...
 
virtual Bool SetAspectClippingEnabled (Bool enabled)=0
 Enable/disable aspect clipping. More...
 
virtual Bool IsAspectClippingEnabled () const =0
 Check if aspect clipping is enabled. More...
 
virtual Bool SetAspectRatio (Real ratio)=0
 Set the camera's aspect ratio. More...
 
virtual Real GetAspectRatio () const =0
 Get the current aspect ratio. More...
 
virtual Bool SetFieldOfView (Real fovX, Real fovY)=0
 Set the field of view at the near plane. More...
 
virtual Bool SetFieldOfViewX (Real fovX)=0
 Set the horizontal field of view, at the near plane. 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 Bool SetUnitSize (Real unitSizeX, Real unitSizeY)=0
 Set the unit size, at the near plane. More...
 
virtual Bool SetUnitSizeX (Real unitSizeX)=0
 Set the horizontal unit size, at the near plane. More...
 
virtual Bool SetUnitSizeY (Real unitSizeY)=0
 Set the vertical unit size, at the near plane. More...
 
virtual Real GetUnitSizeX () const =0
 Get the horizontal unit size. More...
 
virtual Real GetUnitSizeY () const =0
 Get the vertical unit size. More...
 
virtual Bool SetCenter (Real centerX, Real centerY)=0
 Set the projection center. More...
 
virtual Bool SetCenterX (Real centerX)=0
 Set the horizontal projection center. More...
 
virtual Bool SetCenterY (Real centerY)=0
 Set the vertical projection center. More...
 
virtual Real GetCenterX () const =0
 Get the horizontal projection center. More...
 
virtual Real GetCenterY () const =0
 Get the vertical projection center. More...
 
virtual Bool SetShear (Real shearX, Real shearY)=0
 Set the projection shearing. More...
 
virtual Bool SetShearX (Real shearX)=0
 Set the horizontal projection shearing. More...
 
virtual Bool SetShearY (Real shearY)=0
 Set the vertical projection shearing. More...
 
virtual Real GetShearX () const =0
 Get the horizontal projection shearing. More...
 
virtual Real GetShearY () const =0
 Get the vertical projection shearing. More...
 
virtual Bool SetPosition (Real posX, Real posY)=0
 Set the relative position within the view. More...
 
virtual Bool SetPositionX (Real posX)=0
 Set the relative horizontal position within the view. More...
 
virtual Bool SetPositionY (Real posY)=0
 Set the relative vertical position within the view. More...
 
virtual Real GetPositionX () const =0
 Get the relative horizontal position within the view. More...
 
virtual Real GetPositionY () const =0
 Get the relative vertical position within the view. More...
 
virtual Bool SetSize (Real sizeX, Real sizeY)=0
 Set the relative size within the view. More...
 
virtual Bool SetSizeX (Real sizeX)=0
 Set the relative horizontal size within the view. More...
 
virtual Bool SetSizeY (Real sizeY)=0
 Set the relative vertical size within the view. More...
 
virtual Real GetSizeX () const =0
 Get the relative horizontal size within the view. More...
 
virtual Real GetSizeY () const =0
 Get the relative vertical size within the view. More...
 
virtual Bool SetNearAndFarPlaneZ (Real nearZ, Real farZ)=0
 Set the absolute distances for both near and far clipping planes. More...
 
virtual Bool SetNearPlaneZ (Real nearZ)=0
 Set the absolute distance for the near clipping plane. More...
 
virtual Bool SetFarPlaneZ (Real farZ)=0
 Set the absolute distance for the far clipping plane. More...
 
virtual Real GetNearPlaneZ () const =0
 Get the absolute distance for the near clipping plane. More...
 
virtual Real GetFarPlaneZ () const =0
 Get the absolute distance for the far clipping plane. More...
 
virtual Bool SetClipPlane (const Vector &clipPlane)=0
 Set a user-defined view volume clipping plane in world space. More...
 
virtual Bool SetClipPlane (const Vector &position, const Vector &normal)=0
 Set a user-defined view volume clipping plane in world space. More...
 
virtual const VectorGetClipPlane () const =0
 Get the user-defined view volume clipping plane in world space. More...
 
virtual Vector GetLocalPositionFromScreen (const Vector &screenCoord) const =0
 Calculate the camera space position from given screen coordinates. More...
 
virtual Vector GetLocalPositionFromScreen (Real screenX, Real screenY, Real distance) const =0
 Calculate the camera space position from given screen coordinates. More...
 
virtual Vector GetWorldPositionFromScreen (const Vector &screenCoord) const =0
 Calculate the world-space position from given screen coordinates. More...
 
virtual Vector GetWorldPositionFromScreen (Real screenX, Real screenY, Real distance) const =0
 Calculate the world-space position from given screen coordinates. More...
 
virtual Vector GetScreenPositionFromLocal (const Vector &localCoord) const =0
 Calculate the screen coordinates from a given coordinate in camera space. More...
 
virtual Vector GetScreenPositionFromLocal (Real localX, Real localY, Real localZ) const =0
 Calculate the screen coordinates from a given coordinate in camera space. More...
 
virtual Vector GetScreenPositionFromWorld (const Vector &worldCoord) const =0
 Calculate the screen coordinates from a given coordinate in world space. More...
 
virtual Vector GetScreenPositionFromWorld (Real worldX, Real worldY, Real worldZ) const =0
 Calculate the screen coordinates from a given coordinate in world space. More...
 
virtual UInt32 GetNumberOfStages () const =0
 Get the camera's number of stages. More...
 
virtual Video::ICameraGetVideoCameraObject (UInt32 stage) const =0
 Get the camera's internal video renderer object. More...
 
virtual Input::IProjectionGetInputProjectionObject (UInt32 stage) const =0
 Get the camera's internal input handler object. More...
 
virtual void SetMaskCoords (Real left, Real right, Real top, Real bottom)=0
 Set the camera mask's border coordinates. More...
 
virtual void SetMaskCoordsX (Real left, Real right)=0
 Set the view mask's horizontal border coordinates. More...
 
virtual void SetMaskCoordsY (Real top, Real bottom)=0
 Set the view mask's vertical border coordinates. More...
 
virtual Real GetLeftMaskCoord () const =0
 Get the view mask's left border coordinate. More...
 
virtual Real GetRightMaskCoord () const =0
 Get the view mask's right border coordinate. More...
 
virtual Real GetTopMaskCoord () const =0
 Get the view mask's top border coordinate. More...
 
virtual Real GetBottomMaskCoord () const =0
 Get the view mask's bottom border coordinate. More...
 
virtual void SetMaskAnchors (IEnums::AlignmentX left, IEnums::AlignmentX right, IEnums::AlignmentY top, IEnums::AlignmentY bottom)=0
 Set the view mask's border anchors. More...
 
virtual void SetMaskAnchorsX (IEnums::AlignmentX left, IEnums::AlignmentX right)=0
 Set the view mask's horizontal border anchors. More...
 
virtual void 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 void SetMaskCoordScaleFactor (Real factor)=0
 Set the view mask's coordinates scale factor. More...
 
- Public Member Functions inherited from Murl::Graph::IStateSlot
virtual Bool SetSlot (SInt32 slot)=0
 Set the slot index to use. More...
 
virtual SInt32 GetSlot () const =0
 Get the slot index to use. More...
 

Detailed Description

The ICamera graph node interface.

A camera represents a node positioned in world space through which any renderable geometry can be viewed within its viewing volume. The view volume can either be a box for orthographic cameras or a frustum for perspective cameras.

Along the screen-space Z axis, the view volume is bounded by a near plane and a far plane, which can be set by SetNearAndFarPlaneZ() and related methods. The values for the near and far plane always represent positive (absolute) distances from the camera's eye point, regardless of the actual camera position and orientation in world space.

For the screen-space X (left-right) and Y (bottom-top) axes, defining the view volume can be done independently in one of two ways:

  • Specifying a unit size results in a constant mapping between output pixels and virtual coordinates catch'd by the camera, with a value of 1.0 producing a 1:1 relationship. In other words, if the output window is enlarged, more of the virtual space becomes visible for that camera.
  • Specifying a field-of-view value keeps a constant relationship between virtual coordinates and window size. In other words, enlarging the window will enlarge the rendered scene, but no additional geometry will become visible.

The actual meaning of the given values is different for each type of camera:

  • Orthographic cameras:
    • The fovX and fovY parameters of the SetFieldOfView() method (and related ones) simply represent the X and Y extent of the viewing box from the center in both directions (i.e. the actual width and height of the box are 2*fovX and 2*fovY, respectively).
    • The unitSizeX and unitSizeY parameters of the SetUnitSize() method (and related ones) directly map pixels to virtual coordinates.
  • Perspective cameras:
    • The fovX and fovY parameters of the SetFieldOfView() method (and related ones) represent the horizontal and vertical extent of the viewing frustum at the near plane, measured from the center. A near plane distance of 10.0 and a fovX of 10.0 therefore represent a 45° angle between the center line to both the left and right front edges of the frustum, resulting in a total horizontal field of view of 90°, with the virtual coordinates ranging from -10.0 to +10.0 in X direction, at a distance of 10.0 units in front of the camera.
    • The unitSizeX and unitSizeY parameters of the SetUnitSize() method (and related ones) directly map pixels to virtual coordinates, again at the near plane.

Note, that you cannot specify both FOV and unit size for the same axis. It is however possible to define a FOV in X direction and a unit size in Y direction (and vice versa).

If only one axis is defined by an FOV or unit size value, the bounds of the missing dimension can be automatically calculated to maintain a given coordinate aspect ratio, which can be defined via SetAspectRatio(). (default 1.0). In this case (only one axis given), the aspect ratio cannot be 0, and the view area of the automatically calculated axis is adjusted with respect to the actual window size.

If both axes are set and the aspect ratio is set to a value higher than 0.0, the engine tries to both respect the given ratio as well as the FOV/unit size values. There are two cases how this is done:

  • If SetAspectClippingEnabled() is set to false, the system always fits the camera to its output surface so that the given field of view is always fully visible. This may mean that the FOV of either the horizontal or vertical axis is actually bigger than specified (if the aspect ratio of the output surface is different from the camera aspect). To clip away this (possibly undesired) extra space, SetBorderMaskEnabled(true) can be called.
  • If SetAspectClippingEnabled() is set to true, the system fits the camera to the output surface so that none of the given FOV values can become bigger than specified. If the aspect ratio of the output surface is different from the camera aspect, this means that either the horizontal or vertical FOV value becomes actually smaller than specified, clipping away those portions that do not fit.

In order to use a camera, it must be attached to a Graph::IView node, which specifies the actually visible area within the output surface (either the back buffer or a custom frame buffer). Attaching the camera can be done via the camera's Graph::IViewNodeTarget retrieved from GetViewNodeTarget(). If multiple cameras are attached to a single view, their drawing order can be specified via SetDepthOrder(), with higher values being "nearer", i.e. rendered later.

It is possible to define an explicit rectangular area to which the camera's given field of view is related. Setting this rectangle can be done via the SetBorderCoords() and SetBorderAnchors() methods (and related ones), which behaves analogously to setting the mask rectangle of a Graph::IView. See Graph::IView::SetMaskCoords() for details. By default, the border area covers the whole output surface, which is equivalent to all border coordinates equaling 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).

Note, that setting a camera border rectangle does not actually clip the output at the given border edges; instead, the border rectangle only defines the reference edges to which the view volume is anchored. In other words, the view volume actually extends beyond this rectangle; if clipping is desired, it must be enabled in the camera's view by specifying arbitrary values for that view's mask coordinates and anchors.

Within the given border rectangle, it is possible to also define the camera's projection center via SetCenter(), with values ranging from -1.0 to 1.0 for left/right and bottom/top edges.

See Output-States, Slots und Units for an overview of state handling during scene graph traversal.
See Graph::ICameraTransform for setting a camera's position and orientation.
See Graph::ICameraState for activating a camera for rendering.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::ICamera::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::ICamera::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

◆ GetSubjectInterface() [1/2]

virtual ISubject* Murl::Graph::ICamera::GetSubjectInterface ( )
pure virtual

Get the mutable ISubject interface.

This method returns a mutable pointer to the node's ISubject interface, to be able to query or modify subject properties such as world transform, viewing matrix, projection matrix etc.

Returns
The mutable ISubject interface, or null if not available

◆ GetSubjectInterface() [2/2]

virtual const ISubject* Murl::Graph::ICamera::GetSubjectInterface ( ) const
pure virtual

Get the constant ISubject interface.

This method returns a constant pointer to the node's ISubject interface, to be able to query subject properties such as world transform, viewing matrix, projection matrix etc.

Returns
The mutable ISubject interface, or null if not available

◆ GetSubCameraNodeTarget() [1/2]

virtual ICameraNodeTarget* Murl::Graph::ICamera::GetSubCameraNodeTarget ( )
pure virtual

Get the mutable container holding the optional child cameras.

This method returns a mutable pointer to the node's Graph::ICameraNodeTarget sub container, which is used to store multiple sub-cameras.

Returns
The mutable Graph::ICameraNodeTarget container, or null if not available.

◆ GetSubCameraNodeTarget() [2/2]

virtual const ICameraNodeTarget* Murl::Graph::ICamera::GetSubCameraNodeTarget ( ) const
pure virtual

Get the constant container holding the optional child cameras.

This method returns a constant pointer to the node's Graph::ICameraNodeTarget sub container, which is used to store multiple sub-cameras.

Returns
The constant Graph::ICameraNodeTarget container, or null if not available.

◆ GetViewNodeTarget() [1/2]

virtual IViewNodeTarget* Murl::Graph::ICamera::GetViewNodeTarget ( )
pure virtual

Get the mutable IViewNodeTarget container.

This method returns a mutable pointer to the node's IViewNodeTarget container, which allows to set or query the view object the camera is attached to.

Returns
The mutable IViewNodeTarget container, or null if not available

◆ GetViewNodeTarget() [2/2]

virtual const IViewNodeTarget* Murl::Graph::ICamera::GetViewNodeTarget ( ) const
pure virtual

Get the constant IViewNodeTarget container.

This method returns a constant pointer to the node's IViewNodeTarget container, which allows to query the view object the camera is attached to.

Returns
The constant IViewNodeTarget container, or null if not available

◆ SetProjectionType()

virtual Bool Murl::Graph::ICamera::SetProjectionType ( IEnums::ProjectionType  type)
pure virtual

Set the projection type.

Parameters
typeThe projection type.
Returns
true if successful.

◆ GetProjectionType()

virtual IEnums::ProjectionType Murl::Graph::ICamera::GetProjectionType ( ) const
pure virtual

Get the projection type.

Returns
The projection type.

◆ SetDepthOrder()

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

Set the camera's absolute depth order.

When a Graph::IView contains more than one camera to render to, it may be necessary to define the exact order in which those cameras are overlaid. The given depth order value represents a 32 bit signed integer; higher values result in a "later" rendering on top of previous cameras, i.e. back-to-front rendering in ascending order of depth order values. See also Graph::IView::SetDepthOrder().

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

◆ GetDepthOrder()

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

Get the camera's absolute depth order.

Returns
The absolute order of this camera within its view.

◆ SetFrontFacingVertexOrder()

virtual Bool Murl::Graph::ICamera::SetFrontFacingVertexOrder ( IEnums::VertexOrder  order)
pure virtual

Set the winding order for front-facing polygons.

Parameters
orderThe winding order, either clockwise or counter-clockwise.
Returns
true if successful.

◆ GetFrontFacingVertexOrder()

virtual IEnums::VertexOrder Murl::Graph::ICamera::GetFrontFacingVertexOrder ( ) const
pure virtual

Get the winding order for front-facing polygons.

Returns
The winding order, either clockwise or counter-clockwise.

◆ SetDepthSortMode()

virtual Bool Murl::Graph::ICamera::SetDepthSortMode ( IEnums::DepthSortMode  mode)
pure virtual

Set the depth sort mode for geometries within this camera.

When rendering alpha blended geometries, it is often necessary to sort these from back to front, to maintain correct blending.

Parameters
modeThe depth sort mode used for this camera.
Returns
true if successful.

◆ GetDepthSortMode()

virtual IEnums::DepthSortMode Murl::Graph::ICamera::GetDepthSortMode ( ) const
pure virtual

Get the depth sort mode for geometries within this camera.

Returns
The depth sort mode used for this camera.

◆ SetScreenOrientation()

virtual Bool Murl::Graph::ICamera::SetScreenOrientation ( IEnums::ScreenOrientation  orientation)
pure virtual

Set the allowed screen orientation of the camera.

By default, all screen orientations are allowed. Use this method to restrict the camera's orientation to the given value.

Parameters
orientationThe desired screen orientation.
Returns
true if successful.

◆ GetScreenOrientation()

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

Get the depth sort mode for geometries within this camera.

Returns
The depth sort mode used for this camera.

◆ SetAutoDeactivationEnabled()

virtual Bool Murl::Graph::ICamera::SetAutoDeactivationEnabled ( Bool  enabled)
pure virtual

Enable/disable automatic deactivation if no geometry is to be rendered.

When automatic deactivation is enabled, the renderer will not process that specific camera when it does not contain any visible geometry to render. In this case, the render target (e.g. frame buffer) will retain the most recently rendered image, and the target will not be cleared. When using an empty camera for e.g. clearing portions of the screen where no other camera is rendering to, this must be set to "false", otherwise this camera will never be processed.

Parameters
enabledSet to true if auto deactivation is desired.
Returns
true if successful.

◆ IsAutoDeactivationEnabled()

virtual Bool Murl::Graph::ICamera::IsAutoDeactivationEnabled ( ) const
pure virtual

Check if automatic deactivation is enabled if no geometry is to be rendered.

Returns
true if auto deactivation is enabled.

◆ SetColorBufferClearingEnabled()

virtual Bool Murl::Graph::ICamera::SetColorBufferClearingEnabled ( Bool  enabled)
pure virtual

Enable/disable clearing of the render target's color buffer.

When multiple cameras are defined for a specific Graph::IView (e.g. one for rendering a 3D scene and the other one for rendering a heads-up display), color buffer clearing should be disabled for the second camera to prevent overwriting all previously rendered pixels. The same applies, when multiple views with different cameras are stacked atop each other; in most cases only the "farthest away" camera should have color buffer clearing enabled. See SetColorBufferClearValue() for setting the color used for clearing. See also SetDepthBufferClearingEnabled() and SetStencilBufferClearingEnabled().

Parameters
enabledSet to false to disable color buffer clearing.
Returns
true if successful.

◆ IsColorBufferClearingEnabled()

virtual Bool Murl::Graph::ICamera::IsColorBufferClearingEnabled ( ) const
pure virtual

Check if clearing of the render target's color buffer is enabled.

Returns
true if color buffer clearing is enabled.

◆ SetDepthBufferClearingEnabled()

virtual Bool Murl::Graph::ICamera::SetDepthBufferClearingEnabled ( Bool  enabled)
pure virtual

Enable/disable clearing of the render target's depth buffer.

In the example shown in SetColorBufferClearingEnabled(), color buffer clearing is intentionally disabled for the second camera. However, if the HUD rendered by the second camera also performs depth testing, it may be necessary to clear the depth buffer to prevent unwanted rendering artifacts. See SetDepthBufferClearValue() for setting the depth value used for clearing. See also SetStencilBufferClearingEnabled().

Parameters
enabledSet to false to disable depth buffer clearing.
Returns
true if successful.

◆ IsDepthBufferClearingEnabled()

virtual Bool Murl::Graph::ICamera::IsDepthBufferClearingEnabled ( ) const
pure virtual

Check if clearing of the render target's depth buffer is enabled.

Returns
true if depth buffer clearing is enabled.

◆ SetStencilBufferClearingEnabled()

virtual Bool Murl::Graph::ICamera::SetStencilBufferClearingEnabled ( Bool  enabled)
pure virtual

Enable/disable clearing of the render target's stencil buffer.

See SetStencilBufferClearValue() for setting the stencil value used for clearing. See SetDepthBufferClearingEnabled() and SetColorBufferClearingEnabled().

Parameters
enabledSet to false to disable stencil buffer clearing.
Returns
true if successful.

◆ IsStencilBufferClearingEnabled()

virtual Bool Murl::Graph::ICamera::IsStencilBufferClearingEnabled ( ) const
pure virtual

Check if clearing of the render target's stencil buffer is enabled.

Returns
true if stencil buffer clearing is enabled.

◆ SetColorBufferClearValue()

virtual Bool Murl::Graph::ICamera::SetColorBufferClearValue ( const Color value)
pure virtual

Set the clear color in effect when color buffer clearing is enabled.

Parameters
valueThe clear color.
Returns
true if successful.

◆ GetColorBufferClearValue()

virtual const Color& Murl::Graph::ICamera::GetColorBufferClearValue ( ) const
pure virtual

Get the clear color in effect when color buffer clearing is enabled.

Returns
The clear color.

◆ SetDepthBufferClearValue()

virtual Bool Murl::Graph::ICamera::SetDepthBufferClearValue ( Real  value)
pure virtual

Set the clear value in effect when depth buffer clearing is enabled.

Parameters
valueThe clear value.
Returns
true if successful.

◆ GetDepthBufferClearValue()

virtual Real Murl::Graph::ICamera::GetDepthBufferClearValue ( ) const
pure virtual

Get the clear value in effect when depth buffer clearing is enabled.

Returns
The clear value.

◆ SetStencilBufferClearValue()

virtual Bool Murl::Graph::ICamera::SetStencilBufferClearValue ( UInt32  value)
pure virtual

Set the clear value in effect when stencil buffer clearing is enabled.

Parameters
valueThe clear value.
Returns
true if successful.

◆ GetStencilBufferClearValue()

virtual UInt32 Murl::Graph::ICamera::GetStencilBufferClearValue ( ) const
pure virtual

Get the clear value in effect when stencil buffer clearing is enabled.

Returns
The clear value.

◆ SetBorderCoords()

virtual Bool Murl::Graph::ICamera::SetBorderCoords ( SInt32  left,
SInt32  right,
SInt32  top,
SInt32  bottom 
)
pure virtual

Set the camera's view volume border coordinates.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Parameters
leftThe left border coordinate. Positive values run to the right.
rightThe right border coordinate. Positive values run to the right.
topThe top border coordinate. Positive values run up.
bottomThe bottom border coordinate. Positive values run up.
Returns
true if successful.

◆ SetBorderCoordsX()

virtual Bool Murl::Graph::ICamera::SetBorderCoordsX ( SInt32  left,
SInt32  right 
)
pure virtual

Set the camera's horizontal view volume border coordinates.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

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

◆ SetBorderCoordsY()

virtual Bool Murl::Graph::ICamera::SetBorderCoordsY ( SInt32  top,
SInt32  bottom 
)
pure virtual

Set the camera's vertical view volume border coordinates.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Parameters
topThe top border coordinate. Positive values run up.
bottomThe bottom border coordinate. Positive values run up.
Returns
true if successful.

◆ GetLeftBorderCoord()

virtual SInt32 Murl::Graph::ICamera::GetLeftBorderCoord ( ) const
pure virtual

Get the camera's left view volume border coordinate.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Returns
The left border coordinate.

◆ GetRightBorderCoord()

virtual SInt32 Murl::Graph::ICamera::GetRightBorderCoord ( ) const
pure virtual

Get the camera's right view volume border coordinate.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Returns
The right border coordinate.

◆ GetTopBorderCoord()

virtual SInt32 Murl::Graph::ICamera::GetTopBorderCoord ( ) const
pure virtual

Get the camera's top view volume border coordinate.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Returns
The top border coordinate.

◆ GetBottomBorderCoord()

virtual SInt32 Murl::Graph::ICamera::GetBottomBorderCoord ( ) const
pure virtual

Get the camera's bottom view volume border coordinate.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Returns
The bottom border coordinate.

◆ SetBorderAnchors()

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

Set the camera's view volume border anchors.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

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

◆ SetBorderAnchorsX()

virtual Bool Murl::Graph::ICamera::SetBorderAnchorsX ( IEnums::AlignmentX  left,
IEnums::AlignmentX  right 
)
pure virtual

Set the camera's horizontal view volume border anchors.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

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

◆ SetBorderAnchorsY()

virtual Bool Murl::Graph::ICamera::SetBorderAnchorsY ( IEnums::AlignmentY  top,
IEnums::AlignmentY  bottom 
)
pure virtual

Set the camera's vertical view volume border anchors.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

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

◆ GetLeftBorderAnchor()

virtual IEnums::AlignmentX Murl::Graph::ICamera::GetLeftBorderAnchor ( ) const
pure virtual

Get the camera's left view volume border anchor.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Returns
The left border anchor.

◆ GetRightBorderAnchor()

virtual IEnums::AlignmentX Murl::Graph::ICamera::GetRightBorderAnchor ( ) const
pure virtual

Get the camera's right view volume border anchor.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Returns
The right border anchor.

◆ GetTopBorderAnchor()

virtual IEnums::AlignmentY Murl::Graph::ICamera::GetTopBorderAnchor ( ) const
pure virtual

Get the camera's top view volume border anchor.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Returns
The top border anchor.

◆ GetBottomBorderAnchor()

virtual IEnums::AlignmentY Murl::Graph::ICamera::GetBottomBorderAnchor ( ) const
pure virtual

Get the camera's bottom view volume border anchor.

See the Graph::ICamera description, and Graph::IView::SetMaskCoords().

Returns
The bottom border anchor.

◆ SetBorderMaskEnabled()

virtual Bool Murl::Graph::ICamera::SetBorderMaskEnabled ( Bool  enabled)
pure virtual

Enable/disable border masking.

See the Graph::ICamera description.

Parameters
enabledIf true, masking is enabled.
Returns
true if successful.

◆ IsBorderMaskEnabled()

virtual Bool Murl::Graph::ICamera::IsBorderMaskEnabled ( ) const
pure virtual

Check if border masking is enabled.

Returns
true if masking is enabled.

◆ SetAspectClippingEnabled()

virtual Bool Murl::Graph::ICamera::SetAspectClippingEnabled ( Bool  enabled)
pure virtual

Enable/disable aspect clipping.

See the Graph::ICamera description.

Parameters
enabledIf true, aspect clipping is enabled.
Returns
true if successful.

◆ IsAspectClippingEnabled()

virtual Bool Murl::Graph::ICamera::IsAspectClippingEnabled ( ) const
pure virtual

Check if aspect clipping is enabled.

Returns
true if clipping is enabled.

◆ SetAspectRatio()

virtual Bool Murl::Graph::ICamera::SetAspectRatio ( Real  ratio)
pure virtual

Set the camera's aspect ratio.

The aspect ratio is used in different ways to calculate the actual field of view and border area, depending on the given FOV parameters:

  • If only one axis is defined using a unit size value, the missing one is calculated so that the virtual coordinate system maintains the given X:Y aspect ratio.
  • The same is true if only a single FOV value is given; in this case the FOV of the other axis grows or shrinks depending on the window size and window aspect.
  • If both FOV axes are specified and the given aspect ratio is not 0, the FOV of both axes remains as defined. Here, the actual outcome depends on whether aspect clipping and/or border masking is enabled or not:
    • If aspect clipping is enabled, the camera calculates the actual FOV so that the view area is always fully covered. If the window aspect is smaller than the FOV aspect (the window is taller than the FOV), the vertical FOV is clipped. If the window aspect is greater (wider than the FOV), the horizontal FOV is clipped.
    • If aspect clipping is disabled, the camera always keeps both FOV axes fully within the view. If the window is taller than the FOV, borders are added vertically, and if it is wider, horizontal borders are added. Note, that it is necessary to enable border masking (see SetBorderMaskEnabled()) so that these borders actually have effect.
  • If both FOV axes are specified and the given aspect ratio equals 0, the given FOV values are directly used regardless of the actual view size. In other words, the virtual coordinate system gets skewed, resulting in non-square coordinate units on screen.
    Parameters
    ratioThe X:Y aspect ratio.
    Returns
    true if successful.

◆ GetAspectRatio()

virtual Real Murl::Graph::ICamera::GetAspectRatio ( ) const
pure virtual

Get the current aspect ratio.

Returns
The X:Y aspect ratio.

◆ SetFieldOfView()

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

Set the field of view at the near plane.

This method sets both the horizontal and vertical field of view values. See the detailed description above on how the camera's viewing volume is calculated from these values.

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

◆ SetFieldOfViewX()

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

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

See the detailed description above on how the camera's viewing volume is calculated.

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

◆ SetFieldOfViewY()

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

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

See the detailed description above on how the camera's viewing volume is calculated.

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

◆ GetFieldOfViewX()

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

Get the horizontal field of view.

Returns
The horizontal field of view, or 0.0 if variable.

◆ GetFieldOfViewY()

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

Get the vertical field of view.

Returns
The vertical field of view, or 0.0 if variable.

◆ SetUnitSize()

virtual Bool Murl::Graph::ICamera::SetUnitSize ( Real  unitSizeX,
Real  unitSizeY 
)
pure virtual

Set the unit size, at the near plane.

This method sets both the horizontal and vertical unit size. See the detailed description above on how the camera's viewing volume is calculated from these values.

Parameters
unitSizeXThe horizontal unit size.
unitSizeYThe vertical unit size.
Returns
true if successful.

◆ SetUnitSizeX()

virtual Bool Murl::Graph::ICamera::SetUnitSizeX ( Real  unitSizeX)
pure virtual

Set the horizontal unit size, at the near plane.

See the detailed description above on how the camera's viewing volume is calculated.

Parameters
unitSizeXThe horizontal unit size.
Returns
true if successful.

◆ SetUnitSizeY()

virtual Bool Murl::Graph::ICamera::SetUnitSizeY ( Real  unitSizeY)
pure virtual

Set the vertical unit size, at the near plane.

See the detailed description above on how the camera's viewing volume is calculated.

Parameters
unitSizeYThe vertical unit size.
Returns
true if successful.

◆ GetUnitSizeX()

virtual Real Murl::Graph::ICamera::GetUnitSizeX ( ) const
pure virtual

Get the horizontal unit size.

Returns
The horizontal unit size, or 0.0 if variable.

◆ GetUnitSizeY()

virtual Real Murl::Graph::ICamera::GetUnitSizeY ( ) const
pure virtual

Get the vertical unit size.

Returns
The vertical unit size, or 0.0 if variable.

◆ SetCenter()

virtual Bool Murl::Graph::ICamera::SetCenter ( Real  centerX,
Real  centerY 
)
pure virtual

Set the projection center.

Parameters
centerXThe horizontal projection center.
centerYThe vertical projection center.
Returns
true if successful.

◆ SetCenterX()

virtual Bool Murl::Graph::ICamera::SetCenterX ( Real  centerX)
pure virtual

Set the horizontal projection center.

Parameters
centerXThe horizontal projection center.
Returns
true if successful.

◆ SetCenterY()

virtual Bool Murl::Graph::ICamera::SetCenterY ( Real  centerY)
pure virtual

Set the vertical projection center.

Parameters
centerYThe vertical projection center.
Returns
true if successful.

◆ GetCenterX()

virtual Real Murl::Graph::ICamera::GetCenterX ( ) const
pure virtual

Get the horizontal projection center.

Returns
The horizontal projection center.

◆ GetCenterY()

virtual Real Murl::Graph::ICamera::GetCenterY ( ) const
pure virtual

Get the vertical projection center.

Returns
The vertical projection center.

◆ SetShear()

virtual Bool Murl::Graph::ICamera::SetShear ( Real  shearX,
Real  shearY 
)
pure virtual

Set the projection shearing.

Parameters
shearXThe horizontal projection shearing.
shearYThe vertical projection shearing.
Returns
true if successful.

◆ SetShearX()

virtual Bool Murl::Graph::ICamera::SetShearX ( Real  shearX)
pure virtual

Set the horizontal projection shearing.

Parameters
shearXThe horizontal projection shearing.
Returns
true if successful.

◆ SetShearY()

virtual Bool Murl::Graph::ICamera::SetShearY ( Real  shearY)
pure virtual

Set the vertical projection shearing.

Parameters
shearYThe vertical projection shearing.
Returns
true if successful.

◆ GetShearX()

virtual Real Murl::Graph::ICamera::GetShearX ( ) const
pure virtual

Get the horizontal projection shearing.

Returns
The horizontal projection shearing.

◆ GetShearY()

virtual Real Murl::Graph::ICamera::GetShearY ( ) const
pure virtual

Get the vertical projection shearing.

Returns
The vertical projection shearing.

◆ SetPosition()

virtual Bool Murl::Graph::ICamera::SetPosition ( Real  posX,
Real  posY 
)
pure virtual

Set the relative position within the view.

Parameters
posXThe horizontal position.
posYThe vertical position.
Returns
true if successful.

◆ SetPositionX()

virtual Bool Murl::Graph::ICamera::SetPositionX ( Real  posX)
pure virtual

Set the relative horizontal position within the view.

Parameters
posXThe horizontal position.
Returns
true if successful.

◆ SetPositionY()

virtual Bool Murl::Graph::ICamera::SetPositionY ( Real  posY)
pure virtual

Set the relative vertical position within the view.

Parameters
posYThe vertical position.
Returns
true if successful.

◆ GetPositionX()

virtual Real Murl::Graph::ICamera::GetPositionX ( ) const
pure virtual

Get the relative horizontal position within the view.

Returns
The horizontal position.

◆ GetPositionY()

virtual Real Murl::Graph::ICamera::GetPositionY ( ) const
pure virtual

Get the relative vertical position within the view.

Returns
The vertical position.

◆ SetSize()

virtual Bool Murl::Graph::ICamera::SetSize ( Real  sizeX,
Real  sizeY 
)
pure virtual

Set the relative size within the view.

Parameters
sizeXThe horizontal size.
sizeYThe vertical size.
Returns
true if successful.

◆ SetSizeX()

virtual Bool Murl::Graph::ICamera::SetSizeX ( Real  sizeX)
pure virtual

Set the relative horizontal size within the view.

Parameters
sizeXThe horizontal size.
Returns
true if successful.

◆ SetSizeY()

virtual Bool Murl::Graph::ICamera::SetSizeY ( Real  sizeY)
pure virtual

Set the relative vertical size within the view.

Parameters
sizeYThe vertical size.
Returns
true if successful.

◆ GetSizeX()

virtual Real Murl::Graph::ICamera::GetSizeX ( ) const
pure virtual

Get the relative horizontal size within the view.

Returns
The horizontal size.

◆ GetSizeY()

virtual Real Murl::Graph::ICamera::GetSizeY ( ) const
pure virtual

Get the relative vertical size within the view.

Returns
The vertical size.

◆ SetNearAndFarPlaneZ()

virtual Bool Murl::Graph::ICamera::SetNearAndFarPlaneZ ( Real  nearZ,
Real  farZ 
)
pure virtual

Set the absolute distances for both near and far clipping planes.

Both values must be positive, with 0 < nearZ < farZ.

Parameters
nearZThe positive near plane distance.
farZThe positive near plane distance.
Returns
true if successful.

◆ SetNearPlaneZ()

virtual Bool Murl::Graph::ICamera::SetNearPlaneZ ( Real  nearZ)
pure virtual

Set the absolute distance for the near clipping plane.

See SetNearAndFarPlaneZ().

Parameters
nearZThe positive near plane distance.
Returns
true if successful.

◆ SetFarPlaneZ()

virtual Bool Murl::Graph::ICamera::SetFarPlaneZ ( Real  farZ)
pure virtual

Set the absolute distance for the far clipping plane.

See SetNearAndFarPlaneZ().

Parameters
farZThe positive near plane distance.
Returns
true if successful.

◆ GetNearPlaneZ()

virtual Real Murl::Graph::ICamera::GetNearPlaneZ ( ) const
pure virtual

Get the absolute distance for the near clipping plane.

Returns
The positive near plane distance.

◆ GetFarPlaneZ()

virtual Real Murl::Graph::ICamera::GetFarPlaneZ ( ) const
pure virtual

Get the absolute distance for the far clipping plane.

Returns
The positive far plane distance.

◆ SetClipPlane() [1/2]

virtual Bool Murl::Graph::ICamera::SetClipPlane ( const Vector clipPlane)
pure virtual

Set a user-defined view volume clipping plane in world space.

Parameters
clipPlaneA vector holding the A, B, C and D coefficients from the plane equation defining the clipping plane, contained in the vector's x, y, z and w components, respectively. The x, y and z components represent the actual plane normal, where the w component represents the plane's normal distance from the origin.
Returns
true if successful.

◆ SetClipPlane() [2/2]

virtual Bool Murl::Graph::ICamera::SetClipPlane ( const Vector position,
const Vector normal 
)
pure virtual

Set a user-defined view volume clipping plane in world space.

Parameters
positionA vector holding the position of an arbitrary point in world space that is lying on the clip plane.
normalA vector holding the clipping plane's normal vector in its x, y and z components.
Returns
true if successful.

◆ GetClipPlane()

virtual const Vector& Murl::Graph::ICamera::GetClipPlane ( ) const
pure virtual

Get the user-defined view volume clipping plane in world space.

Returns
A vector holding the A, B, C and D coefficients from the plane equation defining the clipping plane, contained in the vector's x, y, z and w components, respectively.

◆ GetLocalPositionFromScreen() [1/2]

virtual Vector Murl::Graph::ICamera::GetLocalPositionFromScreen ( const Vector screenCoord) const
pure virtual

Calculate the camera space position from given screen coordinates.

This method can be used to get a vector to a point in camera space, defined by a pair of X and Y screen coordinates, and a distance along the camera's viewing axis. As the viewing axis is always parallel to the Z axis, looking in the negative direction, the given distance must also be negative to represent a point in front of the camera.

Parameters
screenCoordA vector containing the horizontal and vertical screen coordinates in the X and Y components, and the distance from the camera along its viewing axis in the Z component. A negative distance represents a point in front of the camera.
Returns
The camera-space position.

◆ GetLocalPositionFromScreen() [2/2]

virtual Vector Murl::Graph::ICamera::GetLocalPositionFromScreen ( Real  screenX,
Real  screenY,
Real  distance 
) const
pure virtual

Calculate the camera space position from given screen coordinates.

See GetLocalPositionFromScreen(const Vector& screenCoord).

Parameters
screenXThe X coordinate on screen for which to calculate the local point.
screenYThe Y coordinate on screen for which to calculate the local point.
distanceThe distance from the camera.
Returns
The camera-space position.

◆ GetWorldPositionFromScreen() [1/2]

virtual Vector Murl::Graph::ICamera::GetWorldPositionFromScreen ( const Vector screenCoord) const
pure virtual

Calculate the world-space position from given screen coordinates.

This method first calculates the local position via GetLocalPositionFromScreen(), and then transforms the resulting point to world space by multiplying it with the camera's world transform.

Parameters
screenCoordA vector containing the horizontal and vertical screen coordinates in the X and Y components, and the distance from the camera along its viewing axis in the Z component. A negative distance represents a point in front of the camera.
Returns
The world-space position.

◆ GetWorldPositionFromScreen() [2/2]

virtual Vector Murl::Graph::ICamera::GetWorldPositionFromScreen ( Real  screenX,
Real  screenY,
Real  distance 
) const
pure virtual

Calculate the world-space position from given screen coordinates.

See GetWorldPositionFromScreen(const Vector& screenCoord).

Parameters
screenXThe X coordinate on screen for which to calculate the world point.
screenYThe Y coordinate on screen for which to calculate the world point.
distanceThe distance from the camera.
Returns
The world-space position.

◆ GetScreenPositionFromLocal() [1/2]

virtual Vector Murl::Graph::ICamera::GetScreenPositionFromLocal ( const Vector localCoord) const
pure virtual

Calculate the screen coordinates from a given coordinate in camera space.

This method performs a regular view space to screen space transformation, using the projection matrix set for the camera. The input coordinate is relative to the camera itself.

Parameters
localCoordThe coordinate to transform, in camera space.
Returns
The camera space position.

◆ GetScreenPositionFromLocal() [2/2]

virtual Vector Murl::Graph::ICamera::GetScreenPositionFromLocal ( Real  localX,
Real  localY,
Real  localZ 
) const
pure virtual

Calculate the screen coordinates from a given coordinate in camera space.

See GetScreenPositionFromLocal(const Vector& localCoord).

Parameters
localXThe input coordinate's X component, in camera space.
localYThe input coordinate's Y component, in camera space.
localZThe input coordinate's Z component, in camera space.
Returns
The camera space position.

◆ GetScreenPositionFromWorld() [1/2]

virtual Vector Murl::Graph::ICamera::GetScreenPositionFromWorld ( const Vector worldCoord) const
pure virtual

Calculate the screen coordinates from a given coordinate in world space.

This method performs a regular world space to screen space transformation, using the inverse model matrix and the regular projection matrix set for the camera. The input coordinate represents an absolute world position.

Parameters
worldCoordThe coordinate to transform, in world space.
Returns
The camera space position.

◆ GetScreenPositionFromWorld() [2/2]

virtual Vector Murl::Graph::ICamera::GetScreenPositionFromWorld ( Real  worldX,
Real  worldY,
Real  worldZ 
) const
pure virtual

Calculate the screen coordinates from a given coordinate in world space.

See GetScreenPositionFromWorld(const Vector& worldCoord).

Parameters
worldXThe input coordinate's X component, in world space.
worldYThe input coordinate's Y component, in world space.
worldZThe input coordinate's Z component, in world space.
Returns
The camera space position.

◆ GetNumberOfStages()

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

Get the camera's number of stages.

Returns
The number of stages.

◆ GetVideoCameraObject()

virtual Video::ICamera* Murl::Graph::ICamera::GetVideoCameraObject ( UInt32  stage) const
pure virtual

Get the camera's internal video renderer object.

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

◆ GetInputProjectionObject()

virtual Input::IProjection* Murl::Graph::ICamera::GetInputProjectionObject ( UInt32  stage) const
pure virtual

Get the camera's internal input handler object.

Parameters
stageThe stage to query.
Returns
The input handler object.

◆ SetMaskCoords()

virtual void Murl::Graph::ICamera::SetMaskCoords ( Real  left,
Real  right,
Real  top,
Real  bottom 
)
pure virtual

Set the camera 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 units 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 units left of the right window border. Note that the engine's camera coordinate origin is at the center of the screen with positive Y values running up. Therefore, to define e.g. a vertical mask that clips 100 units 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.

◆ SetMaskCoordsX()

virtual void Murl::Graph::ICamera::SetMaskCoordsX ( Real  left,
Real  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 void Murl::Graph::ICamera::SetMaskCoordsY ( Real  top,
Real  bottom 
)
pure virtual

Set the view mask's vertical border coordinates.

See SetMaskCoords() for details.

Parameters
topThe top mask coordinate.
bottomThe bottom mask coordinate.

◆ GetLeftMaskCoord()

virtual Real Murl::Graph::ICamera::GetLeftMaskCoord ( ) const
pure virtual

Get the view mask's left border coordinate.

See SetMaskCoords() for details.

Returns
The left mask coordinate.

◆ GetRightMaskCoord()

virtual Real Murl::Graph::ICamera::GetRightMaskCoord ( ) const
pure virtual

Get the view mask's right border coordinate.

See SetMaskCoords() for details.

Returns
The right mask coordinate.

◆ GetTopMaskCoord()

virtual Real Murl::Graph::ICamera::GetTopMaskCoord ( ) const
pure virtual

Get the view mask's top border coordinate.

See SetMaskCoords() for details.

Returns
The top mask coordinate.

◆ GetBottomMaskCoord()

virtual Real Murl::Graph::ICamera::GetBottomMaskCoord ( ) const
pure virtual

Get the view mask's bottom border coordinate.

See SetMaskCoords() for details.

Returns
The bottom mask coordinate.

◆ SetMaskAnchors()

virtual void Murl::Graph::ICamera::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.

◆ SetMaskAnchorsX()

virtual void Murl::Graph::ICamera::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.

◆ SetMaskAnchorsY()

virtual void Murl::Graph::ICamera::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.

◆ GetLeftMaskAnchor()

virtual IEnums::AlignmentX Murl::Graph::ICamera::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::ICamera::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::ICamera::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::ICamera::GetBottomMaskAnchor ( ) const
pure virtual

Get the view mask's bottom border anchor.

See SetMaskCoords() for details.

Returns
The bottom mask anchor.

◆ SetMaskCoordScaleFactor()

virtual void Murl::Graph::ICamera::SetMaskCoordScaleFactor ( Real  factor)
pure virtual

Set the view mask's coordinates scale factor.

See SetMaskCoords() for details.

Parameters
factormask coordinates will be multiplied by 1/factor.

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


Copyright © 2011-2024 Spraylight GmbH.