|
SleakEngine 0.1.0
C++23 multi-backend game engine
|
#include <Vector.hpp>
Public Member Functions | |
| constexpr | Vector2D () |
| constexpr | 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 |
| constexpr float | GetX () const |
| constexpr 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 210 of file Vector.hpp.
|
inlineconstexpr |
Definition at line 213 of file Vector.hpp.
|
inlineconstexpr |
Definition at line 214 of file Vector.hpp.
|
inline |
Definition at line 227 of file Vector.hpp.
|
inline |
Definition at line 225 of file Vector.hpp.
|
inline |
Definition at line 226 of file Vector.hpp.
|
inline |
Definition at line 265 of file Vector.hpp.
|
inline |
Definition at line 261 of file Vector.hpp.
|
inlineconstexpr |
Definition at line 217 of file Vector.hpp.
|
inlineconstexpr |
Definition at line 218 of file Vector.hpp.
|
inline |
Definition at line 270 of file Vector.hpp.
|
inline |
Definition at line 274 of file Vector.hpp.
|
inline |
Definition at line 281 of file Vector.hpp.
|
inline |
Definition at line 293 of file Vector.hpp.
|
inline |
Definition at line 251 of file Vector.hpp.
Definition at line 230 of file Vector.hpp.
Definition at line 238 of file Vector.hpp.
Definition at line 234 of file Vector.hpp.
Definition at line 244 of file Vector.hpp.
|
inline |
Definition at line 255 of file Vector.hpp.
|
inline |
Definition at line 288 of file Vector.hpp.
|
inline |
Definition at line 223 of file Vector.hpp.
|
inline |
Definition at line 221 of file Vector.hpp.
|
inline |
Definition at line 222 of file Vector.hpp.
|
inline |
Definition at line 313 of file Vector.hpp.
|
inline |
Definition at line 302 of file Vector.hpp.
|
inline |
Definition at line 306 of file Vector.hpp.
|
friend |
Definition at line 297 of file Vector.hpp.