imunano33
0.1.1
|
A minimal 3D vector representation. More...
#include <sv_embed.hpp>
Public Member Functions | |
EmbVec3D () | |
No-argument constructor. More... | |
EmbVec3D (const float xOther, const float yOther, const float zOther) | |
Initializes a vector given xyz components. More... | |
EmbVec3D (const EmbVec3D &other)=default | |
Copy constructor. | |
EmbVec3D (EmbVec3D &&) noexcept=default | |
Move constructor. More... | |
EmbVec3D & | operator= (const EmbVec3D &other) |
Assignment operator. | |
EmbVec3D & | operator= (EmbVec3D &&) noexcept=default |
Move assignment operator. More... | |
virtual | ~EmbVec3D ()=default |
Destructor. More... | |
EmbVec3D & | operator+= (const EmbVec3D &other) |
In-place addtion. More... | |
EmbVec3D & | operator-= (const EmbVec3D &other) |
In-place subtraction. More... | |
EmbVec3D & | operator*= (const float &other) |
In-place scalar multiplication. More... | |
EmbVec3D & | operator/= (const float &other) |
In-place scalar division. More... | |
Public Attributes | |
float | x |
The x-component of the 3D vector. | |
float | y |
The y-component of the 3D vector. | |
float | z |
The z-component of the 3D vector. | |
A minimal 3D vector representation.
|
inline |
No-argument constructor.
Initializes a zero vector.
|
inline |
Initializes a vector given xyz components.
xOther | The x-component. |
yOther | The y-component. |
zOther | The z-component. |
|
defaultnoexcept |
Move constructor.
Uses C++ default move constructor.
|
virtualdefault |
Destructor.
Uses C++ default destructor.
|
inline |
In-place scalar multiplication.
Performs scalar multiplication on the current object.
other | The number to multiply by. |
In-place addtion.
Adds another vector object to current vector.
other | The other object to add. |
In-place subtraction.
Subtracts another vector object from current vector.
other | The other object to subtract. |
|
inline |
In-place scalar division.
Performs scalar division on the current object.
other | The number to divide by. |
Move assignment operator.
Uses C++ default move assignment operator.