Inheritance diagram for code::CPoint:
This class may become a template class in the future, but right now I just need to get something working with pure doubles. A geometric point is distinguished from, but related to, the a geometric vector. A geometric point's coordinates transform differently from those of a geometric vector when a change of coordinate system occurs.
Public Member Functions | |
CPoint (double a=0, double b=0, double c=0) | |
Initialize from argument list; the default is a point at the origin. | |
CPoint (const double v[]) | |
Initialize from C-style vector. | |
CVector | operator- (const CPoint &p) const |
Subtraction operator for CPoints returns a CVector. | |
CPoint | operator+ (const CVector &v) const |
Adding a CVector to a CPoint results in another CPoint. | |
CPoint | operator- (const CVector &v) const |
Subtracting a CVector from a CPoint results in another CPoint. | |
CPoint & | operator+= (const CVector &v) |
Additive assignment of a CVector to a CPoint. | |
CPoint & | operator-= (const CVector &v) |
Subtractive assignment of a CVector from a Cpoint. | |
Location | getLocation () const |
Return a Location. | |
void | assign (double ix, double iy, double iz) |
operator const double * () const | |
Convert CTriplet to C-style vector of doubles. | |
Public Attributes | |
double | x |
X-coordinate. | |
double | y |
Y-coordinate. | |
double | z |
Z-coordinate. |
code::CPoint::CPoint | ( | double | a = 0 , |
|
double | b = 0 , |
|||
double | c = 0 | |||
) | [inline] |
Initialize from argument list; the default is a point at the origin.
code::CPoint::CPoint | ( | const double | v[] | ) | [inline] |
Initialize from C-style vector.
void code::CTriplet::assign | ( | double | ix, | |
double | iy, | |||
double | iz | |||
) | [inline, inherited] |
code::CTriplet::operator const double * | ( | ) | const [inline, inherited] |
Convert CTriplet to C-style vector of doubles.
Subtraction operator for CPoints returns a CVector.
Subtractive assignment of a CVector from a Cpoint.
double code::CTriplet::x [inherited] |
X-coordinate.
double code::CTriplet::y [inherited] |
Y-coordinate.
double code::CTriplet::z [inherited] |
Z-coordinate.