#include <MRVector3.h>
Public Types | |
using | ValueType = T |
using | MatrixType = Matrix3<T> |
using | SymMatrixType = SymMatrix3<T> |
Public Member Functions | |
constexpr | Vector3 () noexcept |
Vector3 (NoInit) noexcept | |
constexpr | Vector3 (T x, T y, T z) noexcept |
constexpr | Vector3 (const Vector2< T > &v) noexcept |
template<typename U > | |
constexpr | Vector3 (const Vector3< U > &v) noexcept |
constexpr const T & | operator[] (int e) const noexcept |
constexpr T & | operator[] (int e) noexcept |
T | lengthSq () const |
auto | length () const |
Vector3 | normalized () const MR_REQUIRES_IF_SUPPORTED(std |
Vector3 furthestBasisVector() const MR_REQUIRES_IF_SUPPORTED(!std std::pair< Vector3, Vector3 > perpendicular() const MR_REQUIRES_IF_SUPPORTED(std Vector3 | transformed (const AffineXf3< T > *xf) const MR_REQUIRES_IF_SUPPORTED(std |
returns one of 3 basis unit vector that makes the biggest angle with the direction specified by this | |
void | unsignZeroValues () MR_REQUIRES_IF_SUPPORTED(std |
get rid of signed zero values to be sure that equal vectors have identical binary representation | |
bool | isFinite () const MR_REQUIRES_IF_SUPPORTED(std |
Static Public Member Functions | |
static constexpr Vector3 | diagonal (T a) noexcept |
static constexpr Vector3 | plusX () noexcept |
static constexpr Vector3 | plusY () noexcept |
static constexpr Vector3 | plusZ () noexcept |
static constexpr Vector3 | minusX () noexcept |
static constexpr Vector3 | minusY () noexcept |
static constexpr Vector3 | minusZ () noexcept |
Public Attributes | |
T | x |
T | y |
T | z |
Static Public Attributes | |
static constexpr int | elements = 3 |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename T > | |
Vector3< T > & | operator+= (Vector3< T > &a, const Vector3< T > &b) |
template<typename T > | |
Vector3< T > | cross (const Vector3< T > &a, const Vector3< T > &b) |
cross product | |
template<typename T > | |
T | dot (const Vector3< T > &a, const Vector3< T > &b) |
dot product | |
template<typename T > | |
T | sqr (const Vector3< T > &a) |
squared length | |
template<typename T > | |
T | mixed (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c) |
mixed product | |
template<typename T > | |
Vector3< T > | mult (const Vector3< T > &a, const Vector3< T > &b) |
per component multiplication | |
template<typename T > | |
Vector3< T > | div (const Vector3< T > &a, const Vector3< T > &b) |
per component division | |
template<typename T > | |
T | angle (const Vector3< T > &a, const Vector3< T > &b) |
template<typename T > | |
Vector3< T > | unitVector3 (T azimuth, T altitude) |
returns a point on unit sphere given two angles | |
three-dimensional vector
using MR::Vector3< T >::MatrixType = Matrix3<T> |
using MR::Vector3< T >::SymMatrixType = SymMatrix3<T> |
using MR::Vector3< T >::ValueType = T |
|
inlineconstexprnoexcept |
|
inlineexplicitnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenodiscard |
|
inline |
|
inline |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenodiscard |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inline |
returns one of 3 basis unit vector that makes the biggest angle with the direction specified by this
returns 2 unit vector, which together with this vector make an orthogonal basis Currently not implemented for integral vectors. returns this vector transformed by xf if it is
|
inline |
get rid of signed zero values to be sure that equal vectors have identical binary representation
computes minimal angle in [0,pi] between two vectors; the function is symmetric: angle( a, b ) == angle( b, a )
cross product
per component division
|
related |
mixed product
per component multiplication
|
related |
|
related |
squared length
|
related |
returns a point on unit sphere given two angles
|
staticconstexpr |
T MR::Vector3< T >::x |
T MR::Vector3< T >::y |
T MR::Vector3< T >::z |