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

#include <geometry.hpp>

Inheritance diagram for mage::UV:
mage::Array< F32, 2u >

Public Member Functions

constexpr UV () noexcept=default
 
constexpr UV (F32 u, F32 v) noexcept
 
constexpr UV (const UV &uv) noexcept=default
 
constexpr UV (UV &&uv) noexcept=default
 
constexpr UV (F32x2 v) noexcept
 
 ~UV ()=default
 
UVoperator= (const UV &uv) noexcept=default
 
UVoperator= (UV &&uv) noexcept=default
 
constexpr F32 GetU () const noexcept
 
constexpr void SetU (F32 u) noexcept
 
constexpr F32 GetV () const noexcept
 
constexpr void SetV (F32 v) noexcept
 
- Public Member Functions inherited from mage::Array< F32, 2u >
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, 2u >
static constexpr std::size_t s_size
 

Detailed Description

A struct of UV texture coordinates.

Constructor & Destructor Documentation

◆ UV() [1/5]

constexpr mage::UV::UV ( )
defaultnoexcept

Constructs a set of UV texture coordinates.

◆ UV() [2/5]

constexpr mage::UV::UV ( F32  u,
F32  v 
)
noexcept

Constructs a set of UV texture coordinates.

Parameters
[in]uThe U component.
[in]vThe V component.

◆ UV() [3/5]

constexpr mage::UV::UV ( const UV uv)
defaultnoexcept

Constructs a set of UV texture coordinates from the given set of UV texture coordinates.

Parameters
[in]uvA reference to the set of UV texture coordinates to copy.

◆ UV() [4/5]

constexpr mage::UV::UV ( UV &&  uv)
defaultnoexcept

Constructs a set of UV texture coordinates by moving the given set of UV texture coordinates.

Parameters
[in]uvA reference to the set of UV texture coordinates to move.

◆ UV() [5/5]

constexpr mage::UV::UV ( F32x2  v)
explicitnoexcept

Constructs a set of UV texture coordinates from the given vector.

Parameters
[in]vThe vector.

◆ ~UV()

mage::UV::~UV ( )
default

Destructs this set of UV texture coordinates.

Member Function Documentation

◆ GetU()

constexpr F32 mage::UV::GetU ( ) const
noexcept

Returns the U component of this set of UV texture coordinates.

Returns
The U component of this set of UV texture coordinates.

◆ GetV()

constexpr F32 mage::UV::GetV ( ) const
noexcept

Returns the V component of this set of UV texture coordinates.

Returns
The V component of this set of UV texture coordinates.

◆ operator=() [1/2]

UV& mage::UV::operator= ( const UV uv)
defaultnoexcept

Copies the given set of UV texture coordinates to this set of texture coordinates.

Parameters
[in]uvA reference to the set of UV texture coordinates to copy.
Returns
A reference to the copy of the given set of UV texture coordinates (i.e. this set of UV texture coordinates).

◆ operator=() [2/2]

UV& mage::UV::operator= ( UV &&  uv)
defaultnoexcept

Moves the given set of UV texture coordinates to this set of texture coordinates.

Parameters
[in]uvA reference to the set of UV texture coordinates to move.
Returns
A reference to the moved set of UV texture coordinates (i.e. this set of UV texture coordinates).

◆ SetU()

constexpr void mage::UV::SetU ( F32  u)
noexcept

Sets the U component of this set of UV texture coordinates to the given value.

Parameters
[in]uThe U component.

◆ SetV()

constexpr void mage::UV::SetV ( F32  v)
noexcept

Sets the V component of this set of UV texture coordinates to the given value.

Parameters
[in]vThe V component.