In file matrix.h:class for representing cartesian 3-space positions and directions
Public Fields
-
double v[3]
- x, y, and z components
Public Methods
-
triple(void)
- constructor
-
triple(int zero)
- constructor for zero triples (eg.
-
triple(double zero)
- constructor for zero triples (eg.
-
triple(double x, double y, double z)
- constructor
-
triple(const vector &v)
- constructor.
-
triple(const quaternion &q)
- constructor.
-
void normalize(void)
- normalizes the triple
-
void negate(void)
- negates the triple
-
void print(FILE* fp) const
- prints to a file
-
member overloaded operators
Documentation
class for representing cartesian 3-space positions and directions
- double v[3]
- x, y, and z components
- triple(void)
- constructor
- triple(int zero)
- constructor for zero triples (eg. [0, 0, 0]). The argument must be 0.
- triple(double zero)
- constructor for zero triples (eg. [0, 0, 0]). The argument must be 0.
- triple(double x, double y, double z)
- constructor
- triple(const vector &v)
- constructor. v must have 3 elements.
- triple(const quaternion &q)
- constructor. q.r is ignored
- void normalize(void)
- normalizes the triple
- void negate(void)
- negates the triple
- void print(FILE* fp) const
- prints to a file
- member overloaded operators
- inline double& operator()(int i)
- returns the i'th element
- inline const double& operator()(int i) const
- returns the i'th element
- triple& operator=(const triple &v)
- assignment operator
- triple& operator=(double d)
- assignment operator. d must be 0.
- triple& operator+=(const triple &v)
- addition operator
- triple& operator-=(const triple &v)
- subtraction operator
- triple& operator*=(double d)
- scalar multiplication
- triple& operator/=(double d)
- scalar division
- This class has no child classes.
- Friends:
- double abs(const triple &v)
double sqr(const triple &v)
triple normalize(const triple &v)
double crossz(const triple &t1, const triple &t2)
triple operator-(const triple &v)
triple operator+(const triple &v1, const triple &v2)
triple operator-(const triple &v1, const triple &v2)
triple operator^(const triple &v1, const triple &v2)
double operator*(const triple &v1, const triple &v2)
triple operator*(const triple &v, double d)
triple operator*(double d, const triple &v)
triple operator/(const triple &v, double d)
triple operator *(const matrix &m, const triple &t)
triple operator *(const triple &t, const matrix &m)
triple operator *(const tmatrix &m, const triple &t)
triple &vadd(triple &r, const triple &v1, const triple &v2)
triple &vsub(triple &r, const triple &v1, const triple &v2)
triple &vcross(triple &r, const triple &v1, const triple &v2)
int outerProduct(matrix &result, const triple &v1, const triple &v2)
triple &vmult(triple &r, const triple &v1, const triple &v2)
triple &vdiv(triple &r, const triple &v1, const triple &v2)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.