|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
#include <Vector.hpp>
Public Member Functions | |
| Vector2D () | |
| Vector2D (float x, float y) | |
| void | Add (float x, float y) |
| void | AddX (float val) |
| void | AddY (float val) |
| float | Cross (const Vector2D &other) const |
| float | Dot (const Vector2D &other) const |
| float | GetX () const |
| float | GetY () const |
| float | Magnitude () const |
| void | Normalize () |
| Vector2D | Normalized () const |
| bool | operator!= (const Vector2D &other) const |
| Vector2D | operator* (float scalar) const |
| Vector2D | operator+ (const Vector2D &other) const |
| Vector2D & | operator+= (const Vector2D &other) |
| Vector2D | operator- (const Vector2D &other) const |
| Vector2D & | operator-= (const Vector2D &other) |
| Vector2D | operator/ (float scalar) const |
| bool | operator== (const Vector2D &other) const |
| void | Set (float x, float y) |
| void | SetX (float val) |
| void | SetY (float val) |
| float * | ToArray () |
| std::string | ToString () const |
| std::string | ToString (uint8_t precision) const |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Vector2D &vec) |
Two-component float vector, used for UVs, screen positions, and min/max ranges such as a camera controller's pitch limits.
Wraps Vector<float, 2> with named accessors and the usual operators. Components are read with GetX()/GetY(), written with SetX()/SetY() or Set(), and accumulated with AddX()/AddY().
Definition at line 209 of file Vector.hpp.
|
inline |
Definition at line 212 of file Vector.hpp.
|
inline |
Definition at line 213 of file Vector.hpp.
|
inline |
Definition at line 226 of file Vector.hpp.
|
inline |
Definition at line 224 of file Vector.hpp.
|
inline |
Definition at line 225 of file Vector.hpp.
|
inline |
Definition at line 264 of file Vector.hpp.
|
inline |
Definition at line 260 of file Vector.hpp.
|
inline |
Definition at line 216 of file Vector.hpp.
|
inline |
Definition at line 217 of file Vector.hpp.
|
inline |
Definition at line 269 of file Vector.hpp.
|
inline |
Definition at line 273 of file Vector.hpp.
|
inline |
Definition at line 280 of file Vector.hpp.
|
inline |
Definition at line 292 of file Vector.hpp.
|
inline |
Definition at line 250 of file Vector.hpp.
Definition at line 229 of file Vector.hpp.
Definition at line 237 of file Vector.hpp.
Definition at line 233 of file Vector.hpp.
Definition at line 243 of file Vector.hpp.
|
inline |
Definition at line 254 of file Vector.hpp.
|
inline |
Definition at line 287 of file Vector.hpp.
|
inline |
Definition at line 222 of file Vector.hpp.
|
inline |
Definition at line 220 of file Vector.hpp.
|
inline |
Definition at line 221 of file Vector.hpp.
|
inline |
Definition at line 312 of file Vector.hpp.
|
inline |
Definition at line 301 of file Vector.hpp.
|
inline |
Definition at line 305 of file Vector.hpp.
|
friend |
Definition at line 296 of file Vector.hpp.