◆ Segment() [1/2]
Creates a degenerate Segment at (0, 0)
◆ Segment() [2/2]
Creates a Segment that starts and ends at the given points
◆ getEnd()
| const Point & getEnd |
( |
| ) |
const |
Gets the end point of the segment
- Returns
- end point of segment
◆ getStart()
| const Point & getStart |
( |
| ) |
const |
Gets the start point of the segment
- Returns
- start point of segment
◆ length()
Gets the length of the segment
- Returns
- length of segment
◆ lengthSquared()
| double lengthSquared |
( |
| ) |
const |
Gets the squared length of the segment
- Returns
- squared length of segment
◆ midPoint()
Gets mid point of the Segment, halfway between the start and end points
- Returns
- mid point
◆ operator==()
| bool operator== |
( |
const Segment & |
other | ) |
const |
Compares with another segment for equality
- Parameters
-
- Returns
- true if segment is equal to other, and false otherwise.
◆ reverse()
Creates a Segment that is reversed
- Returns
- reversed segment
◆ setEnd()
Sets the end point of the segment to o
- Parameters
-
| o | new end point of segment |
◆ setStart()
Sets the start point of the segment to o
- Parameters
-
| o | new start point of segment |
◆ toVector()
Makes a Vector out of this Segment
- Returns
- vector representation of the segment
The documentation for this class was generated from the following files:
- src/software/geom/segment.h
- src/software/geom/segment.cpp