![]() |
Kale
|
#include <Vector.hpp>
Public Member Functions | |
Vector2 () | |
Vector2 (T x, T y) | |
Vector2 (T v[2]) | |
void | operator= (T n) |
void | operator= (T v[2]) |
void | operator+= (Vector2< T > o) |
void | operator-= (Vector2< T > o) |
void | operator*= (Vector2< T > o) |
void | operator/= (Vector2< T > o) |
void | operator+= (T v) |
void | operator-= (T v) |
void | operator*= (T v) |
void | operator/= (T v) |
Vector2< T > | operator- () const |
Vector2< T > | operator+ (Vector2< T > o) const |
Vector2< T > | operator- (Vector2< T > o) const |
Vector2< T > | operator* (Vector2< T > o) const |
Vector2< T > | operator/ (Vector2< T > o) const |
Vector2< T > | operator+ (T v) const |
Vector2< T > | operator- (T v) const |
Vector2< T > | operator* (T v) const |
Vector2< T > | operator/ (T v) const |
bool | operator> (Vector2< T > o) const |
bool | operator< (Vector2< T > o) const |
bool | operator<= (Vector2< T > o) const |
bool | operator>= (Vector2< T > o) const |
template<typename A = T> | |
std::enable_if< std::is_integral< A >::value, bool >::type | operator== (Vector2< T > o) const |
template<typename A = T> | |
std::enable_if< std::is_floating_point< A >::value, bool >::type | operator== (Vector2< T > o) const |
bool | operator!= (Vector2< T > o) const |
T | dot (Vector2< T > o) const |
T | cross (Vector2< T > o) const |
template<typename A = T> | |
std::enable_if< std::is_floating_point< A >::value, T >::type | magnitude () const |
Vector2< T > | clamp (T minX, T maxX, T minY, T maxY) const |
Vector2< T > | clamp (Vector2< T > min, Vector2< T > max) const |
void | clampTo (T minX, T maxX, T minY, T maxY) |
void | clampTo (Vector2< T > min, Vector2< T > max) |
template<typename A > | |
Vector2< A > | cast () const |
template<typename A = T> | |
std::enable_if< std::is_floating_point< A >::value, Vector2< T > >::type | unit () const |
template<typename A = T> | |
std::enable_if< std::is_floating_point< A >::value, float >::type | dist (Vector2< T > o) const |
Vector2< T > | perpendicular (Vector2< T > o) const |
Vector2< T > | project (Vector2< T > o) |
float | signedAngle (Vector2< T > to) const |
Vector2< T > | rotateClockwise () const |
Vector2< T > | rotateCounterClockwise () const |
Vector2< T > | normalized () const |
Vector2< T > | xy () const |
Vector2< T > | yx () const |
Static Public Member Functions | |
static Vector2< T > | one () |
static Vector2< T > | zero () |
static Vector2< T > | right () |
static Vector2< T > | up () |
static Vector2< T > | max () |
static Vector2< T > | min () |
static Vector2< T > | random (T min, T max) |
static Vector2< T > | random (T minX, T maxX, T minY, T maxY) |
Public Attributes | |
T | x |
T | y |
Friends | |
Vector2< T > | operator+ (float n, Vector2< T > v) |
Vector2< T > | operator- (float n, Vector2< T > v) |
Vector2< T > | operator* (float n, Vector2< T > v) |
Vector2< T > | operator/ (float n, Vector2< T > v) |
Represents a vector in a 2 dimensional space
Definition at line 41 of file Vector.hpp.
|
inline |
Definition at line 45 of file Vector.hpp.
|
inline |
Definition at line 46 of file Vector.hpp.
|
inline |
Definition at line 47 of file Vector.hpp.
Definition at line 144 of file Vector.hpp.
|
inline |
Definition at line 127 of file Vector.hpp.
|
inline |
Definition at line 130 of file Vector.hpp.
Definition at line 134 of file Vector.hpp.
|
inline |
Definition at line 138 of file Vector.hpp.
Definition at line 122 of file Vector.hpp.
|
inline |
Definition at line 151 of file Vector.hpp.
Definition at line 121 of file Vector.hpp.
|
inline |
Definition at line 123 of file Vector.hpp.
|
inlinestatic |
Definition at line 175 of file Vector.hpp.
|
inlinestatic |
Definition at line 176 of file Vector.hpp.
|
inline |
Definition at line 166 of file Vector.hpp.
|
inlinestatic |
Definition at line 171 of file Vector.hpp.
|
inline |
Definition at line 119 of file Vector.hpp.
Definition at line 101 of file Vector.hpp.
Definition at line 96 of file Vector.hpp.
|
inline |
Definition at line 83 of file Vector.hpp.
|
inline |
Definition at line 66 of file Vector.hpp.
Definition at line 99 of file Vector.hpp.
Definition at line 94 of file Vector.hpp.
|
inline |
Definition at line 75 of file Vector.hpp.
|
inline |
Definition at line 58 of file Vector.hpp.
|
inline |
Definition at line 92 of file Vector.hpp.
Definition at line 100 of file Vector.hpp.
Definition at line 95 of file Vector.hpp.
|
inline |
Definition at line 79 of file Vector.hpp.
|
inline |
Definition at line 62 of file Vector.hpp.
Definition at line 102 of file Vector.hpp.
Definition at line 97 of file Vector.hpp.
|
inline |
Definition at line 87 of file Vector.hpp.
|
inline |
Definition at line 70 of file Vector.hpp.
|
inline |
Definition at line 110 of file Vector.hpp.
|
inline |
Definition at line 111 of file Vector.hpp.
|
inline |
Definition at line 49 of file Vector.hpp.
|
inline |
Definition at line 53 of file Vector.hpp.
|
inline |
Definition at line 113 of file Vector.hpp.
|
inline |
Definition at line 116 of file Vector.hpp.
|
inline |
Definition at line 109 of file Vector.hpp.
|
inline |
Definition at line 112 of file Vector.hpp.
Definition at line 155 of file Vector.hpp.
Definition at line 158 of file Vector.hpp.
Definition at line 178 of file Vector.hpp.
|
inlinestatic |
Definition at line 179 of file Vector.hpp.
|
inlinestatic |
Definition at line 173 of file Vector.hpp.
|
inline |
Definition at line 164 of file Vector.hpp.
|
inline |
Definition at line 165 of file Vector.hpp.
|
inline |
Definition at line 163 of file Vector.hpp.
|
inline |
Definition at line 148 of file Vector.hpp.
|
inlinestatic |
Definition at line 174 of file Vector.hpp.
|
inline |
Definition at line 168 of file Vector.hpp.
|
inline |
Definition at line 169 of file Vector.hpp.
|
inlinestatic |
Definition at line 172 of file Vector.hpp.
Definition at line 106 of file Vector.hpp.
Definition at line 104 of file Vector.hpp.
Definition at line 105 of file Vector.hpp.
Definition at line 107 of file Vector.hpp.
T Kale::Vector2< T >::x |
Definition at line 43 of file Vector.hpp.
T Kale::Vector2< T >::y |
Definition at line 43 of file Vector.hpp.