MAGE  v0.171.0
Matthias Advanced Game Engine
mage::XYZ Struct Reference

#include <spectrum.hpp>

Inheritance diagram for mage::XYZ:
mage::Array< F32, 3u >

Public Member Functions

constexpr XYZ (F32 xyz=0.0f) noexcept
 
constexpr XYZ (F32 x, F32 y, F32 z) noexcept
 
constexpr XYZ (const XYZ &xyz) noexcept=default
 
constexpr XYZ (XYZ &&xyz) noexcept=default
 
 XYZ (const RGB &rgb) noexcept
 
constexpr XYZ (F32x3 v) noexcept
 
 ~XYZ ()=default
 
XYZoperator= (const XYZ &xyz) noexcept=default
 
XYZoperator= (XYZ &&xyz) noexcept=default
 
F32X () noexcept
 
constexpr F32 X () const noexcept
 
F32Y () noexcept
 
constexpr F32 Y () const noexcept
 
F32Z () noexcept
 
constexpr F32 Z () const noexcept
 
- Public Member Functions inherited from mage::Array< F32, 3u >
constexpr Array () noexcept
 
constexpr Array (const F32 &value) noexcept
 
constexpr Array (ArgsT &&... args) noexcept
 
constexpr Array (const Array< F32, FromN, alignof(F32) > &a) noexcept
 
constexpr Array (const Array< F32, FromN, FromA > &a) noexcept
 
constexpr Array (const Array< F32, FromN, alignof(F32) > &a, ArgsT &&... args) noexcept
 
constexpr Array (const Array< F32, FromN, FromA > &a, ArgsT &&... args) noexcept
 
constexpr Array (const Array &a) noexcept=default
 
constexpr Array (Array &&a) noexcept=default
 
constexpr Array (const Array< FromT, N, FromA > &a) noexcept
 
 ~Array ()=default
 
Arrayoperator= (const Array &a) noexcept=default
 
Arrayoperator= (Array &&a) noexcept=default
 

Additional Inherited Members

- Static Public Attributes inherited from mage::Array< F32, 3u >
static constexpr std::size_t s_size
 

Detailed Description

A struct of XYZ color spectra.

Constructor & Destructor Documentation

◆ XYZ() [1/6]

constexpr mage::XYZ::XYZ ( F32  xyz = 0.0f)
explicitnoexcept

Constructs a XYZ spectrum from the given spectrum components.

Parameters
[in]xyzThe x, y and z component.

◆ XYZ() [2/6]

constexpr mage::XYZ::XYZ ( F32  x,
F32  y,
F32  z 
)
noexcept

Constructs a XYZ spectrum from the given spectrum components.

Parameters
[in]xThe x component.
[in]yThe y component.
[in]zThe z component.

◆ XYZ() [3/6]

constexpr mage::XYZ::XYZ ( const XYZ xyz)
defaultnoexcept

Constructs a XYZ spectrum from the given XYZ spectrum.

Parameters
[in]xyzA reference to the XYZ spectrum to copy.

◆ XYZ() [4/6]

constexpr mage::XYZ::XYZ ( XYZ &&  xyz)
defaultnoexcept

Constructs a XYZ spectrum by moving the given XYZ spectrum.

Parameters
[in]xyzA reference to the XYZ spectrum to move.

◆ XYZ() [5/6]

mage::XYZ::XYZ ( const RGB rgb)
explicitnoexcept

Constructs a XYZ spectrum from the given RGB spectrum.

Parameters
[in]rgbA reference to the RGB spectrum to copy.

◆ XYZ() [6/6]

constexpr mage::XYZ::XYZ ( F32x3  v)
explicitnoexcept

Constructs a XYZ spectrum from the given components.

Parameters
[in]vThe components.

◆ ~XYZ()

mage::XYZ::~XYZ ( )
default

Destructs this XYZ spectrum.

Member Function Documentation

◆ operator=() [1/2]

XYZ& mage::XYZ::operator= ( const XYZ xyz)
defaultnoexcept

Copies the given XYZ spectrum to this XYZ spectrum.

Parameters
[in]xyzA reference to the XYZ spectrum to copy.
Returns
A reference to the copy of the given XYZ spectrum (i.e. this XYZ spectrum).

◆ operator=() [2/2]

XYZ& mage::XYZ::operator= ( XYZ &&  xyz)
defaultnoexcept

Moves the given XYZ spectrum to this XYZ spectrum.

Parameters
[in]xyzA reference to the XYZ spectrum to move.
Returns
A reference to the moved XYZ spectrum (i.e. this XYZ spectrum).

◆ X() [1/2]

F32& mage::XYZ::X ( )
noexcept

Returns the x component of this XYZ spectrum.

Returns
A reference to the x component of this XYZ spectrum.

◆ X() [2/2]

constexpr F32 mage::XYZ::X ( ) const
noexcept

Returns the x component of this XYZ spectrum.

Returns
The x component of this XYZ spectrum.

◆ Y() [1/2]

F32& mage::XYZ::Y ( )
noexcept

Returns the y component of this XYZ spectrum.

Returns
A reference to the y component of this XYZ spectrum.

◆ Y() [2/2]

constexpr F32 mage::XYZ::Y ( ) const
noexcept

Returns the y component of this XYZ spectrum.

Returns
The y component of this XYZ spectrum.

◆ Z() [1/2]

F32& mage::XYZ::Z ( )
noexcept

Returns the z component of this XYZ spectrum.

Returns
A reference to the z component of this XYZ spectrum.

◆ Z() [2/2]

constexpr F32 mage::XYZ::Z ( ) const
noexcept

Returns the z component of this XYZA spectrum.

Returns
The z component of this XYZA spectrum.