Enki::Segment Struct Reference
[Some software bricks extracted from the An support library.]

#include <Geometry.h>

List of all members.


Detailed Description

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


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.

Public Attributes

Point a
 Start point.
Point b
 End point.


The documentation for this struct was generated from the following file:
Generated on Sun Mar 1 03:10:09 2009 for Enki by  doxygen 1.5.1