code::CPoint Struct Reference

Inheritance diagram for code::CPoint:

code::CTriplet List of all members.

Detailed Description

Representation of a geometric point in a 3-D cartesian space.

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.

Author:
Thomas E. Vaughan
Version:
Id
code_PointVector.h,v 1.19 2009/06/02 20:17:38 lakshman Exp


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.
CPointoperator+= (const CVector &v)
 Additive assignment of a CVector to a CPoint.
CPointoperator-= (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.


Constructor & Destructor Documentation

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.


Member Function Documentation

void code::CTriplet::assign ( double  ix,
double  iy,
double  iz 
) [inline, inherited]

Location code::CPoint::getLocation (  )  const

Return a Location.

code::CTriplet::operator const double * (  )  const [inline, inherited]

Convert CTriplet to C-style vector of doubles.

CPoint code::CPoint::operator+ ( const CVector v  )  const

Adding a CVector to a CPoint results in another CPoint.

CPoint& code::CPoint::operator+= ( const CVector v  ) 

Additive assignment of a CVector to a CPoint.

CPoint code::CPoint::operator- ( const CVector v  )  const

Subtracting a CVector from a CPoint results in another CPoint.

CVector code::CPoint::operator- ( const CPoint p  )  const

Subtraction operator for CPoints returns a CVector.

CPoint& code::CPoint::operator-= ( const CVector v  ) 

Subtractive assignment of a CVector from a Cpoint.


Member Data Documentation

double code::CTriplet::x [inherited]

X-coordinate.

double code::CTriplet::y [inherited]

Y-coordinate.

double code::CTriplet::z [inherited]

Z-coordinate.


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7