#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 |
Vector3 | furthestBasisVector () const |
returns one of 3 basis unit vector that makes the biggest angle with the direction specified by this | |
std::pair< Vector3, Vector3 > | perpendicular () const |
template<MR_SAME_TYPE_TEMPLATE_PARAM(T, TT) > | |
Vector3 | transformed (const AffineXf3< TT > *xf) const |
returns this vector transformed by xf if it is | |
void | unsignZeroValues () |
get rid of signed zero values to be sure that equal vectors have identical binary representation | |
bool | isFinite () const |
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 |
Friends | |
constexpr bool | operator== (const Vector3< T > &a, const Vector3< T > &b) |
constexpr bool | operator!= (const Vector3< T > &a, const Vector3< T > &b) |
constexpr const Vector3< T > & | operator+ (const Vector3< T > &a) |
constexpr auto | operator- (const Vector3< T > &a) -> Vector3< decltype(-std::declval< T >())> |
constexpr auto | operator+ (const Vector3< T > &a, const Vector3< T > &b) -> Vector3< decltype(std::declval< T >()+std::declval< T >())> |
constexpr auto | operator- (const Vector3< T > &a, const Vector3< T > &b) -> Vector3< decltype(std::declval< T >() - std::declval< T >())> |
constexpr auto | operator* (T a, const Vector3< T > &b) -> Vector3< decltype(std::declval< T >() *std::declval< T >())> |
constexpr auto | operator* (const Vector3< T > &b, T a) -> Vector3< decltype(std::declval< T >() *std::declval< T >())> |
constexpr auto | operator/ (Vector3< T > b, T a) -> Vector3< decltype(std::declval< T >()/std::declval< T >())> |
constexpr Vector3< T > & | operator+= (Vector3< T > &a, const Vector3< T > &b) |
constexpr Vector3< T > & | operator-= (Vector3< T > &a, const Vector3< T > &b) |
constexpr Vector3< T > & | operator*= (Vector3< T > &a, T b) |
constexpr Vector3< T > & | operator/= (Vector3< T > &a, T b) |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename T > | |
T | distanceSq (const Vector3< T > &a, const Vector3< T > &b) |
squared distance between two points, which is faster to compute than just distance | |
template<typename T > | |
T | distance (const Vector3< T > &a, const Vector3< T > &b) |
distance between two points, better use distanceSq for higher performance | |
template<typename T > | |
Vector3< T > | cross (const Vector3< T > &a, const Vector3< T > &b) |
cross product | |
template<typename T > | |
auto | dot (const Vector3< T > &a, const Vector3< T > &b) -> decltype(a.x *b.x) |
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 |
Vector3 MR::Vector3< T >::furthestBasisVector | ( | ) | const |
returns one of 3 basis unit vector that makes the biggest angle with the direction specified by this
|
inlinenodiscard |
|
inline |
|
inline |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenodiscard |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
std::pair< Vector3, Vector3 > MR::Vector3< T >::perpendicular | ( | ) | const |
returns 2 unit vector, which together with this vector make an orthogonal basis Currently not implemented for integral vectors.
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inline |
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
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
|
related |
mixed product
per component multiplication
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
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 |