Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

C2DPoint Class Reference

Class which represents a cartesian point. More...

#include <2DPoint.h>

Inheritance diagram for C2DPoint:

C2DBase List of all members.

Public Member Functions

 C2DPoint (void)
 Constructor.
 ~C2DPoint (void)
 Destructor.
 C2DPoint (double dx, double dy)
 Constructor assigns the data.
void Set (double dx, double dy)
 Assignment.
 C2DPoint (const C2DVector &Vector)
 Constuct from vector which can be thought of as a point (and vice versa).
C2DPoint GetMidPoint (const C2DPoint &Other) const
 Returns the mid point between this and the other.
double Project (const C2DVector &Vector) const
 Project this on the vector given returning a distance along the vector.
double Project (const C2DLine &Line) const
 Project this on the line given returning a distance along the line.
void Project (const C2DVector &Vector, CInterval &Interval) const
 Project this on the vector given returning a distance along the line.
void Project (const C2DLine &Line, CInterval &Interval) const
 Project this on the line given returning a distance along the line.
bool ProjectsOnLine (const C2DLine &Line, C2DPoint *ptOnLine=0, bool *bAbove=0) const
 True if the point projects onto the line given and returns the point on the line.
double Distance (const C2DPoint &Other) const
 Returns the distance between this and the other.
C2DVector MakeVector (const C2DPoint &PointTo) const
 Returns a vector from this to the other.
const C2DPoint operator+ (const C2DPoint &Other) const
 Adds this to the other.
void operator+= (const C2DPoint &Other)
 Addition to this.
const C2DPoint operator+ (const C2DVector &Other) const
 Movement.
void operator+= (const C2DVector &Other)
 Movement.
const C2DVector operator- (const C2DPoint &Other) const
 Subtracts this from the other.
void operator-= (const C2DPoint &Other)
 Subtraction.
const C2DPoint operator * (double dFactor) const
 Multiplies this by the factor and returns the result.
void operator *= (double dFactor)
 Mulitiplication.
void operator *= (const C2DPoint &Other)
 Mulitiplication.
const C2DPoint operator * (const C2DPoint &Other) const
 Multiplies this by the point and returns the result.
const C2DPoint operator/ (double dFactor) const
 Divides this by the factor and returns the result.
void operator/= (double dFactor)
 Divides this by the factor.
const C2DPointoperator= (const C2DPoint &Other)
 Assignment to another.
const C2DPointoperator= (const C2DVector &Vector)
 Assignement to a vector.
bool operator== (const C2DPoint &Other) const
 Equality test which uses a tolerance level.
bool operator!= (const C2DPoint &Other) const
 Inequality test, inverse of equality test.
void Move (const C2DVector &vector)
 Moves this by the vector given.
void RotateToRight (double dAng, const C2DPoint &Origin)
 Rotates this to the right about the origin provided by the angle given.
void Grow (double dFactor, const C2DPoint &Origin)
 Grows this from the origin by the amount (1 = no change).
void Reflect (const C2DPoint &Other)
 Reflects this through the point given.
void Reflect (const C2DLine &Line)
 Reflects the point in the line given.
void ReflectY (void)
 Reflects in the y axis.
void ReflectX (void)
 Reflects in the x axis.
void GetBoundingRect (C2DRect &Rect) const
 Returns the bounding rectangle. (Required for the base class).
void SnapToGrid (void)
 Snaps to the conceptual grid.

Public Attributes

double x
 The x value.
double y
 The y value.

Detailed Description

Class which represents a cartesian point.

Class which represents a point with doubles for x and y.

---------------------------------------------------------------------------


Constructor & Destructor Documentation

C2DPoint::C2DPoint void   ) 
 

Constructor.

--------------------------------------------------------------------------
C2DPoint::C2DPoint

---------------------------------------------------------------------------

C2DPoint::~C2DPoint void   ) 
 

Destructor.

--------------------------------------------------------------------------
C2DPoint::~C2DPoint

---------------------------------------------------------------------------

C2DPoint::C2DPoint double  dx,
double  dy
 

Constructor assigns the data.

--------------------------------------------------------------------------
C2DPoint::C2DPoint

---------------------------------------------------------------------------

C2DPoint::C2DPoint const C2DVector Vector  ) 
 

Constuct from vector which can be thought of as a point (and vice versa).

--------------------------------------------------------------------------
C2DPoint::C2DPoint

---------------------------------------------------------------------------


Member Function Documentation

double C2DPoint::Distance const C2DPoint Other  )  const [virtual]
 

Returns the distance between this and the other.

--------------------------------------------------------------------------
C2DPoint::Distance

---------------------------------------------------------------------------

Implements C2DBase.

void C2DPoint::GetBoundingRect C2DRect Rect  )  const [virtual]
 

Returns the bounding rectangle. (Required for the base class).

--------------------------------------------------------------------------
C2DPoint::GetBoundingRect

---------------------------------------------------------------------------

Implements C2DBase.

C2DPoint C2DPoint::GetMidPoint const C2DPoint Other  )  const
 

Returns the mid point between this and the other.

--------------------------------------------------------------------------
C2DPoint::GetMidPoint

---------------------------------------------------------------------------

void C2DPoint::Grow double  dFactor,
const C2DPoint Origin
[virtual]
 

Grows this from the origin by the amount (1 = no change).

--------------------------------------------------------------------------
C2DPoint::Grow

---------------------------------------------------------------------------

Implements C2DBase.

C2DVector C2DPoint::MakeVector const C2DPoint PointTo  )  const
 

Returns a vector from this to the other.

--------------------------------------------------------------------------
C2DPoint::MakeVector

---------------------------------------------------------------------------

void C2DPoint::Move const C2DVector vector  )  [virtual]
 

Moves this by the vector given.

--------------------------------------------------------------------------
C2DPoint::Move

---------------------------------------------------------------------------

Implements C2DBase.

const C2DPoint C2DPoint::operator * const C2DPoint Other  )  const
 

Multiplies this by the point and returns the result.

--------------------------------------------------------------------------
C2DPoint::operator*

---------------------------------------------------------------------------

const C2DPoint C2DPoint::operator * double  dFactor  )  const
 

Multiplies this by the factor and returns the result.

--------------------------------------------------------------------------
C2DPoint::operator*

---------------------------------------------------------------------------

void C2DPoint::operator *= const C2DPoint Other  ) 
 

Mulitiplication.

--------------------------------------------------------------------------
C2DPoint::operator*=

---------------------------------------------------------------------------

void C2DPoint::operator *= double  dFactor  ) 
 

Mulitiplication.

--------------------------------------------------------------------------
C2DPoint::operator*=

---------------------------------------------------------------------------

bool C2DPoint::operator!= const C2DPoint Other  )  const
 

Inequality test, inverse of equality test.

--------------------------------------------------------------------------
C2DPoint::operator!=

---------------------------------------------------------------------------

const C2DPoint C2DPoint::operator+ const C2DVector vector  )  const
 

Movement.

--------------------------------------------------------------------------
C2DPoint::operator+

---------------------------------------------------------------------------

const C2DPoint C2DPoint::operator+ const C2DPoint Other  )  const
 

Adds this to the other.

--------------------------------------------------------------------------
C2DPoint::operator+

---------------------------------------------------------------------------

void C2DPoint::operator+= const C2DVector Vector  ) 
 

Movement.

--------------------------------------------------------------------------
C2DPoint::operator+=

---------------------------------------------------------------------------

void C2DPoint::operator+= const C2DPoint Other  ) 
 

Addition to this.

--------------------------------------------------------------------------
C2DPoint::operator+=

---------------------------------------------------------------------------

const C2DVector C2DPoint::operator- const C2DPoint Other  )  const
 

Subtracts this from the other.

--------------------------------------------------------------------------
C2DPoint::operator-

---------------------------------------------------------------------------

void C2DPoint::operator-= const C2DPoint Other  ) 
 

Subtraction.

--------------------------------------------------------------------------
C2DPoint::operator-=

---------------------------------------------------------------------------

const C2DPoint C2DPoint::operator/ double  dFactor  )  const
 

Divides this by the factor and returns the result.

--------------------------------------------------------------------------
C2DPoint::operator/

---------------------------------------------------------------------------

void C2DPoint::operator/= double  dFactor  ) 
 

Divides this by the factor.

--------------------------------------------------------------------------
C2DPoint::operator*=

---------------------------------------------------------------------------

const C2DPoint & C2DPoint::operator= const C2DVector OtherVector  ) 
 

Assignement to a vector.

--------------------------------------------------------------------------
C2DPoint::operator=

---------------------------------------------------------------------------

const C2DPoint & C2DPoint::operator= const C2DPoint Other  ) 
 

Assignment to another.

--------------------------------------------------------------------------
C2DPoint::operator=

---------------------------------------------------------------------------

bool C2DPoint::operator== const C2DPoint Other  )  const
 

Equality test which uses a tolerance level.

--------------------------------------------------------------------------
C2DPoint::operator==

---------------------------------------------------------------------------

void C2DPoint::Project const C2DLine Line,
CInterval Interval
const [virtual]
 

Project this on the line given returning a distance along the line.

--------------------------------------------------------------------------
C2DPoint::Project

---------------------------------------------------------------------------

Implements C2DBase.

void C2DPoint::Project const C2DVector Vector,
CInterval Interval
const [virtual]
 

Project this on the vector given returning a distance along the line.

--------------------------------------------------------------------------
C2DPoint::Project

---------------------------------------------------------------------------

Implements C2DBase.

double C2DPoint::Project const C2DLine Line  )  const
 

Project this on the line given returning a distance along the line.

--------------------------------------------------------------------------
C2DPoint::Project

---------------------------------------------------------------------------

double C2DPoint::Project const C2DVector Vector  )  const
 

Project this on the vector given returning a distance along the vector.

--------------------------------------------------------------------------
C2DPoint::Project

---------------------------------------------------------------------------

bool C2DPoint::ProjectsOnLine const C2DLine Line,
C2DPoint ptOnLine = 0,
bool *  bAbove = 0
const
 

True if the point projects onto the line given and returns the point on the line.

--------------------------------------------------------------------------
C2DPoint::ProjectsOnLine

---------------------------------------------------------------------------

void C2DPoint::Reflect const C2DLine Line  )  [virtual]
 

Reflects the point in the line given.

--------------------------------------------------------------------------
C2DPoint::Reflect

---------------------------------------------------------------------------

Implements C2DBase.

void C2DPoint::Reflect const C2DPoint Other  )  [virtual]
 

Reflects this through the point given.

--------------------------------------------------------------------------
C2DPoint::Reflect

---------------------------------------------------------------------------

Implements C2DBase.

void C2DPoint::ReflectX void   ) 
 

Reflects in the x axis.

--------------------------------------------------------------------------
C2DPoint::ReflectX

---------------------------------------------------------------------------

void C2DPoint::ReflectY void   ) 
 

Reflects in the y axis.

--------------------------------------------------------------------------
C2DPoint::ReflectY

---------------------------------------------------------------------------

void C2DPoint::RotateToRight double  dAng,
const C2DPoint Origin
[virtual]
 

Rotates this to the right about the origin provided by the angle given.

--------------------------------------------------------------------------
C2DPoint::RotateToRight

---------------------------------------------------------------------------

Implements C2DBase.

void C2DPoint::SnapToGrid void   )  [virtual]
 

Snaps to the conceptual grid.

--------------------------------------------------------------------------
C2DPoint::SnapToGrid

---------------------------------------------------------------------------

Implements C2DBase.


The documentation for this class was generated from the following files:
Generated on Mon Apr 21 11:43:52 2008 for GeoLib by  doxygen 1.4.4