NRE_Vector3D.hpp File Reference

Declaration of Math's API's Object : Vector3D. More...

#include <Utility/String/NRE_String.hpp>
#include <Utility/Interfaces/Stringable/NRE_Stringable.hpp>
#include "../../NRE_Math.hpp"
#include "NRE_Vector3D.tpp"

Go to the source code of this file.

Classes

class  NRE::Math::Vector2D< T >
 A cartesian 2D vector. More...
 
class  NRE::Math::Vector4D< T >
 A cartesian 4D vector, 3D homogeneous. More...
 
class  NRE::Math::Vector3D< T >
 A cartesian 3D vector, 2D homogeneous. More...
 
struct  std::common_type< NRE::Math::Vector3D< T >, NRE::Math::Vector3D< K > >
 
class  std::hash< NRE::Math::Vector3D< float > >
 

Namespaces

 NRE
 The NearlyRealEngine's global namespace.
 
 Math
 Math's API.
 
 std
 The stl standard namespace.
 

Typedefs

template<class T >
using NRE::Math::Point3D = Vector3D< T >
 

Functions

template<class T , class K , typename = UseIfArithmetic<K>>
constexpr Vector3D< std::common_type_t< T, K > > NRE::Math::operator* (K k, Vector3D< T > const &u)
 
template<class T >
Vector3D< T > NRE::Math::normalize (Vector3D< T > const &u)
 
template<class T , class K , typename = UseIfArithmetic<K>>
Vector3D< std::common_type_t< T, K > > NRE::Math::pow (Vector3D< T > const &u, K k)
 
template<class T , class K >
Vector3D< std::common_type_t< T, K > > NRE::Math::pow (Vector3D< T > const &u, Vector3D< K > const &p)
 
template<class T , class K >
constexpr Vector3D< std::common_type_t< T, K > > NRE::Math::reflect (Vector3D< T > const &u, Vector3D< K > const &n)
 

Detailed Description

Declaration of Math's API's Object : Vector3D.

Author
Louis ABEL
Date
27/03/2019

Function Documentation

template<class T >
Vector3D<T> NRE::Math::normalize ( Vector3D< T > const &  u)

Return a normalized version of the given vector

Parameters
uthe vector to normalize
Returns
the normalized vector
template<class T , class K , typename = UseIfArithmetic<K>>
constexpr Vector3D<std::common_type_t<T, K> > NRE::Math::operator* ( k,
Vector3D< T > const &  u 
)

Compute the vector resulting in the multiplication of u by k

Parameters
uthe vector
kthe multiplication factor
Returns
the computed vector
template<class T , class K , typename = UseIfArithmetic<K>>
Vector3D<std::common_type_t<T, K> > NRE::Math::pow ( Vector3D< T > const &  u,
k 
)

Return a vector with components raised to the given power

Parameters
uthe vector to raise
kthe power to which to raise the vector
Returns
the raised vector
template<class T , class K >
Vector3D<std::common_type_t<T, K> > NRE::Math::pow ( Vector3D< T > const &  u,
Vector3D< K > const &  p 
)

Return a vector with components raised to the given power

Parameters
uthe vector to raise
pthe power to which to raise the vector
Returns
the raised vector
template<class T , class K >
constexpr Vector3D<std::common_type_t<T, K> > NRE::Math::reflect ( Vector3D< T > const &  u,
Vector3D< K > const &  n 
)

Reflect the given incidence vector with the given normal

Parameters
uthe vector to reflect
nthe normal
Returns
the reflected vector