wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::math::Vec< T, N > Struct Template Reference

#include <vector.hpp>

Public Types

using vec_t = Vec<T, N>
 

Public Member Functions

 Vec ()
 
 Vec (std::array< T, N > data)
 
 Vec (float scalar)
 
auto at (std::size_t i) -> T &
 
auto at (std::size_t i) const
 
constexpr auto operator*= (float scalar) const
 
constexpr auto operator* (float scalar) const
 
constexpr auto operator*= (const vec_t &other)
 
constexpr auto operator* (const vec_t &other) const
 
constexpr auto dot (const vec_t &other) const
 
constexpr auto operator+= (const vec_t &other)
 
constexpr auto operator+ (const vec_t &other) const
 
constexpr auto operator- (const vec_t &other) const
 
constexpr auto operator- () const
 
auto operator/ (float scalar) const
 
constexpr auto operator== (const vec_t &other) const
 
constexpr auto operator!= (const vec_t &other) const
 
constexpr auto length () const
 
auto normalized () const
 

Static Public Member Functions

static auto UnitX ()
 
static auto UnitY ()
 
static auto UnitZ ()
 

Public Attributes

std::array< T, N > data {}
 

Member Typedef Documentation

◆ vec_t

template<typename T , std::size_t N>
using wren::math::Vec< T, N >::vec_t = Vec<T, N>

Constructor & Destructor Documentation

◆ Vec() [1/3]

template<typename T , std::size_t N>
wren::math::Vec< T, N >::Vec ( )
inline

◆ Vec() [2/3]

template<typename T , std::size_t N>
wren::math::Vec< T, N >::Vec ( std::array< T, N > data)
inline

◆ Vec() [3/3]

template<typename T , std::size_t N>
wren::math::Vec< T, N >::Vec ( float scalar)
inline

Member Function Documentation

◆ at() [1/2]

template<typename T , std::size_t N>
auto wren::math::Vec< T, N >::at ( std::size_t i) -> T&
inline
Here is the caller graph for this function:

◆ at() [2/2]

template<typename T , std::size_t N>
auto wren::math::Vec< T, N >::at ( std::size_t i) const
inline

◆ dot()

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::dot ( const vec_t & other) const
inlineconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ length()

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::length ( ) const
inlineconstexpr
Here is the caller graph for this function:

◆ normalized()

template<typename T , std::size_t N>
auto wren::math::Vec< T, N >::normalized ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator!= ( const vec_t & other) const
inlineconstexpr

◆ operator*() [1/2]

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator* ( const vec_t & other) const
inlineconstexpr

◆ operator*() [2/2]

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator* ( float scalar) const
inlineconstexpr

◆ operator*=() [1/2]

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator*= ( const vec_t & other)
inlineconstexpr

◆ operator*=() [2/2]

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator*= ( float scalar) const
inlineconstexpr

◆ operator+()

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator+ ( const vec_t & other) const
inlineconstexpr

◆ operator+=()

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator+= ( const vec_t & other)
inlineconstexpr

◆ operator-() [1/2]

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator- ( ) const
inlineconstexpr

◆ operator-() [2/2]

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator- ( const vec_t & other) const
inlineconstexpr

◆ operator/()

template<typename T , std::size_t N>
auto wren::math::Vec< T, N >::operator/ ( float scalar) const
inline

◆ operator==()

template<typename T , std::size_t N>
constexpr auto wren::math::Vec< T, N >::operator== ( const vec_t & other) const
inlineconstexpr

◆ UnitX()

template<typename T , std::size_t N>
static auto wren::math::Vec< T, N >::UnitX ( )
inlinestatic

◆ UnitY()

template<typename T , std::size_t N>
static auto wren::math::Vec< T, N >::UnitY ( )
inlinestatic

◆ UnitZ()

template<typename T , std::size_t N>
static auto wren::math::Vec< T, N >::UnitZ ( )
inlinestatic

Member Data Documentation

◆ data

template<typename T , std::size_t N>
std::array<T, N> wren::math::Vec< T, N >::data {}

The documentation for this struct was generated from the following file: