LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Math::Vector1u Class Reference

A vector that contains a single unsigned integer. More...

#include <math.hpp>

Inherits LiteFX::Math::Vector< UInt32, 1 >.

Public Member Functions

constexpr Vector () noexcept=default
 Initializes an empty vector.
 
constexpr Vector (Vector &&_other) noexcept=default
 Initializes a vector by taking over another vector.
 
constexpr Vector (const Vector &_other)=default
 Initializes a vector with the values provided by another vector.
 
constexpr Vector (T val) noexcept
 Initializes a vector where all elements take the value provided by val .
 
constexpr Vector (T x, T y) noexcept
 Initializes a 2D vector using the values provided by x and y .
 
constexpr Vector (T x, T y, T z) noexcept
 Initializes a 3D vector using the values provided by x , y and z .
 
constexpr Vector (T x, T y, T z, T w) noexcept
 Initializes a 4D vector using the values provided by x , y , z and w .
 
constexpr Vector (std::ranges::input_range auto &&input) noexcept
 Initializes the vector from an arbitrary input range.
 
- Public Member Functions inherited from LiteFX::Math::Vector< UInt32, 1 >
constexpr Vector () noexcept=default
 Initializes an empty vector.
 
constexpr Vector (Vector &&_other) noexcept=default
 Initializes a vector by taking over another vector.
 
constexpr Vector (const Vector &_other)=default
 Initializes a vector with the values provided by another vector.
 
constexpr Vector (UInt32 val) noexcept
 Initializes a vector where all elements take the value provided by val .
 
constexpr Vector (UInt32 x, UInt32 y) noexcept
 Initializes a 2D vector using the values provided by x and y .
 
constexpr Vector (UInt32 x, UInt32 y, UInt32 z) noexcept
 Initializes a 3D vector using the values provided by x , y and z .
 
constexpr Vector (UInt32 x, UInt32 y, UInt32 z, UInt32 w) noexcept
 Initializes a 4D vector using the values provided by x , y , z and w .
 
constexpr Vector (std::ranges::input_range auto &&input) noexcept
 Initializes the vector from an arbitrary input range.
 
constexpr Vectoroperator= (Vector &&_other) noexcept=default
 Moves the elements of the other vector to the current vector.
 
constexpr Vectoroperator= (const Vector &_other)=default
 Copys the elements of another vector into the current vector.
 
constexpr auto & operator= (std::ranges::input_range auto &&input) noexcept
 Copies the values from an arbitrary input range into the current vector instance.
 
constexpr ~Vector () noexcept=default
 Destroys the vector.
 
constexpr UInt32 operator[] (unsigned int i) const noexcept
 Returns a value from the vector, indexed by the parameter i .
 
constexpr UInt32operator[] (unsigned int i) noexcept
 Returns a reference to a value from the vector, indexed by the parameter i .
 
constexpr auto begin () noexcept
 Returns an interator for that addresses the begin of the vector elements.
 
constexpr auto end () noexcept
 Returns an interator for that addresses the end of the vector elements.
 
constexpr auto cbegin () const noexcept
 Returns a constant interator for that addresses the begin of the vector elements.
 
constexpr auto cend () const noexcept
 Returns a constant interator for that addresses the end of the vector elements.
 
constexpr const scalar_typeelements () const noexcept
 Returns a pointer to the elements of the vector.
 
constexpr operator std::array< UInt32, DIM > () const noexcept
 Converts the vector to an instance of std::array.
 
constexpr operator std::vector< UInt32 > () const
 Converts the vector into an instance of type std::vector.
 
constexpr int size () const noexcept
 Returns the number of dimensions of the vector.
 
constexpr scalar_type x () const noexcept
 Returns the value of the x component of the vector.
 
constexpr scalar_typex () noexcept
 Returns a reference of the value of the x component of the vector.
 
constexpr scalar_type y () const noexcept
 Returns the value of the y component of the vector.
 
constexpr scalar_typey () noexcept
 Returns a reference of the value of the y component of the vector.
 
constexpr scalar_type z () const noexcept
 Returns the value of the z component of the vector.
 
constexpr scalar_typez () noexcept
 Returns a reference of the value of the z component of the vector.
 
constexpr scalar_type w () const noexcept
 Returns the value of the w component of the vector.
 
constexpr scalar_typew () noexcept
 Returns a reference of the value of the w component of the vector.
 

Additional Inherited Members

- Public Types inherited from LiteFX::Math::Vector< UInt32, 1 >
using scalar_type
 The type of the vector elements.
 
using vec_type
 The type of the vector itself.
 
- Static Public Attributes inherited from LiteFX::Math::Vector< UInt32, 1 >
static constexpr size_t vec_size
 Stores the size of the vector.
 
- Protected Types inherited from LiteFX::Math::Vector< UInt32, 1 >
using array_type
 
- Protected Attributes inherited from LiteFX::Math::Vector< UInt32, 1 >
array_type m_elements
 

Detailed Description

A vector that contains a single unsigned integer.

Member Function Documentation

◆ Vector() [1/8]

LiteFX::Math::Vector< T, DIM >::Vector ( )
constexprdefaultnoexcept

Initializes an empty vector.

◆ Vector() [2/8]

LiteFX::Math::Vector< T, DIM >::Vector ( const Vector & _other)
constexprdefault

Initializes a vector with the values provided by another vector.

Parameters
_otherThe other vector to copy the values from.

◆ Vector() [3/8]

LiteFX::Math::Vector< T, DIM >::Vector ( std::ranges::input_range auto && input)
inlineexplicitconstexprnoexcept

Initializes the vector from an arbitrary input range.

Parameters
inputThe range to initialize the vector with.

◆ Vector() [4/8]

LiteFX::Math::Vector< T, DIM >::Vector ( T val)
inlineconstexprnoexcept

Initializes a vector where all elements take the value provided by val .

Parameters
valThe value to initialize all elements of the vector with.

◆ Vector() [5/8]

LiteFX::Math::Vector< T, DIM >::Vector ( T x,
T y )
inlineconstexprnoexcept

Initializes a 2D vector using the values provided by x and y .

Parameters
xThe value to initialize the x-component of the vector with.
yThe value to initialize the y-component of the vector with.

◆ Vector() [6/8]

LiteFX::Math::Vector< T, DIM >::Vector ( T x,
T y,
T z )
inlineconstexprnoexcept

Initializes a 3D vector using the values provided by x , y and z .

Parameters
xThe value to initialize the x-component of the vector with.
yThe value to initialize the y-component of the vector with.
zThe value to initialize the z-component of the vector with.

◆ Vector() [7/8]

LiteFX::Math::Vector< T, DIM >::Vector ( T x,
T y,
T z,
T w )
inlineconstexprnoexcept

Initializes a 4D vector using the values provided by x , y , z and w .

Parameters
xThe value to initialize the x-component of the vector with.
yThe value to initialize the y-component of the vector with.
zThe value to initialize the z-component of the vector with.
wThe value to initialize the w-component of the vector with.

◆ Vector() [8/8]

LiteFX::Math::Vector< T, DIM >::Vector ( Vector && _other)
constexprdefaultnoexcept

Initializes a vector by taking over another vector.

Parameters
_otherThe vector to take over.