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

#include <geometry.hpp>

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

Public Member Functions

constexpr Point3 () noexcept=default
 
constexpr Point3 (F32 x, F32 y, F32 z) noexcept
 
constexpr Point3 (const Point3 &point) noexcept=default
 
constexpr Point3 (Point3 &&point) noexcept=default
 
constexpr Point3 (F32x3 v) noexcept
 
 ~Point3 ()=default
 
Point3operator= (const Point3 &point) noexcept=default
 
Point3operator= (Point3 &&point) 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 points in 3D space.

Constructor & Destructor Documentation

◆ Point3() [1/5]

constexpr mage::Point3::Point3 ( )
defaultnoexcept

Constructs a point.

◆ Point3() [2/5]

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

Constructs a point from the given coordinates.

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

◆ Point3() [3/5]

constexpr mage::Point3::Point3 ( const Point3 point)
defaultnoexcept

Constructs a point from the given point.

Parameters
[in]pointA reference to the point to copy.

◆ Point3() [4/5]

constexpr mage::Point3::Point3 ( Point3 &&  point)
defaultnoexcept

Constructs a point by moving the given point.

Parameters
[in]pointA reference to the point to move.

◆ Point3() [5/5]

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

Constructs a point from the given vector.

Parameters
[in]vThe vector.

◆ ~Point3()

mage::Point3::~Point3 ( )
default

Constructs a point.

Member Function Documentation

◆ GetX()

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

Returns the X component of this point.

Returns
The X component of this point.

◆ GetY()

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

Returns the Y component of this point.

Returns
The Y component of this point.

◆ GetZ()

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

Returns the Z component of this point.

Returns
The Z component of this point.

◆ operator=() [1/2]

Point3& mage::Point3::operator= ( const Point3 point)
defaultnoexcept

Copies the given point to this point.

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

◆ operator=() [2/2]

Point3& mage::Point3::operator= ( Point3 &&  point)
defaultnoexcept

Moves the given point to this point.

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

◆ SetX()

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

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

Parameters
[in]xThe X component.

◆ SetY()

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

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

Parameters
[in]yThe Y component.

◆ SetZ()

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

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

Parameters
[in]zThe Z component.