Template Class Vec3

Class Documentation

template<class T>
class Vec3

Public Functions

inline Vec3()
inline Vec3(T xVal, T yVal, T zVal)
inline Vec3(const Vec3 &other)
void operator()(T xVal, T yVal, T zVal)
void operator=(const Vec3 &other)
Vec3<T> operator-(const Vec3 &other)
Vec3<T> operator+(const Vec3 &other)
Vec3<T> operator*(const T val)
Vec3<T> operator/(const T val)
Vec3<T> operator*(const Vec3 &other)
Vec3<T> operator/(const Vec3 &other)
Vec3<T> cross(const Vec3 &other)
T dot(const Vec3 &other)
Vec3<T> norm()
T magnitude()
double distance(Vec3<T> other)
Vec3<T> midpoint(Vec3<T> other)
Vec3<T> direction(Vec3<T> other)
std::string toString()
void print()

Public Members

T x
T y
T z

Public Static Functions

static double distance(Vec3<T> p1, Vec3<T> p2)
static Vec3<T> midpoint(Vec3<T> p1, Vec3<T> p2)
static Vec3<T> direction(Vec3<T> p1, Vec3<T> p2)