

Public Member Functions | |
| Line (Point *_p1, Point *_p2) | |
| virtual | ~Line () |
| virtual void | setMaxV (const TrajectoryConstraints &constr) |
| virtual double | getLength () const |
| Length of the segment in meters. | |
| double | getAngle () |
| virtual void | getPointAt (double distance, Point *p) |
Returns the point of the segment, located at the specific distance from the beginning or end. | |
| virtual void | shortenBy (double distance, Point *newEnd) |
| Shorten the segment by a specific length. | |
| virtual TrajectorySegment * | splitAt (double distance, Point *newEnd) |
| Splits the segment at the specified point. | |
| virtual void | getRefPos (double time, Pos &rp) |
| Return the reference position at some time. | |
Private Attributes | |
| Point * | p1 |
| Point * | p2 |
| double | angle |
| double | length |
| double | cosphi |
| double | sinphi |
Definition at line 39 of file trgen.cc.
| virtual double Segment::Line::getLength | ( | ) | const [inline, virtual] |
Length of the segment in meters.
Implements TrajectorySegment.
Definition at line 58 of file trgen.cc.
References length.
| virtual void Segment::Line::getPointAt | ( | double | distance, | |
| Point * | p | |||
| ) | [inline, virtual] |
Returns the point of the segment, located at the specific distance from the beginning or end.
| [in] | distance | Distance from the beginning (if positive) or end (if negative) of the segment in meters. |
| [out] | p | Pointer to the point to sore the result. |
Implements TrajectorySegment.
Definition at line 61 of file trgen.cc.
References length, p1, p2, Point::x, and Point::y.
Referenced by shortenBy(), and splitAt().

| virtual void Segment::Line::shortenBy | ( | double | distance, | |
| Point * | newEnd | |||
| ) | [inline, virtual] |
Shorten the segment by a specific length.
| [in] | distance | Distance from the end (if positive) of the segment, where should be the end of the segment. |
| [in] | newEnd | Point which will be set to the position of the new end. |
Implements TrajectorySegment.
Definition at line 72 of file trgen.cc.
References getPointAt(), length, p1, and p2.

| virtual TrajectorySegment* Segment::Line::splitAt | ( | double | distance, | |
| Point * | newEnd | |||
| ) | [inline, virtual] |
Splits the segment at the specified point.
The result will be two segments following the same trajectory as the original one.
| [in] | distance | Distance of the split from the beginning of the segment. |
| [in] | newEnd | Point which will be used as a middle point joining the two segments. |
Implements TrajectorySegment.
Definition at line 83 of file trgen.cc.
References dbgPrintf, getPointAt(), length, Line(), p1, and p2.

| virtual void Segment::Line::getRefPos | ( | double | time, | |
| Pos & | rp | |||
| ) | [inline, virtual] |
Return the reference position at some time.
| [in] | time | Time (within this segment time range). |
| [out] | rp | Reference position. |
Implements TrajectorySegment.
Definition at line 98 of file trgen.cc.
References TrajectorySegment::acc, angle, cosphi, Pos::omega, p1, Pos::phi, sinphi, TrajectorySegment::t1, TrajectorySegment::t2, Pos::v, TrajectorySegment::v1, TrajectorySegment::v2, Point::x, Pos::x, Point::y, and Pos::y.
1.5.3