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

#include <geometry.hpp>

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

Public Member Functions

constexpr Normal3 () noexcept=default
 
constexpr Normal3 (F32 x, F32 y, F32 z) noexcept
 
constexpr Normal3 (const Normal3 &normal) noexcept=default
 
constexpr Normal3 (Normal3 &&normal) noexcept=default
 
constexpr Normal3 (F32x3 v) noexcept
 
 ~Normal3 ()=default
 
constexpr Normal3operator= (const Normal3 &normal) noexcept=default
 
constexpr Normal3operator= (Normal3 &&normal) noexcept=default
 
- Public Member Functions inherited from mage::Direction3
constexpr Direction3 () noexcept=default
 
constexpr Direction3 (F32 x, F32 y, F32 z) noexcept
 
constexpr Direction3 (const Direction3 &direction) noexcept=default
 
constexpr Direction3 (Direction3 &&direction) noexcept=default
 
constexpr Direction3 (F32x3 v) noexcept
 
 ~Direction3 ()=default
 
Direction3operator= (const Direction3 &direction) noexcept=default
 
Direction3operator= (Direction3 &&direction) noexcept=default
 
constexpr F32 GetX () const noexcept
 
constexpr void SetX (F32 x) noexcept
 
constexpr F32 GetY () const noexcept
 
constexpr void SetY (F32 y) noexcept
 
constexpr F32 GetZ () const noexcept
 
constexpr void SetZ (F32 z) 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 normals in 3D space.

Note
Normal3 does not guarantee or force normalized directions. This should be guaranteed and enforced by the user.

Constructor & Destructor Documentation

◆ Normal3() [1/5]

constexpr mage::Normal3::Normal3 ( )
defaultnoexcept

Constructs a normal.

◆ Normal3() [2/5]

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

Constructs a normal from the given coordinates.

Parameters
[in]xThe x-coordinate.
[in]yThe y-coordinate.
[in]zThe z-coordinate.

◆ Normal3() [3/5]

constexpr mage::Normal3::Normal3 ( const Normal3 normal)
defaultnoexcept

Constructs a normal from the given normal.

Parameters
[in]normalA reference to the normal to copy.

◆ Normal3() [4/5]

constexpr mage::Normal3::Normal3 ( Normal3 &&  normal)
defaultnoexcept

Constructs a normal by moving the given normal.

Parameters
[in]normalA reference to the normal to move.

◆ Normal3() [5/5]

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

Constructs a normal from the given vector.

Parameters
[in]vThe vector.

◆ ~Normal3()

mage::Normal3::~Normal3 ( )
default

Destructs this normal.

Member Function Documentation

◆ operator=() [1/2]

constexpr Normal3& mage::Normal3::operator= ( const Normal3 normal)
defaultnoexcept

Copies the given normal to this normal.

Parameters
[in]normalA reference to the normal to copy.
Returns
A reference to the copy of the given normal (i.e. this normal).

◆ operator=() [2/2]

constexpr Normal3& mage::Normal3::operator= ( Normal3 &&  normal)
defaultnoexcept

Moves the given normal to this normal.

Parameters
[in]normalA reference to the normal to move.
Returns
A reference to the moved normal (i.e. this normal).