|
Mana
|
#include <vector.h>
Public Member Functions | |
| Vector ()=default | |
| Vector (float x, float y, float z=0.0f) | |
| bool | isNull () const |
| Returns true if all coordinates are set to 0, otherwise returns false. | |
| Vector | operator* (float c) const |
| Scale vector operator. | |
| Vector & | operator*= (float c) |
| In-place scale vector operator. | |
| Vector | operator/ (float c) const |
| Scale vector operator. | |
| Vector & | operator/= (float c) |
| In-place scale vector operator. | |
| Vector | operator+ (const Vector &v) const |
| Add vector operator. | |
| Vector & | operator+= (const Vector &v) |
| In-place add vector operator. | |
| Vector | operator- (const Vector &v) const |
| Subtract vector operator. | |
| Vector & | operator-= (const Vector &v) |
| In-place subtract vector operator. | |
| float | length () const |
| Returns the length of this vector. | |
| float | squaredLength () const |
| Returns the squared length of this vector. | |
| float | manhattanLength () const |
| Returns the manhattan length of this vector. | |
| Vector | normalized () const |
| Returns a normalized version of this vector. | |
Public Attributes | |
| float | x = 0.0f |
| float | y = 0.0f |
| float | z = 0.0f |
Vector class.
Represents either a 3D point in space, a velocity or a force. Provides several convenient operator overloads.
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |