Definition of the Vector2
alias template and closely related code.
More...
#include <playrho/Real.hpp>
#include <playrho/Settings.hpp>
#include <playrho/Units.hpp>
#include <playrho/Vector.hpp>
Namespaces | |
playrho | |
playrho::d2 | |
Typedefs | |
using | playrho::Force2 = Vector2< Force > |
2-element vector of Force quantities. More... | |
using | playrho::InvMass2 = Vector2< InvMass > |
2-element vector of inverse mass (InvMass ) quantities. | |
using | playrho::Length2 = Vector2< Length > |
2-element vector of Length quantities. More... | |
using | playrho::LinearAcceleration2 = Vector2< LinearAcceleration > |
2-element vector of linear acceleration (LinearAcceleration ) quantities. More... | |
using | playrho::LinearVelocity2 = Vector2< LinearVelocity > |
2-element vector of linear velocity (LinearVelocity ) quantities. More... | |
using | playrho::Mass2 = Vector2< Mass > |
2-element vector of Mass quantities. | |
using | playrho::Momentum2 = Vector2< Momentum > |
2-element vector of Momentum quantities. More... | |
using | playrho::Vec2 = Vector2< Real > |
Vector with 2 Real elements. More... | |
template<typename T > | |
using | playrho::Vector2 = Vector< T, 2 > |
Vector with 2-elements. More... | |
Functions | |
template<class T > | |
constexpr auto | playrho::GetFwdPerpendicular (const Vector2< T > &vector) noexcept -> Vector2< T > |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector. More... | |
template<class T > | |
constexpr auto | playrho::GetRevPerpendicular (const Vector2< T > &vector) noexcept -> Vector2< T > |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector. More... | |
constexpr auto | playrho::GetVec2 (const Vector2< Real > &value) -> Vec2 |
Gets the given value as a 2-element vector of reals (Vec2 ). | |
template<class T > | |
constexpr auto | playrho::GetVec2 (const Vector2< T > &value) -> decltype(Vec2{static_cast< Real >(get< 0 >(value).value()), static_cast< Real >(get< 1 >(value).value())}) |
Gets value as 2-element vector of reals for any type having value() member function. | |
template<typename TYPE > | |
constexpr auto | playrho::IsValid (const Vector2< TYPE > &value) noexcept -> bool |
Determines whether the given vector contains finite coordinates. | |
Variables | |
constexpr auto | playrho::d2::EarthlyGravity = LinearAcceleration2{0_mps2, EarthlyLinearAcceleration} |
Earthly gravity in 2-dimensions. More... | |
constexpr auto | playrho::InvalidLength2 = Length2{Invalid<Length>, Invalid<Length>} |
Invalid Length2 constant. | |
Definition of the Vector2
alias template and closely related code.