Kindfield
|
Simple 3D vector class with focus on performance and readability. More...
#include <vector3.h>
Public Member Functions | |
Vector3 () | |
Vector3 (double x, double y, double z) | |
Vector3 (arma::rowvec armaVector) | |
void | zeros () |
double | x () const |
double | y () const |
double | z () const |
uint | size () const |
double & | operator() (const int component) |
double & | operator[] (const int component) |
double | operator() (const int component) const |
double | operator[] (const int component) const |
Vector3 & | operator= (const Vector3 &vector2) |
Vector3 & | operator+= (const Vector3 &vector2) |
Vector3 & | operator-= (const Vector3 &vector2) |
Vector3 & | operator*= (double value) |
Vector3 & | operator/= (double value) |
Static Public Member Functions | |
static Vector3 | ones () |
static Vector3 | createZeros () |
static double | dot (const Vector3 &vector1, const Vector3 &vector2) |
Protected Attributes | |
double | mem_local [3] |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Vector3 &vector) |
Vector3 | operator+ (const Vector3 &vector1, const Vector3 &vector2) |
Vector3 | operator- (const Vector3 &vector1, const Vector3 &vector2) |
Vector3 | operator+ (const Vector3 &vector1) |
Vector3 | operator- (const Vector3 &vector1) |
Vector3 | operator* (const Vector3 &vector1, const Vector3 &vector2) |
Vector3::operator * returns the dot product of the two vectors. More... | |
bool | operator== (const Vector3 &vector1, const Vector3 &vector2) |
bool | operator!= (const Vector3 &vector1, const Vector3 &vector2) |
Vector3 | operator* (const Vector3 &vector1, double value) |
Vector3 | operator* (double value, const Vector3 &vector1) |
Vector3 | operator/ (const Vector3 &vector1, double value) |
Simple 3D vector class with focus on performance and readability.
|
inline |
|
inline |
|
inline |
|
static |
Definition at line 22 of file vector3.cpp.
|
static |
Definition at line 16 of file vector3.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
Definition at line 10 of file vector3.cpp.