UnitVec.hpp File Reference
#include <PlayRho/Common/Settings.hpp>
#include <PlayRho/Common/Units.hpp>
#include <PlayRho/Common/InvalidArgument.hpp>
#include <cstdlib>
#include <iostream>
#include <utility>
#include <type_traits>
Go to the source code of this file.
Classes | |
class | playrho::d2::UnitVec |
2-D unit vector. More... | |
class | std::tuple_size< playrho::d2::UnitVec > |
Tuple size info for playrho::d2::UnitVec . More... | |
class | std::tuple_element< I, playrho::d2::UnitVec > |
Tuple element type info for playrho::d2::UnitVec . More... | |
Namespaces | |
playrho | |
playrho::d2 | |
Functions | |
PLAYRHO_CONSTEXPR UnitVec | playrho::d2::GetXAxis (UnitVec rot) noexcept |
Gets the "X-axis". More... | |
PLAYRHO_CONSTEXPR UnitVec | playrho::d2::GetYAxis (UnitVec rot) noexcept |
Gets the "Y-axis". More... | |
PLAYRHO_CONSTEXPR bool | playrho::d2::operator== (const UnitVec a, const UnitVec b) noexcept |
Equality operator. More... | |
PLAYRHO_CONSTEXPR bool | playrho::d2::operator!= (const UnitVec a, const UnitVec b) noexcept |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR UnitVec | playrho::d2::GetRevPerpendicular (const UnitVec vector) noexcept |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector. More... | |
PLAYRHO_CONSTEXPR UnitVec | playrho::d2::GetFwdPerpendicular (const UnitVec vector) noexcept |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector. More... | |
PLAYRHO_CONSTEXPR UnitVec | playrho::d2::Rotate (const UnitVec vector, const UnitVec &angle) noexcept |
Rotates a unit vector by the angle expressed by the second unit vector. More... | |
PLAYRHO_CONSTEXPR UnitVec | playrho::d2::InverseRotate (const UnitVec vector, const UnitVec &angle) noexcept |
Inverse rotates a vector. More... | |
template<std::size_t I> | |
PLAYRHO_CONSTEXPR UnitVec::value_type | playrho::d2::get (UnitVec v) noexcept |
Gets the specified element of the given collection. More... | |
template<> | |
PLAYRHO_CONSTEXPR UnitVec::value_type | playrho::d2::get< 0 > (UnitVec v) noexcept |
Gets element 0 of the given collection. More... | |
template<> | |
PLAYRHO_CONSTEXPR UnitVec::value_type | playrho::d2::get< 1 > (UnitVec v) noexcept |
Gets element 1 of the given collection. More... | |
inline ::std::ostream & | playrho::d2::operator<< (::std::ostream &os, const UnitVec &value) |
Output stream operator. More... | |
template<> | |
PLAYRHO_CONSTEXPR d2::AABB | playrho::GetInvalid () noexcept |
Gets an invalid AABB value. More... | |
template<> | |
PLAYRHO_CONSTEXPR bool | playrho::IsValid (const d2::UnitVec &value) noexcept |
Determines if the given value is valid. More... | |
Detailed Description
Declarations of the UnitVec class and free functions associated with it.
Definition in file UnitVec.hpp.