Public Member Functions

Segment::Line Class Reference

#include <trgen.h>

Inherits TrajectorySegment.

Collaboration diagram for Segment::Line:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Line (Point *_p1, Point *_p2)
virtual void setMaxV (const TrajectoryConstraints &constr)
virtual double getLength () const
 Length of the segment in meters.
virtual double getDistance (double time) const
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 TrajectorySegmentsplitAt (double distance, Point *newEnd)
 Splits the segment at the specified point.
virtual TrajectorySegmentsplitAtByTime (double time, Point *newEnd)
virtual void getRefPos (double time, Pos &rp)
 Return the reference position at some time.

Constructor & Destructor Documentation

Segment::Line::Line ( Point _p1,
Point _p2 
)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

double Segment::Line::getAngle (  )  [inline]
double Segment::Line::getDistance ( double  time  )  const [virtual]

Implements TrajectorySegment.

virtual double Segment::Line::getLength (  )  const [inline, virtual]

Length of the segment in meters.

Implements TrajectorySegment.

void Segment::Line::getPointAt ( double  distance,
Point p 
) [virtual]

Returns the point of the segment, located at the specific distance from the beginning or end.

Parameters:
[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.

Here is the caller graph for this function:

void Segment::Line::getRefPos ( double  time,
Pos rp 
) [virtual]

Return the reference position at some time.

Parameters:
[in] time Time (within this segment time range).
[out] rp Reference position.

Implements TrajectorySegment.

void Segment::Line::setMaxV ( const TrajectoryConstraints constr  )  [virtual]

Implements TrajectorySegment.

void Segment::Line::shortenBy ( double  distance,
Point newEnd 
) [virtual]

Shorten the segment by a specific length.

Parameters:
[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.

Here is the call graph for this function:

TrajectorySegment * Segment::Line::splitAt ( double  distance,
Point newEnd 
) [virtual]

Splits the segment at the specified point.

The result will be two segments following the same trajectory as the original one.

Parameters:
[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.
Returns:
Pointer to the newly created segment.

Implements TrajectorySegment.

Here is the call graph for this function:

TrajectorySegment * Segment::Line::splitAtByTime ( double  time,
Point newEnd 
) [virtual]

Implements TrajectorySegment.

Here is the call graph for this function:


The documentation for this class was generated from the following files: