4 #define _USE_MATH_DEFINES 11 #define drand48() ((double)rand()/RAND_MAX) 40 inline double x()
const {
return m_dE[0]; }
41 inline double y()
const {
return m_dE[1]; }
42 inline double z()
const {
return m_dE[2]; }
43 inline double r()
const {
return m_dE[0]; }
44 inline double g()
const {
return m_dE[1]; }
45 inline double b()
const {
return m_dE[2]; }
74 inline std::istream &operator>>(std::istream &is,
Vector3D &t) {
79 inline std::ostream &operator<<(std::ostream &os,
const Vector3D &t) {
Vector3D & operator/=(const Vector3D &v2)
Divide Assign Vector3D Operator.
Definition: vector.h:151
double y() const
Returns second (Y) location parameter in Vector3D.
Definition: vector.h:41
double operator[](int i) const
Constant Vector3D Array Operator.
Definition: vector.h:49
void MakeUnitVector()
Convert Vector3D into unit vector.
Definition: vector.h:84
Vector3D & operator+=(const Vector3D &v2)
Add Assign Vector3D Operator.
Definition: vector.h:137
double Dot(const Vector3D &v2)
Return dot product (double) of two Vector3D.
Definition: vector.h:60
Vector3D & operator-=(const Vector3D &v2)
Subtract Assign Assign Operator.
Definition: vector.h:158
double & operator[](int i)
Vector3D Array Operator.
Definition: vector.h:50
double z() const
Returns third (Z) location parameter in Vector3D.
Definition: vector.h:42
const Vector3D & operator+() const
Add Vector3D Operator.
Definition: vector.h:47
Vector3D & operator *=(const Vector3D &v2)
Multiply Assign Vector3D Operator.
Definition: vector.h:144
Vector3D Cross(const Vector3D &v2)
Definition: vector.h:63
double x() const
Returns first (X) location parameter in Vector3D.
Definition: vector.h:40
Vector3D(double e0)
Definition: vector.h:31
Vector3D operator-() const
Subtract Vector3D Operator.
Definition: vector.h:48
double b() const
Returns third (B) color parameter in Vector3D.
Definition: vector.h:45
Vector3D()
Definition: vector.h:24
double r() const
Returns first (R) color parameter in Vector3D.
Definition: vector.h:43
double g() const
Returns second (G) color parameter in Vector3D.
Definition: vector.h:44
Vector3D(double e0, double e1, double e2)
Definition: vector.h:38
double m_dE[3]
Value array (double) for color or location parameters.
Definition: vector.h:71
double SquaredLength() const
Return squared length (double) of Vector3D.
Definition: vector.h:59
double Length() const
Return length (double) of Vector3D.
Definition: vector.h:58