MAGE  v0.171.0
Matthias Advanced Game Engine
mage::rendering::CameraLens Class Reference

#include <camera.hpp>

Public Member Functions

constexpr CameraLens () noexcept
 
constexpr CameraLens (const CameraLens &lens) noexcept=default
 
constexpr CameraLens (CameraLens &&lens) noexcept=default
 
 ~CameraLens ()=default
 
CameraLensoperator= (const CameraLens &lens) noexcept=default
 
CameraLensoperator= (CameraLens &&lens) noexcept=default
 
constexpr bool HasFiniteAperture () const noexcept
 
constexpr F32 GetApertureRadius () const noexcept
 
constexpr void SetApertureRadius (F32 aperture_radius) noexcept
 
constexpr F32 GetFocalLength () const noexcept
 
constexpr void SetFocalLength (F32 focal_length) noexcept
 
constexpr F32 GetFocusDistance () const noexcept
 
constexpr void SetFocusDistance (F32 focus_distance) noexcept
 

Private Attributes

F32 m_aperture_radius
 
F32 m_focal_length
 
F32 m_focus_distance
 

Detailed Description

A class of camera lenses.

Constructor & Destructor Documentation

◆ CameraLens() [1/3]

constexpr mage::rendering::CameraLens::CameraLens ( )
noexcept

Constructs a camera settings.

◆ CameraLens() [2/3]

constexpr mage::rendering::CameraLens::CameraLens ( const CameraLens lens)
defaultnoexcept

Constructs a camera lens from the given camera lens.

Parameters
[in]lensA reference to the camera lens to copy.

◆ CameraLens() [3/3]

constexpr mage::rendering::CameraLens::CameraLens ( CameraLens &&  lens)
defaultnoexcept

Constructs a camera lens by moving the given camera lens.

Parameters
[in]lensA reference to the camera lens to move.

◆ ~CameraLens()

mage::rendering::CameraLens::~CameraLens ( )
default

Destructs this camera lens.

Member Function Documentation

◆ GetApertureRadius()

constexpr F32 mage::rendering::CameraLens::GetApertureRadius ( ) const
noexcept

Returns the radius of the lens aperture of this camera lens.

Returns
The radius of the lens aperture of this camera lens.

◆ GetFocalLength()

constexpr F32 mage::rendering::CameraLens::GetFocalLength ( ) const
noexcept

Returns the focal length of this camera lens.

Returns
The focal length of this camera lens.

◆ GetFocusDistance()

constexpr F32 mage::rendering::CameraLens::GetFocusDistance ( ) const
noexcept

Returns the focus distance of this camera lens.

Returns
The focus distance of this camera lens.

◆ HasFiniteAperture()

constexpr bool mage::rendering::CameraLens::HasFiniteAperture ( ) const
noexcept

Checks whether this camera lens has a finite lens aperture.

Returns
true if this camera lens has a finite lens aperture. false otherwise.

◆ operator=() [1/2]

CameraLens& mage::rendering::CameraLens::operator= ( const CameraLens lens)
defaultnoexcept

Copies the given camera lens to this camera lens.

Parameters
[in]lensA reference to the camera lens to copy.
Returns
A reference to the copy of the given camera lens (i.e. this camera lens).

◆ operator=() [2/2]

CameraLens& mage::rendering::CameraLens::operator= ( CameraLens &&  lens)
defaultnoexcept

Moves the given camera lens to this camera lens.

Parameters
[in]lensA reference to the camera lens to move.
Returns
A reference to the moved camera lens (i.e. this camera lens).

◆ SetApertureRadius()

constexpr void mage::rendering::CameraLens::SetApertureRadius ( F32  aperture_radius)
noexcept

Sets the radius of the lens aperture of this camera lens to the given value.

Parameters
[in]aperture_radiusThe radius of the lens aperture.

◆ SetFocalLength()

constexpr void mage::rendering::CameraLens::SetFocalLength ( F32  focal_length)
noexcept

Sets the focal length of this camera lens to the given value.

Parameters
[in]focal_lengthThe focal length.

◆ SetFocusDistance()

constexpr void mage::rendering::CameraLens::SetFocusDistance ( F32  focus_distance)
noexcept

Sets the focus distance of this camera lens to the given value.

Parameters
[in]focus_distanceThe focus distance.

Member Data Documentation

◆ m_aperture_radius

F32 mage::rendering::CameraLens::m_aperture_radius
private

The radius of the lens aperture of this camera lens.

◆ m_focal_length

F32 mage::rendering::CameraLens::m_focal_length
private

The focal length (i.e. distance between the lens aperture and the focal point/focus expressed in camera space) of this camera lens.

◆ m_focus_distance

F32 mage::rendering::CameraLens::m_focus_distance
private

The focus distance (i.e. distance between the lens aperture and the objects in perfect focus expressed in camera space) of this camera lens.