|
| | Vec3T () noexcept=default |
| | Default constructor. Leaves the components uninitialized.
|
| |
| constexpr | Vec3T (const Vec3T< T > &a_u) noexcept=default |
| | Copy constructor.
|
| |
| constexpr | Vec3T (const T &a_x, const T &a_y, const T &a_z) noexcept |
| | Full constructor.
|
| |
|
| ~Vec3T () noexcept=default |
| | Destructor (does nothing)
|
| |
| constexpr bool | lessLX (const Vec3T< T > &u) const noexcept |
| | Lexicographic comparison (x first, then y, then z).
|
| |
| constexpr T & | operator[] (size_t i) noexcept |
| | Mutable element access.
|
| |
| constexpr const T & | operator[] (size_t i) const noexcept |
| | Const element access.
|
| |
| constexpr bool | operator== (const Vec3T< T > &u) const noexcept |
| | Equality comparison.
|
| |
| constexpr bool | operator!= (const Vec3T< T > &u) const noexcept |
| | Inequality comparison.
|
| |
| constexpr Vec3T< T > & | operator= (const Vec3T< T > &u) noexcept=default |
| | Assignment operator.
|
| |
| constexpr Vec3T< T > | operator+ (const Vec3T< T > &u) const noexcept |
| | Addition operator.
|
| |
| constexpr Vec3T< T > | operator- (const Vec3T< T > &u) const noexcept |
| | Subtraction operator. Returns a new vector with subtracted components.
|
| |
| constexpr Vec3T< T > | operator+ () const noexcept |
| | Identity operator.
|
| |
| constexpr Vec3T< T > | operator- () const noexcept |
| | Negation operator.
|
| |
| constexpr Vec3T< T > | operator* (const T &s) const noexcept |
| | Multiplication operator. Returns a vector with scalar multiplied components.
|
| |
| constexpr Vec3T< T > | operator* (const Vec3T< T > &s) const noexcept |
| | Component-wise multiplication operator.
|
| |
| constexpr Vec3T< T > | operator/ (const T &s) const noexcept |
| | Division operator. Returns a vector with scalar divided components.
|
| |
| constexpr Vec3T< T > | operator/ (const Vec3T< T > &v) const noexcept |
| | Component-wise division operator.
|
| |
| constexpr Vec3T< T > & | operator+= (const Vec3T< T > &u) noexcept |
| | Vector addition operator.
|
| |
| constexpr Vec3T< T > & | operator-= (const Vec3T< T > &u) noexcept |
| | Vector subtraction operator.
|
| |
| constexpr Vec3T< T > & | operator*= (const T &s) noexcept |
| | Vector multiplication operator.
|
| |
| constexpr Vec3T< T > & | operator/= (const T &s) noexcept |
| | In-place scalar division operator.
|
| |
| constexpr Vec3T< T > | cross (const Vec3T< T > &u) const noexcept |
| | Vector cross product.
|
| |
| constexpr T | dot (const Vec3T< T > &u) const noexcept |
| | Vector dot product.
|
| |
| size_t | minDir (const bool a_doAbs) const noexcept |
| | Return the index of the smallest component (optionally by magnitude).
|
| |
| size_t | maxDir (const bool a_doAbs) const noexcept |
| | Return the direction which has the largest component (can be absolute)
|
| |
| T | length () const noexcept |
| | Compute vector length.
|
| |
| constexpr T | length2 () const noexcept |
| | Compute squared vector length.
|
| |
|
Vec3T has no ordering operators.
These once meant "every component less (greater, ...) than", which is not a strict weak ordering: two different vectors can each fail to be less than the other, so std::set, std::map and std::sort built on them silently merge or misorder distinct vectors. Compare components explicitly, or use lessLX() for a lexicographic ordering.
|
|
bool | operator< (const Vec3T< T > &u) const noexcept=delete |
| |
|
bool | operator> (const Vec3T< T > &u) const noexcept=delete |
| |
|
bool | operator<= (const Vec3T< T > &u) const noexcept=delete |
| |
|
bool | operator>= (const Vec3T< T > &u) const noexcept=delete |
| |
|
| static constexpr Vec3T< T > | zeros () noexcept |
| | Return a vector with x = y = z = 0.
|
| |
| static constexpr Vec3T< T > | ones () noexcept |
| | Return a vector with x = y = z = 1.
|
| |
| static constexpr Vec3T< T > | unit (const size_t a_dir) noexcept |
| | Return the unit basis vector for the given coordinate axis.
|
| |
| static constexpr Vec3T< T > | min () noexcept |
| | Return the most-negative representable vector.
|
| |
| static constexpr Vec3T< T > | max () noexcept |
| | Return the most-positive representable vector.
|
| |
| static constexpr Vec3T< T > | infinity () noexcept |
| | Return a vector with infinite components.
|
| |
template<typename T>
class EBGeometry::Vec3T< T >
Three-dimensional vector class with arithmetic operators.
The components are reached through operator[] (index 0, 1 or 2).
- Note
- Vec3T is the point and vector type used throughout EBGeometry. It is always 3D, i.e. independent of the application's spatial dimension.
- Template Parameters
-
| T | Floating-point precision (float or double). |