CDPVec3

Functions

CDPVec3
CDPVec3
CDPVec3
CDPVec3 & operator=
const CDPVec3 operator+
const CDPVec3 operator-
double operator*
const CDPVec3 operator^
const double & x
const double & y
const double & z
double & x
double & y
double & z
void set

Detailed Description

class CDPVec3

A simple helper class for 3D vectors.

Public Functions

inline CDPVec3()

Default constructor.

inline CDPVec3(const CDPVec3 &other)

Copy constructor.

inline CDPVec3(double x, double y, double z)

Construction from x, y, z coordinates.

inline CDPVec3 &operator=(const CDPVec3 &rhs)

Assignment operator.

inline const CDPVec3 operator+(const CDPVec3 &rhs) const

Returns vector that is this vector added with rhs.

inline const CDPVec3 operator-(const CDPVec3 &rhs) const

Returns vector that is this vector subtracted with rhs.

inline double operator*(const CDPVec3 &rhs) const

Computes the dot product of this and rhs and return the result.

inline const CDPVec3 operator^(const CDPVec3 &rhs) const

Computes the cross product of this and rhs and return the result.

inline const double &x() const

X element of the vector.

inline const double &y() const

Y element of the vector.

inline const double &z() const

Z element of the vector.

inline double &x()

X element of the vector.

inline double &y()

Y element of the vector.

inline double &z()

Z element of the vector.

inline void set(double x, double y, double z)

Sets x, y and z value.