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

C2DArc Class Reference

Class which represents a curved line. More...

#include <2DArc.h>

Inheritance diagram for C2DArc:

C2DLineBase C2DBase List of all members.

Public Member Functions

 C2DArc (void)
 Contructor.
 C2DArc (const C2DArc &Other)
 Contructor.
 ~C2DArc (void)
 Destructor.
 C2DArc (const C2DPoint &PtFrom, const C2DPoint &PtTo, double dRadius, bool bCentreOnRight=true, bool bArcOnRight=false)
 Constructor with assignment.
 C2DArc (const C2DPoint &PtFrom, const C2DVector &Vector, double dRadius, bool bCentreOnRight=true, bool bArcOnRight=false)
 Constructor with assignment.
 C2DArc (const C2DLine &Line, double dRadius, bool bCentreOnRight=true, bool bArcOnRight=false)
 Constructor with assignment.
void Set (const C2DPoint &PtFrom, const C2DPoint &PtTo, double dRadius, bool bCentreOnRight=true, bool bArcOnRight=false)
 Assignment.
void Set (const C2DPoint &PtFrom, const C2DVector &Vector, double dRadius, bool bCentreOnRight=true, bool bArcOnRight=false)
 Assignment.
void Set (const C2DLine &Line, double dRadius, bool bCentreOnRight=true, bool bArcOnRight=false)
 Assignment.
void Set (const C2DLine &Line, const C2DPoint ptOnArc)
 Assignment.
bool IsValid (void) const
 True if the radius is large enough to join the points.
C2DPoint GetCircleCentre (void) const
 Returns the corresponding circle's centre.
double GetLength (void) const
 Returns the length of the curve.
void GetBoundingRect (C2DRect &Rect) const
 Gets the bounding rectangle.
double GetSegmentAngle (void) const
 Gets the angle of the minimum segment. Always +ve and less than PI. In radians.
C2DPoint GetPointFrom (void) const
 Returns the first point.
C2DPoint GetPointTo (void) const
 Returns the seconds point.
bool Crosses (const C2DLineBase &Other, C2DPointSet *IntersectionPts=0) const
 True if this crosses the line given as a base class.
bool Crosses (const C2DLine &Line, C2DPointSet *IntersectionPts=0) const
 True if this crosses a line.
bool Crosses (const C2DArc &Other, C2DPointSet *IntersectionPts=0) const
 True if this crosses a curve.
bool CrossesRay (const C2DLine &Ray, C2DPointSet *IntersectionPts=0) const
 True if this crosses the ray given.
double Distance (const C2DPoint &TestPoint) const
 Distance between this and the test point.
double Distance (const C2DPoint &TestPoint, C2DPoint *ptOnThis) const
 Distance between this and the test point.
double Distance (const C2DArc &Other, C2DPoint *ptOnThis=0, C2DPoint *ptOnOther=0) const
 Distance between this and another line.
double Distance (const C2DLine &Line, C2DPoint *ptOnThis=0, C2DPoint *ptOnOther=0) const
 Distance between this and another straight line.
double Distance (const C2DLineBase &Other, C2DPoint *ptOnThis=0, C2DPoint *ptOnOther=0) const
 Returns the distance from the other line to this providing points.
void Project (const C2DLine &Line, CInterval &Interval) const
 Projection of this onto a line.
void Project (const C2DVector &Vector, CInterval &Interval) const
 Projection of this onto a vector.
C2DPoint GetMidPoint (void) const
 Gets the point half way along the curve.
C2DPoint GetPointOn (double dFactorFromStart) const
 Gets the point on the curve determined by the factor.
double GetRadius (void) const
 Gets the radius.
const C2DLineGetLine (void) const
 Gets the straight line.
bool GetCentreOnRight (void) const
 True if the centre is on the right.
bool GetArcOnRight (void) const
 True is the curve is on the right.
void Move (const C2DVector &vector)
 Move by the vector given.
void RotateToRight (double dAng, const C2DPoint &Origin)
 Rotates the to the right.
void Grow (double dFactor, const C2DPoint &Origin)
 Grow relative to the origin.
void Reflect (const C2DPoint &point)
 Reflect in the point.
void Reflect (const C2DLine &Line)
 Reflects throught the line provided.
void ReverseDirection (void)
 Reverses the direction.
void GetSubLines (const C2DPointSet &PtsOnLine, C2DLineBaseSet &LineSet) const
 Returns the lines that go to make this up based on the set of points.
void SnapToGrid (void)
 Snaps this to the conceptual grid.

Detailed Description

Class which represents a curved line.

Class which represents a curved line, the curve being a part of a circle. Data is held as a line and a radius with information about the orientation of the associated circle.

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


Constructor & Destructor Documentation

C2DArc::C2DArc void   ) 
 

Contructor.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

C2DArc::C2DArc const C2DArc Other  ) 
 

Contructor.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

C2DArc::~C2DArc void   ) 
 

Destructor.

--------------------------------------------------------------------------
C2DArc::~C2DArc

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

C2DArc::C2DArc const C2DPoint PtFrom,
const C2DPoint PtTo,
double  dRadius,
bool  bCentreOnRight = true,
bool  bArcOnRight = false
 

Constructor with assignment.

--------------------------------------------------------------------------
C2DSegment::C2DSegment

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

C2DArc::C2DArc const C2DPoint PtFrom,
const C2DVector Vector,
double  dRadius,
bool  bCentreOnRight = true,
bool  bArcOnRight = false
 

Constructor with assignment.

--------------------------------------------------------------------------
C2DSegment::C2DSegment

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

C2DArc::C2DArc const C2DLine Line,
double  dRadius,
bool  bCentreOnRight = true,
bool  bArcOnRight = false
 

Constructor with assignment.

--------------------------------------------------------------------------
C2DSegment::C2DSegment

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


Member Function Documentation

bool C2DArc::Crosses const C2DArc Other,
C2DPointSet IntersectionPts = 0
const
 

True if this crosses a curve.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

bool C2DArc::Crosses const C2DLine Line,
C2DPointSet IntersectionPts = 0
const
 

True if this crosses a line.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

bool C2DArc::Crosses const C2DLineBase Other,
C2DPointSet IntersectionPts = 0
const [virtual]
 

True if this crosses the line given as a base class.

--------------------------------------------------------------------------
C2DArc::Crosses

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

Implements C2DLineBase.

bool C2DArc::CrossesRay const C2DLine Ray,
C2DPointSet IntersectionPts = 0
const
 

True if this crosses the ray given.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

double C2DArc::Distance const C2DLineBase Other,
C2DPoint ptOnThis = 0,
C2DPoint ptOnOther = 0
const [virtual]
 

Returns the distance from the other line to this providing points.

--------------------------------------------------------------------------
C2DArc::Distance

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

Implements C2DLineBase.

double C2DArc::Distance const C2DLine Line,
C2DPoint ptOnThis = 0,
C2DPoint ptOnOther = 0
const
 

Distance between this and another straight line.

--------------------------------------------------------------------------
C2DArc::Distance

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

double C2DArc::Distance const C2DArc Other,
C2DPoint ptOnThis = 0,
C2DPoint ptOnOther = 0
const
 

Distance between this and another line.

--------------------------------------------------------------------------
C2DArc::Distance

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

double C2DArc::Distance const C2DPoint TestPoint,
C2DPoint ptOnThis
const [virtual]
 

Distance between this and the test point.

--------------------------------------------------------------------------
C2DArc::Distance

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

Implements C2DLineBase.

double C2DArc::Distance const C2DPoint TestPoint  )  const [virtual]
 

Distance between this and the test point.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

Implements C2DLineBase.

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

Gets the bounding rectangle.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

Implements C2DBase.

C2DPoint C2DArc::GetCircleCentre void   )  const
 

Returns the corresponding circle's centre.

--------------------------------------------------------------------------
C2DSegment::GetCircleCentre

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

double C2DArc::GetLength void   )  const [virtual]
 

Returns the length of the curve.

--------------------------------------------------------------------------
C2DSegment::GetArcLength

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

Implements C2DLineBase.

double C2DArc::GetSegmentAngle void   )  const
 

Gets the angle of the minimum segment. Always +ve and less than PI. In radians.

--------------------------------------------------------------------------
C2DSegment::GetSegmentAngle

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

void C2DArc::GetSubLines const C2DPointSet PtsOnLine,
C2DLineBaseSet LineSet
const [virtual]
 

Returns the lines that go to make this up based on the set of points.

--------------------------------------------------------------------------
C2DArc::GetSubLines

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

Implements C2DLineBase.

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

Grow relative to the origin.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

Implements C2DBase.

bool C2DArc::IsValid void   )  const
 

True if the radius is large enough to join the points.

--------------------------------------------------------------------------
C2DSegment::IsValid

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

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

Projection of this onto a vector.

Returns the projection of this onto the vector. The vector is equivalent to a line from (0, 0).

Implements C2DBase.

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

Projection of this onto a line.

Returns the projection of this onto the line provided given as the interval on (or off) the line. Interval given as distance from the start of the line.

Implements C2DBase.

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

Reflects throught the line provided.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

Implements C2DBase.

void C2DArc::Reflect const C2DPoint point  )  [virtual]
 

Reflect in the point.

--------------------------------------------------------------------------
C2DArc::C2DArc

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

Implements C2DBase.

void C2DArc::ReverseDirection void   )  [virtual]
 

Reverses the direction.

--------------------------------------------------------------------------
C2DArc::ReverseDirection

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

Implements C2DLineBase.

void C2DArc::Set const C2DLine Line,
const C2DPoint  ptOnArc
 

Assignment.

--------------------------------------------------------------------------
C2DArc::Set

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

void C2DArc::Set const C2DLine Line,
double  dRadius,
bool  bCentreOnRight = true,
bool  bArcOnRight = false
 

Assignment.

--------------------------------------------------------------------------
C2DArc::Set

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

void C2DArc::Set const C2DPoint PtFrom,
const C2DVector Vector,
double  dRadius,
bool  bCentreOnRight = true,
bool  bArcOnRight = false
 

Assignment.

--------------------------------------------------------------------------
C2DArc::Set

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

void C2DArc::Set const C2DPoint PtFrom,
const C2DPoint PtTo,
double  dRadius,
bool  bCentreOnRight = true,
bool  bArcOnRight = false
 

Assignment.

--------------------------------------------------------------------------
C2DArc::Set

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

void C2DArc::SnapToGrid void   )  [virtual]
 

Snaps this to the conceptual grid.

--------------------------------------------------------------------------
C2DArc::SnapToGrid

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

Implements C2DLineBase.


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