|
VisiLibity v1 Source Code 1.0
|
line segment in the plane represented by its endpoints More...
#include <visilibity.hpp>
Public Member Functions | |
| Line_Segment () | |
| default to empty | |
| Line_Segment (const Line_Segment &line_segment_temp) | |
| copy constructor | |
| Line_Segment (const Point &point_temp) | |
| construct degenerate segment from a single Point | |
| Line_Segment (const Point &first_point_temp, const Point &second_point_temp, double epsilon=0) | |
| Line_Segment pointing from first_point_temp to second_point_temp. | |
| Point | first () const |
| first endpoint More... | |
| Point | second () const |
| second endpoint More... | |
| unsigned | size () const |
| number of distinct endpoints More... | |
| Point | midpoint () const |
| midpoint More... | |
| double | length () const |
| Euclidean length. More... | |
| bool | is_in_standard_form () const |
| true iff vertices in lex. order More... | |
| Line_Segment & | operator= (const Line_Segment &line_segment_temp) |
| assignment operator | |
| void | set_first (const Point &point_temp, double epsilon=0.0) |
| set first endpoint More... | |
| void | set_second (const Point &point_temp, double epsilon=0.0) |
| set second endpoint More... | |
| void | reverse () |
| reverse order of endpoints More... | |
| void | enforce_standard_form () |
| enforce that lex. smallest endpoint first More... | |
| void | clear () |
| erase both endpoints and set line segment empty (size 0) | |
| virtual | ~Line_Segment () |
| destructor | |
Protected Attributes | |
| Point * | endpoints_ |
| unsigned | size_ |
line segment in the plane represented by its endpoints
Closed and oriented line segment in the plane represented by its endpoints.
| void VisiLibity::Line_Segment::enforce_standard_form | ( | ) |
enforce that lex. smallest endpoint first
| Point VisiLibity::Line_Segment::first | ( | ) | const |
| bool VisiLibity::Line_Segment::is_in_standard_form | ( | ) | const |
true iff vertices in lex. order
| double VisiLibity::Line_Segment::length | ( | ) | const |
Euclidean length.
| void VisiLibity::Line_Segment::reverse | ( | ) |
reverse order of endpoints
| Point VisiLibity::Line_Segment::second | ( | ) | const |
| void VisiLibity::Line_Segment::set_first | ( | const Point & | point_temp, |
| double | epsilon = 0.0 |
||
| ) |
set first endpoint
| void VisiLibity::Line_Segment::set_second | ( | const Point & | point_temp, |
| double | epsilon = 0.0 |
||
| ) |
set second endpoint
|
inline |
number of distinct endpoints