This class represents a three component vector. More...
#include <Vec3.h>
Public Member Functions | |
Vec3 () | |
Create a Vec3 whose elements are all 0. | |
Vec3 (double x, double y, double z) | |
Create a Vec3 with specified x, y, and z components. | |
double | operator[] (int index) const |
double & | operator[] (int index) |
Vec3 | operator+ () const |
Vec3 | operator+ (const Vec3 &rhs) const |
Vec3 | operator- () const |
Vec3 | operator- (const Vec3 &rhs) const |
double | dot (const Vec3 &rhs) const |
This class represents a three component vector.
It is used for storing positions, velocities, and forces.
Vec3 | ( | ) | [inline] |
Create a Vec3 whose elements are all 0.
Referenced by Vec3::operator+(), and Vec3::operator-().
double dot | ( | const Vec3 & | rhs | ) | const [inline] |
References Vec3::Vec3().
Vec3 operator+ | ( | ) | const [inline] |
References Vec3::Vec3().
References Vec3::Vec3().
Vec3 operator- | ( | ) | const [inline] |
References Vec3::Vec3().
double& operator[] | ( | int | index | ) | [inline] |
double operator[] | ( | int | index | ) | const [inline] |