|
| Vector2D & | Init (specials s=specials::ex) noexcept |
| | Initializes the Vector2D.
|
|
constexpr bool | Is (specials s) const noexcept |
| | Test the Vector2D to mach a special Vector2D exactly.
|
| constexpr Valtype | Length () const noexcept |
| | Calculates the length of the Vector2D.
|
| auto | Normalize () noexcept -> decltype(Valtype{}/Valtype{}) |
|
template<typename Valtype2> |
| Vector2D & | Rotate (Valtype2 angle) noexcept |
| | Rotate this vector with angle in radiants.
|
| constexpr Vector2D | ParallelProjection (const Vector2D &normal) const noexcept |
| | Part of this tVector wich is parallel to normal.
|
| constexpr Vector2D | OrthogonalProjection (const Vector2D &normal) const noexcept |
| | Calculate part of this tVector wich is orthogonal to normal.
|
| constexpr bool | Equals (const Vector2D &v, Valtype epsilon=0) const noexcept |
| | Comparison within some range. The area within two vectors regarded as equal is a sphere with radius epsilon.
|
|
template<typename Valtype2> |
| Vector2D< Valtype > & | operator= (const Vector< Valtype2 > &v) noexcept |
|
template<typename Valtype2> |
| Vector2D< Valtype > & | Rotate (Valtype2 angle) noexcept |
- Parameters
-
| dx | cartesian x component. |
| dy | cartesian y component. |
| s | |
| p | |
| pVal | |
|
|
constexpr | Vector2D () noexcept=default |
| | Does not initialize the members.
|
|
constexpr | Vector2D (Valtype dx, Valtype dy) noexcept |
| | Does not initialize the members.
|
|
constexpr | Vector2D (specials s) noexcept |
| | Does not initialize the members.
|
|
| Vector2D (const Position2D< Valtype > &p) noexcept=delete |
| | Conversions between Position2D and Vector2D shouldn't be necessary.
|
|
constexpr | Vector2D (const Vector< Valtype > &v) noexcept |
| | Does not initialize the members.
|
|
template<typename Valtype2> |
| | Vector2D (const Valtype2 *pVal) noexcept |
| | Does not initialize the members.
|
|
|
template<typename Valtype2> |
| Vector2D & | operator= (const Vector< Valtype2 > &vector) noexcept |
- Returns
- Reference to value.
|
|
const Valtype & | operator[] (size_t index) const |
|
Valtype & | operator[] (size_t index) |
template<typename Valtype>
struct spat::Vector2D< Valtype >
Implements a 2D - vector in cartesian coordinates.
Specifies the coordinates of a direction in 2D space. For points, like e.g. vertices, use the Position2D type.