#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 > | |
MR_REQUIRES_IF_SUPPORTED (!std::is_same_v< T, U >) const expr explicit 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 |
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 |
Friends | |
constexpr bool | operator== (const Vector4< T > &a, const Vector4< T > &b) |
constexpr bool | operator!= (const Vector4< T > &a, const Vector4< T > &b) |
constexpr const Vector4< T > & | operator+ (const Vector4< T > &a) |
constexpr auto | operator- (const Vector4< T > &a) -> Vector4< decltype(-std::declval< T >())> |
constexpr auto | operator+ (const Vector4< T > &a, const Vector4< T > &b) -> Vector4< decltype(std::declval< T >()+std::declval< T >())> |
constexpr auto | operator- (const Vector4< T > &a, const Vector4< T > &b) -> Vector4< decltype(std::declval< T >() - std::declval< T >())> |
constexpr auto | operator* (T a, const Vector4< T > &b) -> Vector4< decltype(std::declval< T >() *std::declval< T >())> |
constexpr auto | operator* (const Vector4< T > &b, T a) -> Vector4< decltype(std::declval< T >() *std::declval< T >())> |
constexpr auto | operator/ (Vector4< T > b, T a) -> Vector4< decltype(std::declval< T >()/std::declval< T >())> |
constexpr Vector4< T > & | operator+= (Vector4< T > &a, const Vector4< T > &b) |
constexpr Vector4< T > & | operator-= (Vector4< T > &a, const Vector4< T > &b) |
constexpr Vector4< T > & | operator*= (Vector4< T > &a, T b) |
constexpr Vector4< T > & | operator/= (Vector4< T > &a, T b) |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename T > | |
T | distanceSq (const Vector4< T > &a, const Vector4< T > &b) |
squared distance between two points, which is faster to compute than just distance | |
template<typename T > | |
T | distance (const Vector4< T > &a, const Vector4< T > &b) |
distance between two points, better use distanceSq for higher performance | |
template<typename T > | |
auto | dot (const Vector4< T > &a, const Vector4< T > &b) -> decltype(a.x *b.x) |
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 |
|
inlinestaticconstexprnoexcept |
|
inlinenodiscard |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inline |
assuming this is a point represented in homogeneous 4D coordinates, returns the point as 3D-vector
distance between two points, better use distanceSq for higher performance
squared distance between two points, which is faster to compute than just distance
per component division
|
related |
dot product
per component multiplication
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
related |
squared length
|
staticconstexpr |
T MR::Vector4< T >::w |
T MR::Vector4< T >::x |
T MR::Vector4< T >::y |
T MR::Vector4< T >::z |