Kanzi  3.9.6
Kanzi Engine API
kanzi::RenderPass::CameraSettings Struct Reference

Camera settings structure. More...

#include <kanzi/core.ui/graphics3d/render_pass.hpp>

Public Member Functions

 CameraSettings ()=default
 Constructor. More...
 
 CameraSettings (const CameraSettings &other)=default
 Copy constructor. More...
 
 CameraSettings (CameraSettings &&other)=default
 Move constructor. More...
 
void initializeFrom (Renderer3D &renderer, Camera &cameraNode, const Vector4 &viewport, bool force)
 Initializes the camera settings by reading properties from a node. More...
 
bool isComplete () const
 Indicates whether the camera settings structure is complete. More...
 
bool operator!= (const CameraSettings &other) const
 Not equals operator. More...
 
CameraSettingsoperator= (const CameraSettings &other)=default
 Copy operator. More...
 
CameraSettingsoperator= (CameraSettings &&other)=default
 Move operator. More...
 
bool operator== (const CameraSettings &other) const
 Equals operator. More...
 

Public Attributes

optional< float > aspectRatioMultiplier
 Aspect ratio multiplier. More...
 
CameracameraNodeFromRenderPass
 The Camera node set in this render pass. More...
 
optional< Vector3cameraPosition
 Camera position. More...
 
optional< Vector2nearFarPlanes
 Camera Z range. More...
 
optional< Matrix4x4projectionMatrix
 Projection matrix. More...
 
optional< Matrix4x4projectionMatrixModifier
 Projection matrix modifier. More...
 
optional< Matrix4x4viewMatrix
 View (camera) matrix. More...
 

Detailed Description

Camera settings structure.

Kanzi passed the camera settings structure as a parameter downward to child render passes.

Since
Kanzi 3.9.3

Constructor & Destructor Documentation

◆ CameraSettings() [1/3]

kanzi::RenderPass::CameraSettings::CameraSettings ( )
explicitdefault

Constructor.

◆ CameraSettings() [2/3]

kanzi::RenderPass::CameraSettings::CameraSettings ( const CameraSettings other)
default

Copy constructor.

Parameters
otherSource camera settings.

◆ CameraSettings() [3/3]

kanzi::RenderPass::CameraSettings::CameraSettings ( CameraSettings &&  other)
default

Move constructor.

Parameters
otherSource camera settings.

Member Function Documentation

◆ isComplete()

bool kanzi::RenderPass::CameraSettings::isComplete ( ) const
inline

Indicates whether the camera settings structure is complete.

A complete camera settings structure contains all possible settings.

Returns
If camera settings structure is complete true, otherwise false.

◆ initializeFrom()

void kanzi::RenderPass::CameraSettings::initializeFrom ( Renderer3D renderer,
Camera cameraNode,
const Vector4 viewport,
bool  force 
)

Initializes the camera settings by reading properties from a node.

Parameters
rendererRenderer being used.
cameraNodeSelected Camera node to use.
viewportCurrent viewport.
forceTo reinitialize values even if they are already set in the structure, set to true. To not reinitialize values that are already set in the structure, set to false.

◆ operator==()

bool kanzi::RenderPass::CameraSettings::operator== ( const CameraSettings other) const
inline

Equals operator.

Parameters
otherCamera settings to compare against.
Returns
If equal true, otherwise false.

◆ operator!=()

bool kanzi::RenderPass::CameraSettings::operator!= ( const CameraSettings other) const
inline

Not equals operator.

Parameters
otherCamera settings to compare against.
Returns
If equal false, otherwise true.

◆ operator=() [1/2]

CameraSettings& kanzi::RenderPass::CameraSettings::operator= ( const CameraSettings other)
default

Copy operator.

Parameters
otherSource camera settings.

◆ operator=() [2/2]

CameraSettings& kanzi::RenderPass::CameraSettings::operator= ( CameraSettings &&  other)
default

Move operator.

Parameters
otherSource camera settings.

Member Data Documentation

◆ cameraNodeFromRenderPass

Camera* kanzi::RenderPass::CameraSettings::cameraNodeFromRenderPass

The Camera node set in this render pass.

nullptr if the Camera node was not set in this render pass.

◆ cameraPosition

optional<Vector3> kanzi::RenderPass::CameraSettings::cameraPosition

Camera position.

◆ nearFarPlanes

optional<Vector2> kanzi::RenderPass::CameraSettings::nearFarPlanes

Camera Z range.

Near plane first, then far plane.

◆ viewMatrix

optional<Matrix4x4> kanzi::RenderPass::CameraSettings::viewMatrix

View (camera) matrix.

◆ projectionMatrix

optional<Matrix4x4> kanzi::RenderPass::CameraSettings::projectionMatrix

Projection matrix.

◆ projectionMatrixModifier

optional<Matrix4x4> kanzi::RenderPass::CameraSettings::projectionMatrixModifier

Projection matrix modifier.

Intended to be passed downward to successive render passes. Kanzi multiplies this matrix to projection matrices from right if it is set.

◆ aspectRatioMultiplier

optional<float> kanzi::RenderPass::CameraSettings::aspectRatioMultiplier

Aspect ratio multiplier.

Intended to be passed downward to successive render passes. Kanzi multiplies the aspect ratio with this value before calculating projection if it is set.


The documentation for this struct was generated from the following file: