ZeusMath-Library
2.0.4
|
#include <Arc2D.h>
Public Member Functions | |
TArc2D () | |
Default constructor. Creates an arc of length 0 on the unit circle. More... | |
TArc2D (const IVector2D &rVecCenter, const Float &rfRadius, const IAngle &rStartAngle, const IAngle &rEndAngle, bool bAnglesAreGivenCounterClockwise) | |
Standard constructor. More... | |
TArc2D (const ICircle2D &rCircle, const IAngle &rStartAngle, const IAngle &rEndAngle, bool bAnglesAreGivenCounterClockwise) | |
Constructor taking an ICircle2D. More... | |
TArc2D (const TArc2D &rArc) | |
Copy constructor: Constructor taking class type object. More... | |
TArc2D (const IArc2D &rArc) | |
Constructor taking interface type object. More... | |
virtual | ~TArc2D () |
virtual ICircle2D &MQUALIFIER | getCircle () |
virtual const ICircle2D &MQUALIFIER | getCircleConst () const |
virtual void MQUALIFIER | setCircle (const ICircle2D &rCircle) |
virtual const IVector2D &MQUALIFIER | getCenter () const |
virtual void MQUALIFIER | setCenter (const IVector2D &rVecCenter) |
virtual const Float &MQUALIFIER | getRadius () const |
virtual void MQUALIFIER | setRadius (const Float &rfRadius) |
virtual const IAngle &MQUALIFIER | getStartAngle () const |
virtual const IAngle &MQUALIFIER | getEndAngle () const |
virtual void MQUALIFIER | setStartAngle (const IAngle &rStartAngle) |
virtual void MQUALIFIER | setEndAngle (const IAngle &rEndAngle) |
virtual void MQUALIFIER | setAngles (const IAngle &rStartAngle, const IAngle &rEndAngle, bool bAnglesAreGivenCounterClockwise) |
virtual void MQUALIFIER | switchAngles () |
virtual void MQUALIFIER | getStartPoint (IVector2D &rVecStart) const |
virtual void MQUALIFIER | getEndPoint (IVector2D &rVecEnd) const |
virtual void MQUALIFIER | createSupplementArc (IArc2D &rSupplementArc) const |
virtual bool MQUALIFIER | isShorterThanSupplementArc () const |
virtual void MQUALIFIER | assign (const IArc2D &rArc) |
virtual bool MQUALIFIER | isEqual (const IArc2D &rArc) const |
virtual bool MQUALIFIER | containsAngle (const IAngle &rAngle, bool bIncludeStartAndEndPoints=true) const |
virtual bool MQUALIFIER | containsPoint2 (const IVector2D &rVecPoint, bool bIncludeStartAndEndPoints=true, const Float &rfTolerance=0) const |
virtual void MQUALIFIER | moveStartPointOnCircle (const Float &rfDistance, bool bCounterClockwise) |
virtual void MQUALIFIER | moveEndPointOnCircle (const Float &rfDistance, bool bCounterClockwise) |
virtual const InterfaceID &MQUALIFIER | getInterfaceID () const |
virtual Float MQUALIFIER | getLength () const |
virtual Retval MQUALIFIER | getPointFromRunningParameter (const Float &rfRunningParameter, IVector2D &rvecPoint) const |
virtual Retval MQUALIFIER | intersect (const IGeometricObject2D &rObject, IList< IVector2D > &rLstIntersectionPoints, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) const |
virtual bool MQUALIFIER | containsPoint (const IVector2D &rVecPoint, const Float &rfTolerance=0) const |
virtual void MQUALIFIER | calcClosestPointToPoint (const IVector2D &rVecPoint, IVector2D &rVecClosestPoint) const |
virtual Float MQUALIFIER | calcDistanceToPoint (const IVector2D &rVecPoint) const |
virtual Float MQUALIFIER | calcDistanceToObject (const IGeometricObject2D &rObject) const |
virtual Retval MQUALIFIER | getXMinPoint (IVector2D &rVecPoint) const |
virtual Retval MQUALIFIER | getXMaxPoint (IVector2D &rVecPoint) const |
virtual Retval MQUALIFIER | getYMinPoint (IVector2D &rVecPoint) const |
virtual Retval MQUALIFIER | getYMaxPoint (IVector2D &rVecPoint) const |
virtual void MQUALIFIER | getMinMaxCoordinates (Float &rfXMin, Float &rfXMax, Float &rfYMin, Float &rfYMax) const |
const TArc2D & | operator= (const IArc2D &rArc) |
Assignment of interface type object. More... | |
const TArc2D & | operator= (const TArc2D &rArc) |
Assignment of class type object. More... | |
bool | operator== (const IArc2D &rArc) const |
Equality with another arc? More... | |
bool | operator!= (const IArc2D &rArc) const |
Inequality with another arc? More... | |
Static Public Member Functions | |
static bool | createFrom3Points (const IVector2D &rVecStartPoint, const IVector2D &rVecEndPoint, const IVector2D &rVecIntermediatePoint, IArc2D &rArc) |
Static creation method to create an arc from 3 points. More... | |
static bool | createFrom2PointsRadiusAndFlags (const IVector2D &rVecStartPoint, const IVector2D &rVecEndPoint, const Float &rfRadius, bool bPointsAreGivenCounterClockwise, bool bShorterArc, IArc2D &rArc, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) |
Static creation method to give 2 points, the radius and 2 flags. More... | |
static bool | createFrom2PointsAndCenter (const IVector2D &rVecStartPoint, const IVector2D &rVecEndPoint, const IVector2D &rVecCenter, bool bPointsAreGivenCounterClockwise, IArc2D &rArc, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) |
Static creation method to give 2 points and the center. More... | |
static Retval | calcArcsTangentTo2StraightLines (const IStraightLine2D &rStraightLine1, const IStraightLine2D &rStraightLine2, const Float &rfRadius, IList< IArc2D > &rLstTangentArcs, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) |
Static method to calculate all 4 arcs tangent to 2 straight lines. More... | |
static Retval | calcArcsTangentToStraightLineAndCircle (const IStraightLine2D &rStraightLine, const ICircle2D &rCircle, const Float &rfRadius, IList< IArc2D > &rLstTangentArcs, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) |
Static method to calculate all 8 arcs tangent to a straight line and a circle. More... | |
static Retval | calcArcsTangentTo2Circles (const ICircle2D &rCircle1, const ICircle2D &rCircle2, const Float &rfRadius, IList< IArc2D > &rLstTangentArcs, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) |
Static method to calculate all 8 arcs tangent to 2 circles. More... | |
static Retval | calcArcsTangentTo2LineSegments (const ILineSegment2D &rLineSegment1, const ILineSegment2D &rLineSegment2, const Float &rfRadius, IList< IArc2D > &rLstTangentArcs, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) |
Static method to calculate all arcs tangent to 2 line segments. More... | |
static Retval | calcArcsTangentToLineSegmentAndArc (const ILineSegment2D &rLineSegment, const IArc2D &rArc, const Float &rfRadius, IList< IArc2D > &rLstTangentArcs, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) |
Static method to calculate all arcs tangent to a line segment and an arc. More... | |
static Retval | calcArcsTangentTo2Arcs (const IArc2D &rArc1, const IArc2D &rArc2, const Float &rfRadius, IList< IArc2D > &rLstTangentArcs, const Float &rfTangentTolerance=INTERSECT_TANGENT_TOLERANCE) |
Static method to calculate all arcs tangent to 2 arcs. More... | |
IArc2D encapsulates a three dimensional floating point arc for vector geometry calculations.
|
inline |
Default constructor. Creates an arc of length 0 on the unit circle.
zeus::TArc2D::TArc2D | ( | const IVector2D & | rVecCenter, |
const Float & | rfRadius, | ||
const IAngle & | rStartAngle, | ||
const IAngle & | rEndAngle, | ||
bool | bAnglesAreGivenCounterClockwise | ||
) |
Standard constructor.
Standard constructor.
rVecCenter | [IN]: Center. |
rfRadius | [IN]: Radius. |
rStartAngle | [IN]: Start angle. |
rEndAngle | [IN]: End angle. |
bAnglesAreGivenCounterClockwise | [IN]: The angles are given counterclockwise. |
|
inline |
Copy constructor: Constructor taking class type object.
|
inline |
Constructor taking interface type object.
|
inlinevirtual |
Virtual destructor.
|
inlinevirtual |
|
static |
Static method to calculate all arcs tangent to 2 arcs.
Static method to calculate all arcs tangent to 2 arcs.
rArc1,2 | [IN] : The 2 given arcs. |
rfRadius | [IN] : The desired radius. |
rLstTangentArcs | [OUT]: List of tangent arcs. |
rfTangentTolerance | [IN] : See IGeometricObject2D::intersect(..). |
RET_NOERROR | : No error. Arcs were added to rLstTangentArcs. |
RET_EMPTY_SET | : No tangent arcs exist geometrically. No arcs were added to rLstTangentArcs. |
RET_INFINITE_SET | : An infinite number of tangent arcs exists. No arcs were added to rLstTangentArcs. |
|
static |
Static method to calculate all 8 arcs tangent to 2 circles.
Static method to calculate all 8 arcs tangent to 2 circles.
rCircle1 | [IN] : The first given circle. |
rCircle2 | [IN] : The second given circle. |
rfRadius | [IN] : The desired radius. |
rLstTangentArcs | [OUT]: List of tangent arcs. The maximum is 8, all values from 0 to 8 are possible. |
rfTangentTolerance | [IN] : See IGeometricObject2D::intersect(..). |
RET_NOERROR | : No error. Arcs were added to rLstTangentArcs. |
RET_EMPTY_SET | : No tangent circles exist geometrically. No arcs were added to rLstTangentArcs. |
RET_INFINITE_SET | : An infinite number of tangent arcs exists. No arcs were added to rLstTangentArcs. |
|
static |
Static method to calculate all arcs tangent to 2 line segments.
Static method to calculate all arcs tangent to 2 line segments.
rLineSegment1,2 | [IN] : The 2 given line segments. |
rfRadius | [IN] : The desired radius. |
rLstTangentArcs | [OUT]: List of tangent arcs. |
rfTangentTolerance | [IN] : See IGeometricObject2D::intersect(..). |
RET_NOERROR | : No error. Arcs were added to rLstTangentArcs. |
RET_EMPTY_SET | : No tangent arcs exist. No arcs were added to rLstTangentArcs. |
RET_INFINITE_SET | : An infinite number of tangent arcs exists, as the 2 line segments are parallel and the distance between them is equal to 2*rfRadius. No arcs were added to rLstTangentArcs. |
RET_INTERNAL_ERROR | : An internal error has occurred, requiring code correction and ZeusMathTest extension. |
|
static |
Static method to calculate all 4 arcs tangent to 2 straight lines.
Static method to calculate all 4 arcs tangent to 2 straight lines.
rStraightLine1,2 | [IN] : The given straight lines. |
rfRadius | [IN] : The desired radius. |
rLstTangentArcs | [OUT]: List of tangent arcs. The method will add 4 arcs in case RET_NOERROR is returned and no arcs otherwise. |
rfTangentTolerance | [IN] : See IGeometricObject2D::intersect(..). |
RET_NOERROR | : 4 arcs were added to rLstTangentArcs. |
RET_EMPTY_SET | : No tangent arc exists, as the 2 straight lines are parallel and the distance between them is not equal to 2*rfRadius. No arcs were added to rLstTangentArcs. |
RET_INFINITE_SET | : An infinite number of tangent arcs exists, as the 2 straight lines are parallel and the distance between them is equal to 2*rfRadius. No arcs were added to rLstTangentArcs. |
RET_INTERNAL_ERROR | : An internal error has occurred, requiring code correction and ZeusMathTest extension. |
|
static |
Static method to calculate all arcs tangent to a line segment and an arc.
Static method to calculate all arcs tangent to a line segment and an arc.
rLineSegment | [IN] : The given line segment. |
rArc | [IN] : The given arc. |
rfRadius | [IN] : The desired radius. |
rLstTangentArcs | [OUT]: List of tangent arcs. |
rfTangentTolerance | [IN] : See IGeometricObject2D::intersect(..). |
RET_NOERROR | : No error. Arcs were added to rLstTangentArcs. |
RET_EMPTY_SET | : No tangent arcs exist geometrically. No arcs were added to rLstTangentArcs. |
RET_INFINITE_SET | : This case is geometrically impossible, hence this retval will never be returned. |
|
static |
Static method to calculate all 8 arcs tangent to a straight line and a circle.
Static method to calculate all 8 arcs tangent to a straight line and a circle.
rStraightLine | [IN] : The given straight line. |
rCircle | [IN] : The given circle. |
rfRadius | [IN] : The desired radius. |
rLstTangentArcs | [OUT]: List of tangent arcs. Maximum is 8, 0, 1, 2, 4, 5, 6 and 7 are also possible. |
rfTangentTolerance | [IN] : See IGeometricObject2D::intersect(..). |
RET_NOERROR | : No error. Arcs were added to rLstTangentArcs. |
RET_EMPTY_SET | : No tangent arcs exist geometrically. No arcs were added to rLstTangentArcs. |
RET_INFINITE_SET | : This case is geometrically impossible, hence this retval will never be returned. |
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IArc2D.
|
inlinevirtual |
Is a given point on this object?
rVecPoint | [IN]: Vector to the given point. |
rfTolerance | [IN]: Optional: Maximum distance used as tolerance to treat the given point still as being contained. |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IArc2D.
|
static |
Static creation method to give 2 points and the center.
Method to create an arc out of two points on a circle and the center of the circle.
rVecStartPoint | [IN] : Start point of the arc. |
rVecEndPoint | [IN] : End point of the arc. |
rVecCenter | [IN] : Center of the arc. |
bPointsAreGivenCounterClockwise | [IN] : Start and end points are given counter clockwise. |
rArc | [OUT]: The arc created. Only valid is true is returned. |
rfTangentTolerance | [IN] : See IGeometricObject2D::intersect(..). |
|
static |
Static creation method to give 2 points, the radius and 2 flags.
Static creation method to give 2 points, the radius and 2 flags.
rVecStartPoint | [IN] : Start point. |
rVecEndPoint | [IN] : End point. |
rfRadius | [IN] : Radius. |
bPointsAreGivenCounterClockwise | [IN] : The points are given counterclockwise. |
bShorterArc | [IN] : The shorter arc out of 2 remaining possibilities shall be created. |
rArc | [OUT]: The arc created. |
rfTangentTolerance | [IN] : See IGeometricObject2D::intersect(..). |
|
static |
Static creation method to create an arc from 3 points.
Static creation method to create an arc from 3 points.
rVecStartPoint | [IN] : Start point. |
rVecEndPoint | [IN] : End point. |
rVecIntermediatePoint | [IN] : Intermediate point on the arc. |
rArc | [OUT]: The arc created. |
|
virtual |
Implements zeus::IArc2D.
|
inlinevirtual |
Get the center vector.
Implements zeus::IArc2D.
|
inlinevirtual |
Interface IArc2D.
Implements zeus::IArc2D.
|
inlinevirtual |
|
inlinevirtual |
Get the end angle. See start angle.
Implements zeus::IArc2D.
|
virtual |
Implements zeus::IArc2D.
|
inlinevirtual |
Interface IGeometricObject2D.
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
inlinevirtual |
Get the radius.
Implements zeus::IArc2D.
|
inlinevirtual |
Get the start angle.
Arcs are always defined counter clockwise: The arc runs from the start angle to the end angle counter clockwise, hence in mathematically positive direction of rotation.
Implements zeus::IArc2D.
|
virtual |
Implements zeus::IArc2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
virtual |
Implements zeus::IGeometricObject2D.
|
inlinevirtual |
Equality with another arc?
rArc | [IN]: The other arc. |
Implements zeus::IArc2D.
|
virtual |
Implements zeus::IArc2D.
|
virtual |
Implements zeus::IArc2D.
|
virtual |
Implements zeus::IArc2D.
|
inline |
Inequality with another arc?
Assignment of interface type object.
Assignment.
Assignment of interface type object.
rArc | [IN]: Arc to be assigned to this arc. |
Assignment of class type object.
Assignment of class type object.
Arc | [IN]: Arc to be assigned to this arc. |
bool zeus::TArc2D::operator== | ( | const IArc2D & | rArc | ) | const |
Equality with another arc?
Operators.
Equality with another arc?
rArc | [IN]: The other arc. |
|
virtual |
Implements zeus::IArc2D.
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
Constructor taking interface type object.
rArc | [IN]: Arc to be copied to this arc. |
Implements zeus::IArc2D.
|
inlinevirtual |
|
virtual |
Copy constructor: Constructor taking class type object.
rArc | [IN]: Arc to be copied to this arc. |
Implements zeus::IArc2D.
|
virtual |
Implements zeus::IArc2D.