|
SleakEngine 1.0.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 353 of file Vector.hpp.
|
inline |
Definition at line 356 of file Vector.hpp.
|
inline |
Definition at line 357 of file Vector.hpp.
|
inline |
Definition at line 375 of file Vector.hpp.
|
inline |
Definition at line 372 of file Vector.hpp.
|
inline |
Definition at line 373 of file Vector.hpp.
|
inline |
Definition at line 374 of file Vector.hpp.
|
inlinestatic |
Definition at line 502 of file Vector.hpp.
|
inline |
Definition at line 476 of file Vector.hpp.
Definition at line 421 of file Vector.hpp.
|
inline |
Definition at line 417 of file Vector.hpp.
|
inlinestatic |
Definition at line 498 of file Vector.hpp.
|
inlinestatic |
Definition at line 501 of file Vector.hpp.
|
inline |
Definition at line 360 of file Vector.hpp.
|
inline |
Definition at line 361 of file Vector.hpp.
|
inline |
Definition at line 362 of file Vector.hpp.
|
inlinestatic |
Definition at line 496 of file Vector.hpp.
|
inlinestatic |
Definition at line 500 of file Vector.hpp.
|
inline |
Definition at line 430 of file Vector.hpp.
|
inline |
Definition at line 435 of file Vector.hpp.
|
inline |
Definition at line 454 of file Vector.hpp.
|
inline |
Definition at line 467 of file Vector.hpp.
Definition at line 407 of file Vector.hpp.
|
inline |
Definition at line 403 of file Vector.hpp.
Definition at line 380 of file Vector.hpp.
Definition at line 388 of file Vector.hpp.
Definition at line 384 of file Vector.hpp.
Definition at line 395 of file Vector.hpp.
|
inline |
Definition at line 411 of file Vector.hpp.
|
inline |
Definition at line 461 of file Vector.hpp.
|
inlinestatic |
Definition at line 499 of file Vector.hpp.
|
inline |
Definition at line 368 of file Vector.hpp.
|
inline |
Definition at line 365 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 491 of file Vector.hpp.
|
inline |
Definition at line 480 of file Vector.hpp.
|
inline |
Definition at line 484 of file Vector.hpp.
|
inlinestatic |
Definition at line 497 of file Vector.hpp.
|
inlinestatic |
Definition at line 495 of file Vector.hpp.
|
friend |
Definition at line 471 of file Vector.hpp.