|
|
Valtype * | ptr () noexcept |
| | Pointer accessor for direct copying.
|
|
const Valtype * | ptr () const noexcept |
| | Pointer accessor for direct copying.
|
| Vector & | Init (specials s=specials::ex) noexcept |
| | Initializes the vector.
|
| constexpr bool | Is (specials s) const noexcept |
| | Test the vector to mach a special vector exactly.
|
| constexpr Valtype | Length () const noexcept |
| | Calculates the length of the vector.
|
| auto | Normalize () noexcept -> decltype(Valtype{}/Valtype{}) |
| | Normalizes the vector to length 1.
|
| constexpr bool | IsNormal (Valtype epsilon_length=2 *std::numeric_limits< Valtype >::epsilon()) const noexcept |
|
Vector & | Rotate (const Vector< AngleType > &r, AngleType angle) noexcept |
| | Rotate this vector around unit vector r with angle in radiants.
|
|
Vector & | Rotate (const Vector< AngleType > &r) noexcept |
| | Rotate this vector around r with angle r.Length() in radiants.
|
| template<typename Valtype2> |
| constexpr Vector< Valtype > | ParallelProjection (const Vector< Valtype2 > &normal) const noexcept |
| | Part of this Vector which is parallel to normal.
|
| template<typename Valtype2> |
| constexpr Vector< Valtype > | OrthogonalProjection (const Vector< Valtype2 > &normal) const noexcept |
| | Calculate part of this tVector wich is orthogonal to normal.
|
| constexpr bool | Equals (const Vector &v, Valtype epsilon=Valtype{0}) const noexcept |
| | Comparison within some range.
|
|
Vector & | Round (int toDigit) noexcept |
| | Rounds the vectors values to a certain digit after the point.
|
|
template<typename Valtype2> |
| Vector< Valtype > & | operator= (const Valtype2 *pVal) noexcept |
|
template<typename Valtype2> |
| Vector< Valtype > & | operator= (const Vector2D< Valtype2 > &vector) noexcept |
- Parameters
-
| dx | cartesian x component. |
| dy | cartesian y component. |
| dz | cartesian z component. |
| s | One of the specials values. Vector will be initialized accordingly.
|
| p | Position for explicit conversion. |
| pVal | Array of three values. |
|
|
constexpr | Vector () noexcept=default |
| | Does not initialize the members.
|
|
constexpr | Vector (Valtype dx, Valtype dy, Valtype dz) noexcept |
| | Does not initialize the members.
|
|
constexpr | Vector (specials s) noexcept |
| | Does not initialize the members.
|
|
| Vector (const Position< Valtype > &p)=delete |
| | Conversions between Position and Vector shouldn't be necessary.
|
|
constexpr | Vector (const Vector2D< Valtype > &v2D) noexcept |
| | Does not initialize the members.
|
|
template<typename Valtype2> |
| | Vector (const Valtype2 *pVal) noexcept |
| | Does not initialize the members.
|
- Parameters
-
| pVal | Array of three values. |
| vector | source vector |
|
|
template<typename Valtype2> |
| Vector & | operator= (const Valtype2 *pVal) noexcept |
|
template<typename Valtype2> |
| Vector & | operator= (const Vector2D< Valtype2 > &vector) noexcept |
- Returns
- Reference to value.
|
|
const Valtype & | operator[] (size_t index) const |
|
Valtype & | operator[] (size_t index) |
Calculate the vector as normal vector from Yaw and Pitch.
If the dx,dy are small the yaw will be calculated to be zero.
- Parameters
-
| yaw | The Yaw angle. The angle in the plane. |
| pitch | The Pitch angle. The angle vertical to a plane. |
| epsilon | length in x/y direction to ignore for yaw. |
- Returns
- yaw, pitch, roll in a Position struct.
|
|
Vector & | AircraftPrincipalAxes (AngleType yaw, AngleType pitch) |
|
Vector & | AircraftPrincipalAxes (const Position2D< AngleType > &angles) |
|
Position2D< AngleType > | AircraftPrincipalAxes (Valtype epsilon=std::numeric_limits< Valtype >::epsilon()) const |
template<typename Valtype>
struct spat::Vector< Valtype >
Implements a 3D - vector in cartesian coordinates.
Specifies the coordinates of a direction in 3D space. For points, like e.g. vertices, use the Position type.