#include <LineSegment2D.h>
Public Member Functions | |
| TLineSegment2D (bool bIncludeStartPoint=true, bool bIncludeEndPoint=true) | |
| Default constructor. | |
| TLineSegment2D (const IVector2D &rVecStartPoint, const IVector2D &rVecEndPoint, bool bIncludeStartPoint=true, bool bIncludeEndPoint=true) | |
| Constructor for the point direction form r = r0 + s * u. | |
| TLineSegment2D (const TLineSegment2D &rLineSegment) | |
| Copy constructor: Constructor taking class type object. | |
| TLineSegment2D (const ILineSegment2D &rLineSegment) | |
| Constructor taking interface type object. | |
| virtual | ~TLineSegment2D () |
| Virtual destructor. | |
| virtual IStraightLine2D &MQUALIFIER | getStraightLine () |
| virtual const IStraightLine2D &MQUALIFIER | getStraightLineConst () const |
| virtual void MQUALIFIER | getStartPoint (IVector2D &rVecStart) const |
| virtual void MQUALIFIER | getEndPoint (IVector2D &rVecEnd) const |
| virtual void MQUALIFIER | setStartPoint (const IVector2D &rVecStart) |
| virtual void MQUALIFIER | setEndPoint (const IVector2D &rVecEnd) |
| virtual bool MQUALIFIER | isStartPointIncluded () const |
| virtual void MQUALIFIER | setStartPointIncluded (bool bInclude) |
| virtual bool MQUALIFIER | isEndPointIncluded () const |
| virtual void MQUALIFIER | setEndPointIncluded (bool bInclude) |
| virtual Float MQUALIFIER | getLength () const |
| virtual void MQUALIFIER | assign (const ILineSegment2D &rLineSegment) |
| virtual bool MQUALIFIER | isValid () const |
| virtual bool MQUALIFIER | isEqual (const ILineSegment2D &rLineSegment, bool bCheckBorderPointIncludedFlags=true) const |
| virtual bool MQUALIFIER | isParallel (const ILineSegment2D &rLineSegment) const |
| virtual const InterfaceID &MQUALIFIER | getInterfaceID () 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 |
| 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 TLineSegment2D & | operator= (const ILineSegment2D &rLineSegment) |
| Assignment of interface type object. | |
| const TLineSegment2D & | operator= (const TLineSegment2D &rLineSegment) |
| Assignment of class type object. | |
| bool | operator== (const ILineSegment2D &rLineSegment) const |
| Equality with another line segment? | |
| bool | operator!= (const ILineSegment2D &rLineSegment) const |
| Inequality with another line segment? | |
| bool | operator|| (const ILineSegment2D &rLineSegment) const |
| Parallel to another line segment? | |
ILineSegment2D encapsulates a three dimensional floating point line segment for vector geometry calculations.
| zeus::TLineSegment2D::TLineSegment2D | ( | bool | bIncludeStartPoint = true, |
| bool | bIncludeEndPoint = true |
||
| ) |
Default constructor.
| zeus::TLineSegment2D::TLineSegment2D | ( | const IVector2D & | rVecStartPoint, |
| const IVector2D & | rVecEndPoint, | ||
| bool | bIncludeStartPoint = true, |
||
| bool | bIncludeEndPoint = true |
||
| ) |
Constructor for the point direction form r = r0 + s * u.
| zeus::TLineSegment2D::TLineSegment2D | ( | const TLineSegment2D & | rLineSegment ) | [inline] |
Copy constructor: Constructor taking class type object.
| zeus::TLineSegment2D::TLineSegment2D | ( | const ILineSegment2D & | rLineSegment ) | [inline] |
Constructor taking interface type object.
| virtual zeus::TLineSegment2D::~TLineSegment2D | ( | ) | [inline, virtual] |
Virtual destructor.
| virtual void MQUALIFIER zeus::TLineSegment2D::assign | ( | const ILineSegment2D & | rLineSegment ) | [inline, virtual] |
Assignment.
| rLineSegment | [IN]: Line segment to be assigned to this line segment. |
Implements zeus::ILineSegment2D.
| virtual void MQUALIFIER zeus::TLineSegment2D::calcClosestPointToPoint | ( | const IVector2D & | rVecPoint, |
| IVector2D & | rVecClosestPoint | ||
| ) | const [virtual] |
Calculate the closest point to a given point.
| rVecPoint | [IN] : Vector to the given point. |
| rVecClosestPoint | [OUT]: Closest point on this object. |
Implements zeus::IGeometricObject2D.
| virtual Float MQUALIFIER zeus::TLineSegment2D::calcDistanceToObject | ( | const IGeometricObject2D & | rObject ) | const [virtual] |
Calculate the distance to another given 2D object.
See the remarks under intersect() regarding the avoidance of redundancy.
| rObject | [IN]: The other given 2D object. |
Implements zeus::IGeometricObject2D.
| virtual Float MQUALIFIER zeus::TLineSegment2D::calcDistanceToPoint | ( | const IVector2D & | rVecPoint ) | const [virtual] |
Calculate the distance to a given point.
| rVecPoint | [IN]: The given point. |
Implements zeus::IGeometricObject2D.
| virtual bool MQUALIFIER zeus::TLineSegment2D::containsPoint | ( | const IVector2D & | rVecPoint ) | const [virtual] |
Is a given point on this object?
| rVecPoint | [IN]: Vector to the given point. |
Implements zeus::IGeometricObject2D.
| virtual void MQUALIFIER zeus::TLineSegment2D::getEndPoint | ( | IVector2D & | rVecEnd ) | const [inline, virtual] |
| virtual const InterfaceID& MQUALIFIER zeus::TLineSegment2D::getInterfaceID | ( | ) | const [inline, virtual] |
Interface IGeometricObject2D.
Implements zeus::IGeometricObject2D.
| virtual Float MQUALIFIER zeus::TLineSegment2D::getLength | ( | ) | const [virtual] |
| virtual void MQUALIFIER zeus::TLineSegment2D::getMinMaxCoordinates | ( | Float & | rfXMin, |
| Float & | rfXMax, | ||
| Float & | rfYMin, | ||
| Float & | rfYMax | ||
| ) | const [virtual] |
Calculate the minimum and maximum coordinates.
| rfXMin | [OUT]: The minimum x coordinate. If undefined, TFloat::NaN is returned. |
| rfXMax | [OUT]: The maximum x coordinate. If undefined, TFloat::NaN is returned. |
| rfYMin | [OUT]: The minimum y coordinate. If undefined, TFloat::NaN is returned. |
| rfYMax | [OUT]: The maximum y coordinate. If undefined, TFloat::NaN is returned. |
Implements zeus::IGeometricObject2D.
| virtual void MQUALIFIER zeus::TLineSegment2D::getStartPoint | ( | IVector2D & | rVecStart ) | const [inline, virtual] |
| virtual IStraightLine2D& MQUALIFIER zeus::TLineSegment2D::getStraightLine | ( | ) | [inline, virtual] |
Interface ILineSegment2D.
Implements zeus::ILineSegment2D.
| virtual const IStraightLine2D& MQUALIFIER zeus::TLineSegment2D::getStraightLineConst | ( | ) | const [inline, virtual] |
| virtual Retval MQUALIFIER zeus::TLineSegment2D::getXMaxPoint | ( | IVector2D & | rVecPoint ) | const [virtual] |
Calculate the point on this object with a maximum x coordinate.
| rVecPoint | [OUT]: The desired point. |
| RET_NOERROR | : rVecPoint is valid and the only such point. |
| RET_EMPTY_SET | : There is no such point. rVecPoint is not valid. |
| RET_INFINITE_SET | : There is an infinite number of such points. rVecPoint is valid, but only an example. |
Implements zeus::IGeometricObject2D.
| virtual Retval MQUALIFIER zeus::TLineSegment2D::getXMinPoint | ( | IVector2D & | rVecPoint ) | const [virtual] |
Calculate the point on this object with a minimum x coordinate.
| rVecPoint | [OUT]: The desired point. |
| RET_NOERROR | : rVecPoint is valid and the only such point. |
| RET_EMPTY_SET | : There is no such point. rVecPoint is not valid. |
| RET_INFINITE_SET | : There is an infinite number of such points. rVecPoint is valid, but only an example. |
Implements zeus::IGeometricObject2D.
| virtual Retval MQUALIFIER zeus::TLineSegment2D::getYMaxPoint | ( | IVector2D & | rVecPoint ) | const [virtual] |
Calculate the point on this object with a maximum y coordinate.
| rVecPoint | [OUT]: The desired point. |
| RET_NOERROR | : rVecPoint is valid and the only such point. |
| RET_EMPTY_SET | : There is no such point. rVecPoint is not valid. |
| RET_INFINITE_SET | : There is an infinite number of such points. rVecPoint is valid, but only an example. |
Implements zeus::IGeometricObject2D.
| virtual Retval MQUALIFIER zeus::TLineSegment2D::getYMinPoint | ( | IVector2D & | rVecPoint ) | const [virtual] |
Calculate the point on this object with a minimum y coordinate.
| rVecPoint | [OUT]: The desired point. |
| RET_NOERROR | : rVecPoint is valid and the only such point. |
| RET_EMPTY_SET | : There is no such point. rVecPoint is not valid. |
| RET_INFINITE_SET | : There is an infinite number of such points. rVecPoint is valid, but only an example. |
Implements zeus::IGeometricObject2D.
| virtual Retval MQUALIFIER zeus::TLineSegment2D::intersect | ( | const IGeometricObject2D & | rObject, |
| IList< IVector2D > & | rLstIntersectionPoints, | ||
| const Float & | rfTangentTolerance = INTERSECT_TANGENT_TOLERANCE |
||
| ) | const [virtual] |
Intersect this object with another given 2D object.
To avoid redundancy within implementation, the following order of specialized classes must be respected:
1. IStraightLine2D 2. ILineSegment2D 3. ICircle2D 4. IArc2D
The implementation for intersecting class A with class B is
Examples: The code for intersecting
| rObject | [IN] : The other given 2D object. |
| rLstIntersectionPoints | [OUT]: List of intersection points as 2D vectors. The list is not cleared. Points are only added in case RET_NOERROR is returned. The caller can instantiate TValueTypeList<TVector2D, IVector2D> from zeusbase/System. |
| rfTangentTolerance | [IN] : Optional: Maximum distance used as tolerance to treat non-intersection still as tangent. |
| RET_NOERROR | : An intersection point set of finite size was calculated. |
| RET_INFINITE_SET | : An intersection point set of infinite size was calculated. |
| RET_EMPTY_SET | : An empty intersection point set was calculated. |
| RET_FEATURE_UNAVAILABLE | : The intersection calculation is not implemented for the given combination of objects. |
Implements zeus::IGeometricObject2D.
| virtual bool MQUALIFIER zeus::TLineSegment2D::isEndPointIncluded | ( | ) | const [inline, virtual] |
Is the end point itself included?
Implements zeus::ILineSegment2D.
| virtual bool MQUALIFIER zeus::TLineSegment2D::isEqual | ( | const ILineSegment2D & | rLineSegment, |
| bool | bCheckBorderPointIncludedFlags = true |
||
| ) | const [virtual] |
Comparisons.
Equality with another line segment?
| rLineSegment | [IN]: The other line segment. |
| bCheckBorderPointIncludedFlags | [IN]: Check the isStart/EndPointIncluded() flags. |
Implements zeus::ILineSegment2D.
| virtual bool MQUALIFIER zeus::TLineSegment2D::isParallel | ( | const ILineSegment2D & | rLineSegment ) | const [inline, virtual] |
Parallel to another line segment?
| rLineSegment | [IN]: The other line segment. |
Implements zeus::ILineSegment2D.
| virtual bool MQUALIFIER zeus::TLineSegment2D::isStartPointIncluded | ( | ) | const [inline, virtual] |
Is the start point itself included?
Implements zeus::ILineSegment2D.
| virtual bool MQUALIFIER zeus::TLineSegment2D::isValid | ( | ) | const [inline, virtual] |
| bool zeus::TLineSegment2D::operator!= | ( | const ILineSegment2D & | rLineSegment ) | const [inline] |
Inequality with another line segment?
| const TLineSegment2D& zeus::TLineSegment2D::operator= | ( | const ILineSegment2D & | rLineSegment ) |
Assignment of interface type object.
Assignment.
| const TLineSegment2D& zeus::TLineSegment2D::operator= | ( | const TLineSegment2D & | rLineSegment ) |
Assignment of class type object.
| bool zeus::TLineSegment2D::operator== | ( | const ILineSegment2D & | rLineSegment ) | const [inline] |
Equality with another line segment?
Operators.
| bool zeus::TLineSegment2D::operator|| | ( | const ILineSegment2D & | rLineSegment ) | const |
Parallel to another line segment?
| virtual void MQUALIFIER zeus::TLineSegment2D::setEndPoint | ( | const IVector2D & | rVecEnd ) | [virtual] |
| virtual void MQUALIFIER zeus::TLineSegment2D::setEndPointIncluded | ( | bool | bInclude ) | [inline, virtual] |
Set if the end point itself is included.
| bInclude | [IN]: Include the end point. |
Implements zeus::ILineSegment2D.
| virtual void MQUALIFIER zeus::TLineSegment2D::setStartPoint | ( | const IVector2D & | rVecStart ) | [virtual] |
| virtual void MQUALIFIER zeus::TLineSegment2D::setStartPointIncluded | ( | bool | bInclude ) | [inline, virtual] |
Set if the start point itself is included.
| bInclude | [IN]: Include the start point. |
Implements zeus::ILineSegment2D.