|
| Vec3T () noexcept |
| Default constructor. Sets the vector to the zero vector.
|
|
| Vec3T (const Vec3T< T > &a_u) noexcept |
| Copy constructor. More...
|
|
constexpr | Vec3T (const T &a_x, const T &a_y, const T &a_z) noexcept |
| Full constructor. More...
|
|
| ~Vec3T () noexcept=default |
| Destructor (does nothing)
|
|
constexpr bool | lessLX (const Vec3T< T > &u) const noexcept |
| Lexicographical comparison operator. This returns to true. More...
|
|
constexpr T & | operator[] (size_t i) noexcept |
| Return component in vector. (i=0 => x and so on) More...
|
|
constexpr const T & | operator[] (size_t i) const noexcept |
| Return non-modifiable component in vector. (i=0 => x and so on) More...
|
|
constexpr bool | operator== (const Vec3T< T > &u) const noexcept |
| Comparison operator. Returns true if all components are the same. More...
|
|
constexpr bool | operator!= (const Vec3T< T > &u) const noexcept |
| Comparison operator. Returns false if all components are the same. More...
|
|
constexpr bool | operator< (const Vec3T< T > &u) const noexcept |
| "Smaller than" operator. More...
|
|
constexpr bool | operator> (const Vec3T< T > &u) const noexcept |
| "Greater than" operator. More...
|
|
constexpr bool | operator<= (const Vec3T< T > &u) const noexcept |
| "Smaller or equal to" operator. More...
|
|
constexpr bool | operator>= (const Vec3T< T > &u) const noexcept |
| "Greater or equal to" operator. More...
|
|
constexpr Vec3T< T > & | operator= (const Vec3T< T > &u) noexcept |
| Assignment operator. Sets components equal to the argument vector's components. More...
|
|
constexpr Vec3T< T > | operator+ (const Vec3T< T > &u) const noexcept |
| Addition operator. Returns a new vector with added components. More...
|
|
constexpr Vec3T< T > | operator- (const Vec3T< T > &u) const noexcept |
| Subtraction operator. Returns a new vector with subtracted components. More...
|
|
constexpr Vec3T< T > | operator- () const noexcept |
| Negation operator. Returns a vector with negated components.
|
|
constexpr Vec3T< T > | operator* (const T &s) const noexcept |
| Multiplication operator. Returns a vector with scalar multiplied components. More...
|
|
constexpr Vec3T< T > | operator* (const Vec3T< T > &s) const noexcept |
| Component-wise multiplication operator. More...
|
|
constexpr Vec3T< T > | operator/ (const T &s) const noexcept |
| Division operator. Returns a vector with scalar divided components. More...
|
|
constexpr Vec3T< T > | operator/ (const Vec3T< T > &v) const noexcept |
| Component-wise division operator. More...
|
|
constexpr Vec3T< T > & | operator+= (const Vec3T< T > &u) noexcept |
| Vector addition operator. More...
|
|
constexpr Vec3T< T > & | operator-= (const Vec3T< T > &u) noexcept |
| Vector subtraction operator. More...
|
|
constexpr Vec3T< T > & | operator*= (const T &s) noexcept |
| Vector multiplication operator. More...
|
|
constexpr Vec3T< T > & | operator/= (const T &s) noexcept |
| Vector division operator. More...
|
|
constexpr Vec3T< T > | min (const Vec3T< T > &u) noexcept |
| Vector minimum function. Returns a new vector with componentwise minimums. More...
|
|
constexpr Vec3T< T > | max (const Vec3T< T > &u) noexcept |
| Vector maximum function. Returns a new vector with componentwise maximums. More...
|
|
constexpr Vec3T< T > | cross (const Vec3T< T > &u) const noexcept |
| Vector cross product. More...
|
|
constexpr T | dot (const Vec3T< T > &u) const noexcept |
| Vector dot product. More...
|
|
size_t | minDir (const bool a_doAbs) const noexcept |
| Return the direction which has the smallest component (can be absolute) More...
|
|
size_t | maxDir (const bool a_doAbs) const noexcept |
| Return the direction which has the largest component (can be absolute) More...
|
|
constexpr T | length () const noexcept |
| Compute vector length. More...
|
|
constexpr T | length2 () const noexcept |
| Compute vector length squared. More...
|
|
|
static constexpr Vec3T< T > | zero () noexcept |
| Return av vector with x = y = z = 0.
|
|
static constexpr Vec3T< T > | one () noexcept |
| Return av vector with x = y = z = 1.
|
|
static constexpr Vec3T< T > | unit (const size_t a_dir) noexcept |
| Return av vector with x = y = z = 1. More...
|
|
static constexpr Vec3T< T > | min () noexcept |
| Return a vector with minimum representable components.
|
|
static constexpr Vec3T< T > | max () noexcept |
| Return a vector with maximum representable components.
|
|
static constexpr Vec3T< T > | infinity () noexcept |
| Return a vector with inf components.
|
|
template<typename T>
class Vec3T< T >
Three-dimensional vector class with arithmetic operators.
The class has a public-only interface. To change it's components one can call the member functions, or set components directly, e.g. vec.x = 5.0
- Note
- Vec3T is a templated class primarily used with DCEL grids. It is always 3D, i.e. independent of Chombo configuration settings. This lets one use DCEL functionality even though the simulation might only be 2D.