Enki  1.9
Public Member Functions | Public Attributes | List of all members

A segment in a 2D space, basically two points. More...

#include <Geometry.h>

Public Member Functions

 Segment (double ax, double ay, double bx, double by)
 Constructor, create segment from point (ax, ay) to point (bx, by)
 
 Segment (double array[4])
 Constructor, create segment from point (array[0], array[1]) to point (array[2], array[3])
 
 Segment (const Point &p1, const Point &p2)
 Constructor, create segment from point p1 to point p2.
 
double dist (const Point &p) const
 Compute the distance of p to this segment.
 
bool doesIntersect (const Segment &o) const
 Return true if o intersect this segment.
 
Point getMiddlePoint () const
 Return the middle point.
 

Public Attributes

Point a
 Start point.
 
Point b
 End point.
 

Detailed Description

A segment in a 2D space, basically two points.


The documentation for this struct was generated from the following file: