|
| GenericSegment () |
| Creates an empty line segment.
|
|
| GenericSegment (const GenericLine< PointType > &dl) |
| Creates a line segment defined by the start and end point of line dl .
|
|
| GenericSegment (const GenericSegment< PointType > &ds)=default |
| Copy constructor.
|
|
| GenericSegment (const PointType &p1, const PointType &p2) |
| Creates a line segment from p1 to p2 .
|
|
| GenericSegment (double x1, double y1, double x2, double y2) |
| Creates a line segment from (x1 ,y1 ) to (x2 ,y2 ).
|
|
bool | contains (const PointType &p) const override |
| Returns true iff p lies on this line segment.
|
|
GenericLine< PointType >::numberType | dx () const |
| Returns the x-coordinate of the difference (end point - start point).
|
|
GenericLine< PointType >::numberType | dy () const |
| Returns the y-coordinate of the difference (end point - start point).
|
|
const PointType & | end () const |
| Returns the end point of the line segment.
|
|
IntersectionType | horIntersection (const double horAxis, double &crossing) const override |
| Computes the intersection of this line segment and the horizontal line through y = horAxis .
|
|
IntersectionType | intersection (const GenericSegment< PointType > &segment, PointType &inter, bool endpoints=true) const |
| Returns an IntersectionType specifying whether segment and this line segment intersect.
|
|
double | length () const |
| Returns the length (Euclidean distance between start and end point) of this line segment.
|
|
bool | operator!= (const GenericSegment< PointType > &dl) const |
| Inequality operator.
|
|
GenericSegment & | operator= (const GenericSegment< PointType > &ds)=default |
| Copy assignment operator.
|
|
bool | operator== (const GenericSegment< PointType > &dl) const |
| Equality operator.
|
|
const PointType & | start () const |
| Returns the start point of the line segment.
|
|
IntersectionType | verIntersection (const double verAxis, double &crossing) const override |
| Computes the intersection between this line segment and the vertical line through x = verAxis .
|
|
| GenericLine () |
| Creates an empty line.
|
|
| GenericLine (const GenericLine< PointType > &dl) |
| Copy constructor.
|
|
| GenericLine (const PointType &p1, const PointType &p2) |
| Creates a line through the points p1 and p2 .
|
|
| GenericLine (numberType x1, numberType y1, numberType x2, numberType y2) |
| Creates a line through the points (x1 ,y1 ) and (x2 ,y2 ).
|
|
virtual bool | contains (const DPoint &p) const |
| Returns true iff p lies on this line.
|
|
double | det (const GenericLine< PointType > &line) const |
| Determines if line is left or right of this line.
|
|
IntersectionType | intersection (const GenericLine< PointType > &line, DPoint &inter) const |
| Returns an IntersectionType specifying whether line and this line intersect.
|
|
bool | isHorizontal () const |
| Returns true iff this line runs horizontally.
|
|
bool | isVertical () const |
| Returns true iff this line runs vertically.
|
|
bool | operator!= (const GenericLine< PointType > &dl) const |
| Inequality operator.
|
|
GenericLine< PointType > & | operator= (const GenericLine< PointType > &dl) |
| Assignment operator.
|
|
bool | operator== (const GenericLine< PointType > &dl) const |
| Equality operator.
|
|
double | slope () const |
| Returns the slope of the line.
|
|
double | yAbs () const |
| Returns the value y' such that (0,y') lies on the unlimited straight-line defined by this line.
|
|
template<class PointType>
class ogdf::GenericSegment< PointType >
Finite line segments.
Definition at line 631 of file geometry.h.