|
| Point (void) |
| Default constructor - initializes point at the origin (0,0,0)
|
|
| Point (float x, float y) |
| Constructor from 2D coordinates.
|
|
| Point (float x, float y, float z) |
| Constructor from coordinates.
|
|
float | x (void) const |
| Access the x-coordinate of the point.
|
|
float | y (void) const |
| Access the y-coordinate of the point.
|
|
float | z (void) const |
| Access the z-coordinate of the point.
|
|
float | getX (void) const |
| Get the x-coordinate of the point (alias for x())
|
|
float | getY (void) const |
| Get the y-coordinate of the point (alias for y())
|
|
float | getZ (void) const |
| Get the z-coordinate of the point (alias for z())
|
|
| Vector () |
| Default constructor - initializes all components to zero.
|
|
| Vector (std::initializer_list< float > values) |
| Constructor from initializer list.
|
|
float & | operator[] (size_t index) |
| Non-const element access operator.
|
|
const float & | operator[] (size_t index) const |
| Const element access operator.
|
|
Vector | operator+ (const Vector &other) const |
| Vector addition operator.
|
|
Vector | operator- (const Vector &other) const |
| Vector subtraction operator.
|
|
Vector | operator* (float scalar) const |
| Scalar multiplication operator.
|
|
float | dot (const Vector &other) const |
| Compute dot product with another vector.
|
|
float | magnitude () const |
| Calculate the magnitude (length) of the vector.
|
|
Vector | normalize () const |
| Create a normalized (unit) vector.
|
|
constexpr size_t | size () const |
| Get the number of dimensions/components.
|
|
Represents a point in 3D space.
The Point class is a simple wrapper around a 3D vector to represent a point in space. It provides constructors for initialization and access to the underlying vector components.