#include <degreesegment.h>
Inherits AbstractTrackSection.
Inheritance diagram for DegreeSegment:
Public Member Functions | |
DegreeSegment (const Position &p, const double &angle) | |
Constructor. | |
DegreeSegment (const Matrix &position) | |
Constructor. | |
virtual | ~DegreeSegment () |
virtual double | getLength () |
returns the length of the segment, here it is the length of the arc | |
virtual double | getWidth () |
returns the width of the segment, | |
virtual void | setWidth (double w) |
sets the width of the segment, | |
virtual void | setCurveAngle (const double &alpha) |
virtual void | setRadius (const double &rad) |
virtual Matrix | getTransformedEndMatrix () |
gives the position and rotation(angle) of the segment at the end of the segment so that a new segment could be placed there if you want to place the new segment, you must muliplicate: getTransformedEndMatrix()*getPositionMatrix(); | |
virtual bool | isInside (const Position &p) |
returns true if the real coordinates lay inside of the segment | |
virtual double | getSectionIdValue (const Position &p) |
returns a value between 0 and 100 that tells at which section you are on the segment. | |
virtual double | getWidthIdValue (const Position &p) |
returns a value between 0 and 100 that tells at which width you are on the segment, more to right or more to the left. | |
virtual void | draw () |
draws the obstacle (4 boxes for the playground) | |
virtual void | create (dSpaceID space) |
virtual void | destroy () |
Protected Member Functions | |
void | setProperties () |
Position | getLocalCoordinates (double radius, double alpha) |
returns the local coordinates on the track at the given radius and angle that are responsible for the segment of the | |
Position | getGlobalCoordinates (double radius, double alpha) |
returns the global coordinates on the track at the given radius and angle that are responsible for the segment of the | |
Protected Attributes | |
double | radius |
double | width |
bool | show_aabb |
list< dGeomID > | innerWalls |
list< dGeomID > | outerWalls |
double | widthWall |
double | heightWall |
double | angle |
int | left |
bool | obstacle_exists |
Color | color |
obstacle color |
|
Constructor.
|
|
Constructor.
|
|
|
|
Implements AbstractTrackSection.
|
|
Implements AbstractTrackSection.
|
|
draws the obstacle (4 boxes for the playground)
Implements AbstractTrackSection.
|
|
returns the global coordinates on the track at the given radius and angle that are responsible for the segment of the
|
|
returns the length of the segment, here it is the length of the arc
Implements AbstractTrackSection.
|
|
returns the local coordinates on the track at the given radius and angle that are responsible for the segment of the
|
|
returns a value between 0 and 100 that tells at which section you are on the segment. 0 means you are on the beginning 100 means you are at the end returns -1 if no IdValue can be given Implements AbstractTrackSection.
|
|
gives the position and rotation(angle) of the segment at the end of the segment so that a new segment could be placed there if you want to place the new segment, you must muliplicate: getTransformedEndMatrix()*getPositionMatrix();
Implements AbstractTrackSection.
|
|
returns the width of the segment,
Implements AbstractTrackSection.
|
|
returns a value between 0 and 100 that tells at which width you are on the segment, more to right or more to the left. 0 means you are on the left 50 means you are in the middle 100 means you are on the right returns -1 if no WidthValue can be given Implements AbstractTrackSection.
|
|
returns true if the real coordinates lay inside of the segment
Implements AbstractTrackSection.
|
|
|
|
|
|
|
|
sets the width of the segment,
Implements AbstractTrackSection.
|
|
|
|
obstacle color
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|