#include <MRVector4.h>
Public Types | |
using | ValueType = T |
using | MatrixType = Matrix4<T> |
using | SymMatrixType = SymMatrix4<T> |
Public Member Functions | |
constexpr | Vector4 () noexcept |
Vector4 (NoInit) noexcept | |
constexpr | Vector4 (T x, T y, T z, T w) noexcept |
template<typename U > | |
constexpr | Vector4 (const Vector4< U > &v) noexcept |
constexpr const T & | operator[] (int e) const noexcept |
constexpr T & | operator[] (int e) noexcept |
T | lengthSq () const |
auto | length () const |
Vector4 | normalized () const MR_REQUIRES_IF_SUPPORTED(!std |
Vector4 | operator- () const |
const Vector4 & | operator+ () const |
Vector4 & | operator+= (const Vector4< T > &b) |
Vector4 & | operator-= (const Vector4< T > &b) |
Vector4 & | operator*= (T b) |
Vector4 & | operator/= (T b) |
Vector3< T > | proj3d () const MR_REQUIRES_IF_SUPPORTED(!std |
assuming this is a point represented in homogeneous 4D coordinates, returns the point as 3D-vector | |
bool | isFinite () const MR_REQUIRES_IF_SUPPORTED(std |
Static Public Member Functions | |
static constexpr Vector4 | diagonal (T a) noexcept |
Public Attributes | |
T | x |
T | y |
T | z |
T | w |
Static Public Attributes | |
static constexpr int | elements = 4 |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename T > | |
bool | operator== (const Vector4< T > &a, const Vector4< T > &b) |
template<typename T > | |
T | dot (const Vector4< T > &a, const Vector4< T > &b) |
dot product | |
template<typename T > | |
T | sqr (const Vector4< T > &a) |
squared length | |
template<typename T > | |
Vector4< T > | mult (const Vector4< T > &a, const Vector4< T > &b) |
per component multiplication | |
template<typename T > | |
Vector4< T > | div (const Vector4< T > &a, const Vector4< T > &b) |
per component division | |
four-dimensional vector
using MR::Vector4< T >::MatrixType = Matrix4<T> |
using MR::Vector4< T >::SymMatrixType = SymMatrix4<T> |
using MR::Vector4< T >::ValueType = T |
|
inlineconstexprnoexcept |
|
inlineexplicitnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenodiscard |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |
assuming this is a point represented in homogeneous 4D coordinates, returns the point as 3D-vector
per component division
per component multiplication
|
related |
squared length
|
staticconstexpr |
T MR::Vector4< T >::w |
T MR::Vector4< T >::x |
T MR::Vector4< T >::y |
T MR::Vector4< T >::z |