|
SleakEngine 0.1.0
C++23 multi-backend game engine
|
#include <Vector.hpp>
Public Member Functions | |
| Vector3D () | |
| Vector3D (float x, float y, float z) | |
| void | Add (float x, float y, float z) |
| void | AddX (float val) |
| void | AddY (float val) |
| void | AddZ (float val) |
| Vector< float, 3 > | BaseVector () |
| Vector3D | Cross (const Vector3D &other) const |
| float | Dot (const Vector3D &other) const |
| float | GetX () const |
| float | GetY () const |
| float | GetZ () const |
| float | Magnitude () const |
| Vector3D & | Normalize () |
| Vector3D | Normalized () const |
| bool | operator!= (const Vector3D &other) const |
| Vector3D | operator* (const Vector3D &other) const |
| Vector3D | operator* (float scalar) const |
| Vector3D | operator+ (const Vector3D &other) const |
| Vector3D & | operator+= (const Vector3D &other) |
| Vector3D | operator- (const Vector3D &other) const |
| Vector3D & | operator-= (const Vector3D &other) |
| Vector3D | operator/ (float scalar) const |
| bool | operator== (const Vector3D &other) const |
| void | Set (float x, float y, float z) |
| void | SetX (float val) |
| void | SetY (float val) |
| void | SetZ (float val) |
| float * | ToArray () |
| std::string | ToString () const |
| std::string | ToString (uint8_t precision) const |
Static Public Member Functions | |
| static Vector3D | Backward () |
| static Vector3D | Down () |
| static Vector3D | Forward () |
| static Vector3D | Identity () |
| static Vector3D | Left () |
| static Vector3D | Right () |
| static Vector3D | Up () |
| static Vector3D | Zero () |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Vector3D &vec) |
Three-component float vector: the workhorse type for positions, directions, scales, normals, and velocities across the engine.
Wraps Vector<float, 3> with named accessors, full arithmetic, and the geometric operations you need day to day: Dot(), Cross(), Magnitude(), Normalize() (in place) and Normalized() (returns a copy). Note that operator* with another Vector3D is componentwise, not a dot or cross product.
Named constants cover the axis directions: Zero(), Identity(), Up(), Down(), Left(), Right(), Forward(), and Backward().
Definition at line 354 of file Vector.hpp.
|
inline |
Definition at line 357 of file Vector.hpp.
|
inline |
Definition at line 358 of file Vector.hpp.
|
inline |
Definition at line 376 of file Vector.hpp.
|
inline |
Definition at line 373 of file Vector.hpp.
|
inline |
Definition at line 374 of file Vector.hpp.
|
inline |
Definition at line 375 of file Vector.hpp.
|
inlinestatic |
Definition at line 503 of file Vector.hpp.
|
inline |
Definition at line 477 of file Vector.hpp.
Definition at line 422 of file Vector.hpp.
|
inline |
Definition at line 418 of file Vector.hpp.
|
inlinestatic |
Definition at line 499 of file Vector.hpp.
|
inlinestatic |
Definition at line 502 of file Vector.hpp.
|
inline |
Definition at line 361 of file Vector.hpp.
|
inline |
Definition at line 362 of file Vector.hpp.
|
inline |
Definition at line 363 of file Vector.hpp.
|
inlinestatic |
Definition at line 497 of file Vector.hpp.
|
inlinestatic |
Definition at line 501 of file Vector.hpp.
|
inline |
Definition at line 431 of file Vector.hpp.
|
inline |
Definition at line 436 of file Vector.hpp.
|
inline |
Definition at line 455 of file Vector.hpp.
|
inline |
Definition at line 468 of file Vector.hpp.
Definition at line 408 of file Vector.hpp.
|
inline |
Definition at line 404 of file Vector.hpp.
Definition at line 381 of file Vector.hpp.
Definition at line 389 of file Vector.hpp.
Definition at line 385 of file Vector.hpp.
Definition at line 396 of file Vector.hpp.
|
inline |
Definition at line 412 of file Vector.hpp.
|
inline |
Definition at line 462 of file Vector.hpp.
|
inlinestatic |
Definition at line 500 of file Vector.hpp.
|
inline |
Definition at line 369 of file Vector.hpp.
|
inline |
Definition at line 366 of file Vector.hpp.
|
inline |
Definition at line 367 of file Vector.hpp.
|
inline |
Definition at line 368 of file Vector.hpp.
|
inline |
Definition at line 492 of file Vector.hpp.
|
inline |
Definition at line 481 of file Vector.hpp.
|
inline |
Definition at line 485 of file Vector.hpp.
|
inlinestatic |
Definition at line 498 of file Vector.hpp.
|
inlinestatic |
Definition at line 496 of file Vector.hpp.
|
friend |
Definition at line 472 of file Vector.hpp.