Segment::Turn Class Reference

Segment representing turn at one place. More...

Inheritance diagram for Segment::Turn:

Inheritance graph
[legend]
Collaboration diagram for Segment::Turn:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Turn (Point *_center, double _startHeading, double _turnBy)
 turning starts at this heading [rad]
virtual ~Turn ()
virtual void setMaxV (const TrajectoryConstraints &constr)
virtual double getMaxAcc (const TrajectoryConstraints &constr) const
virtual bool isTurn () const
virtual double getLength () const
 Length of the segment in meters.
virtual double getUnifiedLength () const
 Unified length of the segment, used for calculations of speed and accelerations.
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

Pointcenter
double turnBy
double startHeading
 turn by this angle [rad]


Detailed Description

Segment representing turn at one place.

Speed related variables v1, v2 and acc represents angular speed here.

Definition at line 262 of file trgen.cc.


Member Function Documentation

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

Length of the segment in meters.

Implements TrajectorySegment.

Definition at line 283 of file trgen.cc.

virtual double Segment::Turn::getUnifiedLength (  )  const [inline, virtual]

Unified length of the segment, used for calculations of speed and accelerations.

Normally, it equal to the real length, buf for TrajectorySegmentTurn (whose length is zero) it represents angle.

Reimplemented from TrajectorySegment.

Definition at line 284 of file trgen.cc.

References turnBy.

virtual void Segment::Turn::getPointAt ( double  distance,
Point p 
) [inline, 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.

Definition at line 288 of file trgen.cc.

References center.

virtual void Segment::Turn::shortenBy ( double  distance,
Point newEnd 
) [inline, 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.

Definition at line 291 of file trgen.cc.

virtual TrajectorySegment* Segment::Turn::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.

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.

Definition at line 293 of file trgen.cc.

References dbgPrintf, startHeading, Turn(), and turnBy.

Here is the call graph for this function:

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

Return the reference position at some time.

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

Implements TrajectorySegment.

Definition at line 308 of file trgen.cc.

References TrajectorySegment::acc, center, Pos::omega, Pos::phi, startHeading, TrajectorySegment::t1, TrajectorySegment::t2, turnBy, Pos::v, TrajectorySegment::v1, TrajectorySegment::v2, Point::x, Pos::x, Point::y, and Pos::y.


The documentation for this class was generated from the following file:
Generated on Thu Sep 13 11:28:30 2007 for DCE-Eurobot by  doxygen 1.5.3