Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
More...
#include <array>
#include <iostream>
#include "EBGeometry_NamespaceHeader.hpp"
#include "EBGeometry_NamespaceFooter.hpp"
#include "EBGeometry_VecImplem.hpp"
Go to the source code of this file.
|
template<typename T > |
constexpr Vec2T< T > | operator* (const T &s, const Vec2T< T > &a_other) noexcept |
| Multiplication operator in the form s*Vec2T. More...
|
|
template<typename T > |
constexpr Vec2T< T > | operator/ (const T &s, const Vec2T< T > &a_other) noexcept |
| Division operator in the form s*Vec2T. More...
|
|
template<typename T > |
Vec2T< T > | min (const Vec2T< T > &u, const Vec2T< T > &v) noexcept |
| Minimum function. Returns new vector with component-wise minimums. More...
|
|
template<typename T > |
Vec2T< T > | max (const Vec2T< T > &u, const Vec2T< T > &v) noexcept |
| Maximum function. Returns new vector with component-wise minimums. More...
|
|
template<typename T > |
T | dot (const Vec2T< T > &u, const Vec2T< T > &v) noexcept |
| Dot product function. More...
|
|
template<typename T > |
T | length (const Vec2T< T > &v) noexcept |
| Length function. More...
|
|
template<class R , typename T > |
constexpr Vec3T< T > | operator* (const R &s, const Vec3T< T > &u) noexcept |
| Multiplication operator. More...
|
|
template<typename T > |
constexpr Vec3T< T > | operator* (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Multiplication operator. More...
|
|
template<class R , typename T > |
constexpr Vec3T< T > | operator/ (const R &s, const Vec3T< T > &u) noexcept |
| Division operator. More...
|
|
template<typename T > |
constexpr Vec3T< T > | min (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Minimum function. Returns new vector with component-wise minimums. More...
|
|
template<typename T > |
constexpr Vec3T< T > | max (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Maximum function. Returns new vector with component-wise minimums. More...
|
|
template<typename T > |
constexpr T | dot (const Vec3T< T > &u, const Vec3T< T > &v) noexcept |
| Dot product function. More...
|
|
template<typename T > |
constexpr T | length (const Vec3T< T > &v) noexcept |
| Length function. More...
|
|
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
- Author
- Robert Marskar
◆ dot() [1/2]
template<typename T >
T dot |
( |
const Vec2T< T > & |
u, |
|
|
const Vec2T< T > & |
v |
|
) |
| |
|
inlinenoexcept |
Dot product function.
- Parameters
-
[in] | u | Vector |
[in] | v | Other vector |
◆ dot() [2/2]
template<typename T >
constexpr T dot |
( |
const Vec3T< T > & |
u, |
|
|
const Vec3T< T > & |
v |
|
) |
| |
|
inlineconstexprnoexcept |
Dot product function.
- Parameters
-
[in] | u | Vector |
[in] | v | Other vector |
◆ length() [1/2]
template<typename T >
T length |
( |
const Vec2T< T > & |
v | ) |
|
|
inlinenoexcept |
Length function.
- Parameters
-
◆ length() [2/2]
template<typename T >
constexpr T length |
( |
const Vec3T< T > & |
v | ) |
|
|
inlineconstexprnoexcept |
Length function.
- Parameters
-
◆ max() [1/2]
Maximum function. Returns new vector with component-wise minimums.
- Parameters
-
[in] | u | Vector |
[in] | v | Other vector |
- Returns
- Returns new vector with components x = std::max(u.x, v.x).
◆ max() [2/2]
Maximum function. Returns new vector with component-wise minimums.
- Parameters
-
[in] | u | Vector |
[in] | v | Other vector |
- Returns
- Returns new vector with components X[0] = std::max(u.X[0], v.X[0]) and so on
◆ min() [1/2]
Minimum function. Returns new vector with component-wise minimums.
- Parameters
-
[in] | u | Vector |
[in] | v | Other vector |
- Returns
- Returns new vector with components x = std::min(u.x, v.x).
◆ min() [2/2]
Minimum function. Returns new vector with component-wise minimums.
- Parameters
-
[in] | u | Vector |
[in] | v | Other vector |
- Returns
- Returns new vector with components X[0] = std::min(u.X[0], v.X[0]) and so on
◆ operator*() [1/3]
template<class R , typename T >
constexpr Vec3T<T> operator* |
( |
const R & |
s, |
|
|
const Vec3T< T > & |
u |
|
) |
| |
|
inlineconstexprnoexcept |
Multiplication operator.
- Parameters
-
[in] | s | Multiplication scalar |
[in] | u | Vector |
- Returns
- Returns new vector with components X[0] = s*X[0] and so on.
◆ operator*() [2/3]
template<typename T >
constexpr Vec2T<T> operator* |
( |
const T & |
s, |
|
|
const Vec2T< T > & |
a_other |
|
) |
| |
|
inlineconstexprnoexcept |
Multiplication operator in the form s*Vec2T.
- Parameters
-
[in] | s | Multiplication factor |
[in] | a_other | Other vector |
- Returns
- Returns a new vector with components x = s*a_other.x (and same for y)
◆ operator*() [3/3]
template<typename T >
constexpr Vec3T<T> operator* |
( |
const Vec3T< T > & |
u, |
|
|
const Vec3T< T > & |
v |
|
) |
| |
|
inlineconstexprnoexcept |
Multiplication operator.
- Parameters
-
[in] | u | One vector |
[in] | v | Other vector |
- Returns
- Returns new vector with components X[0] = u[0]*[v0] and so on
◆ operator/() [1/2]
template<class R , typename T >
constexpr Vec3T<T> operator/ |
( |
const R & |
s, |
|
|
const Vec3T< T > & |
u |
|
) |
| |
|
inlineconstexprnoexcept |
Division operator.
- Parameters
-
[in] | s | Division scalar |
[in] | u | Vector |
- Returns
- Returns new vector with components X[0] = X[0]/s and so on.
◆ operator/() [2/2]
template<typename T >
constexpr Vec2T<T> operator/ |
( |
const T & |
s, |
|
|
const Vec2T< T > & |
a_other |
|
) |
| |
|
inlineconstexprnoexcept |
Division operator in the form s*Vec2T.
- Parameters
-
[in] | s | Division factor |
[in] | a_other | Other vector |
- Returns
- Returns a new vector with components x = (1/s)*a_other.x (and same for y)