In file matrix.h:

class triple

class for representing cartesian 3-space positions and directions

Public Fields

[more]double v[3]
x, y, and z components

Public Methods

[more] triple(void)
constructor
[more] triple(int zero)
constructor for zero triples (eg.
[more] triple(double zero)
constructor for zero triples (eg.
[more] triple(double x, double y, double z)
constructor
[more] triple(const vector &v)
constructor.
[more] triple(const quaternion &q)
constructor.
[more]void normalize(void)
normalizes the triple
[more]void negate(void)
negates the triple
[more]void print(FILE* fp) const
prints to a file
[more] member overloaded operators


Documentation

class for representing cartesian 3-space positions and directions
odouble v[3]
x, y, and z components

o triple(void)
constructor

o triple(int zero)
constructor for zero triples (eg. [0, 0, 0]). The argument must be 0.

o triple(double zero)
constructor for zero triples (eg. [0, 0, 0]). The argument must be 0.

o triple(double x, double y, double z)
constructor

o triple(const vector &v)
constructor. v must have 3 elements.

o triple(const quaternion &q)
constructor. q.r is ignored

ovoid normalize(void)
normalizes the triple

ovoid negate(void)
negates the triple

ovoid print(FILE* fp) const
prints to a file

o member overloaded operators

oinline double& operator()(int i)
returns the i'th element

oinline const double& operator()(int i) const
returns the i'th element

otriple& operator=(const triple &v)
assignment operator

otriple& operator=(double d)
assignment operator. d must be 0.

otriple& operator+=(const triple &v)
addition operator

otriple& operator-=(const triple &v)
subtraction operator

otriple& operator*=(double d)
scalar multiplication

otriple& 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++.