#include <2DPoint.h>
Inheritance diagram for C2DPoint:
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 C2DPoint & | operator= (const C2DPoint &Other) |
Assignment to another. | |
const C2DPoint & | operator= (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. |
Class which represents a point with doubles for x and y.
---------------------------------------------------------------------------
|
Constructor.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Destructor.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Constructor assigns the data.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Constuct from vector which can be thought of as a point (and vice versa).
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Returns the distance between this and the other.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Returns the bounding rectangle. (Required for the base class).
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Returns the mid point between this and the other.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Grows this from the origin by the amount (1 = no change).
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Returns a vector from this to the other.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Moves this by the vector given.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Multiplies this by the point and returns the result.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Multiplies this by the factor and returns the result.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Mulitiplication.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Mulitiplication.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Inequality test, inverse of equality test.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Movement.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Adds this to the other.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Movement.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Addition to this.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Subtracts this from the other.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Subtraction.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Divides this by the factor and returns the result.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Divides this by the factor.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Assignement to a vector.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Assignment to another.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Equality test which uses a tolerance level.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Project this on the line given returning a distance along the line.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Project this on the vector given returning a distance along the line.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Project this on the line given returning a distance along the line.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Project this on the vector given returning a distance along the vector.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
True if the point projects onto the line given and returns the point on the line.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Reflects the point in the line given.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Reflects this through the point given.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Reflects in the x axis.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Reflects in the y axis.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- |
|
Rotates this to the right about the origin provided by the angle given.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |
|
Snaps to the conceptual grid.
-------------------------------------------------------------------------- --------------------------------------------------------------------------- Implements C2DBase. |