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

#include <geometry.hpp>

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

Public Member Functions

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 directions in 3D space.

Constructor & Destructor Documentation

◆ Direction3() [1/5]

constexpr mage::Direction3::Direction3 ( )
defaultnoexcept

Constructs a direction.

◆ Direction3() [2/5]

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

Constructs a direction from the given coordinates.

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

◆ Direction3() [3/5]

constexpr mage::Direction3::Direction3 ( const Direction3 direction)
defaultnoexcept

Constructs a direction from the given direction.

Parameters
[in]directionA reference to the direction to copy.

◆ Direction3() [4/5]

constexpr mage::Direction3::Direction3 ( Direction3 &&  direction)
defaultnoexcept

Constructs a direction by moving the given direction.

Parameters
[in]directionA reference to the direction to move.

◆ Direction3() [5/5]

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

Constructs a direction from the given vector.

Parameters
[in]vThe vector.

◆ ~Direction3()

mage::Direction3::~Direction3 ( )
default

Constructs a direction.

Member Function Documentation

◆ GetX()

constexpr F32 mage::Direction3::GetX ( ) const
noexcept

Returns the X component of this direction.

Returns
The X component of this direction.

◆ GetY()

constexpr F32 mage::Direction3::GetY ( ) const
noexcept

Returns the Y component of this direction.

Returns
The Y component of this direction.

◆ GetZ()

constexpr F32 mage::Direction3::GetZ ( ) const
noexcept

Returns the Z component of this direction.

Returns
The Z component of this direction.

◆ operator=() [1/2]

Direction3& mage::Direction3::operator= ( const Direction3 direction)
defaultnoexcept

Copies the given direction to this direction.

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

◆ operator=() [2/2]

Direction3& mage::Direction3::operator= ( Direction3 &&  direction)
defaultnoexcept

Moves the given direction to this direction.

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

◆ SetX()

constexpr void mage::Direction3::SetX ( F32  x)
noexcept

Sets the X component of this direction to the given value.

Parameters
[in]xThe X component.

◆ SetY()

constexpr void mage::Direction3::SetY ( F32  y)
noexcept

Sets the Y component of this direction to the given value.

Parameters
[in]yThe Y component.

◆ SetZ()

constexpr void mage::Direction3::SetZ ( F32  z)
noexcept

Sets the Z component of this direction to the given value.

Parameters
[in]zThe Z component.