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

#include <spectrum.hpp>

Inheritance diagram for mage::XYZA:
mage::Array< F32, 4u >

Public Member Functions

constexpr XYZA (F32 xyza=0.0f) noexcept
 
constexpr XYZA (F32 x, F32 y, F32 z, F32 a=1.0f) noexcept
 
constexpr XYZA (const XYZA &xyza) noexcept=default
 
constexpr XYZA (XYZA &&xyza) noexcept=default
 
constexpr XYZA (const XYZ &xyz, F32 a=1.0f) noexcept
 
 XYZA (const RGBA &rgba) noexcept
 
constexpr XYZA (F32x4 v) noexcept
 
 ~XYZA ()=default
 
XYZAoperator= (const XYZA &xyza) noexcept=default
 
XYZAoperator= (XYZA &&xyza) noexcept=default
 
F32X () noexcept
 
constexpr F32 X () const noexcept
 
F32Y () noexcept
 
constexpr F32 Y () const noexcept
 
F32Z () noexcept
 
constexpr F32 Z () const noexcept
 
F32A () noexcept
 
constexpr F32 A () const noexcept
 
- Public Member Functions inherited from mage::Array< F32, 4u >
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, 4u >
static constexpr std::size_t s_size
 

Detailed Description

A struct of XYZA color spectra.

Constructor & Destructor Documentation

◆ XYZA() [1/7]

constexpr mage::XYZA::XYZA ( F32  xyza = 0.0f)
explicitnoexcept

Constructs a XYZA spectrum from the given spectrum components.

Parameters
[in]xyzaThe x, y and z and alpha component.

◆ XYZA() [2/7]

constexpr mage::XYZA::XYZA ( F32  x,
F32  y,
F32  z,
F32  a = 1.0f 
)
noexcept

Constructs a XYZA spectrum from the given spectrum components.

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

◆ XYZA() [3/7]

constexpr mage::XYZA::XYZA ( const XYZA xyza)
defaultnoexcept

Constructs a XYZA spectrum from the given XYZA spectrum.

Parameters
[in]xyzaA reference to the XYZA spectrum to copy.

◆ XYZA() [4/7]

constexpr mage::XYZA::XYZA ( XYZA &&  xyza)
defaultnoexcept

Constructs a XYZA spectrum by moving the given XYZA spectrum.

Parameters
[in]xyzaA reference to the XYZA spectrum to move.

◆ XYZA() [5/7]

constexpr mage::XYZA::XYZA ( const XYZ xyz,
F32  a = 1.0f 
)
explicitnoexcept

Constructs a XYZA spectrum from the given XYZ spectrum.

Parameters
[in]xyzA reference to the XYZ spectrum.
[in]aThe alpha component.

◆ XYZA() [6/7]

mage::XYZA::XYZA ( const RGBA rgba)
explicitnoexcept

Constructs a XYZA spectrum from the given RGBA spectrum.

Parameters
[in]rgbaA reference to the RGBA spectrum.

◆ XYZA() [7/7]

constexpr mage::XYZA::XYZA ( F32x4  v)
explicitnoexcept

Constructs a XYZA spectrum from the given components.

Parameters
[in]vThe components.

◆ ~XYZA()

mage::XYZA::~XYZA ( )
default

Destructs this XYZA spectrum.

Member Function Documentation

◆ A() [1/2]

F32& mage::XYZA::A ( )
noexcept

Returns the alpha component of this XYZA spectrum.

Returns
A reference to the alpha component of this XYZA spectrum.

◆ A() [2/2]

constexpr F32 mage::XYZA::A ( ) const
noexcept

Returns the alpha component of this XYZA spectrum.

Returns
The alpha component of this XYZA spectrum.

◆ operator=() [1/2]

XYZA& mage::XYZA::operator= ( const XYZA xyza)
defaultnoexcept

Copies the given XYZA spectrum to this XYZA spectrum.

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

◆ operator=() [2/2]

XYZA& mage::XYZA::operator= ( XYZA &&  xyza)
defaultnoexcept

Moves the given XYZA spectrum to this XYZA spectrum.

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

◆ X() [1/2]

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

Returns the x component of this XYZA spectrum.

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

◆ X() [2/2]

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

Returns the x component of this XYZA spectrum.

Returns
The x component of this XYZA spectrum.

◆ Y() [1/2]

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

Returns the y component of this XYZA spectrum.

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

◆ Y() [2/2]

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

Returns the y component of this XYZA spectrum.

Returns
The y component of this XYZA spectrum.

◆ Z() [1/2]

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

Returns the z component of this XYZA spectrum.

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

◆ Z() [2/2]

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

Returns the z component of this XYZA spectrum.

Returns
The z component of this XYZA spectrum.