Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DegreeSegment Class Reference

class for degree segments More...

#include <degreesegment.h>

Inheritance diagram for DegreeSegment:
Collaboration diagram for DegreeSegment:

Public Member Functions

 DegreeSegment (const Position &p, const double &angle)
 Constructor. More...
 
 DegreeSegment (const Matrix &position)
 Constructor. More...
 
virtual ~DegreeSegment ()
 
virtual double getLength ()
 returns the length of the segment, here it is the length of the arc More...
 
virtual double getWidth ()
 returns the width of the segment, More...
 
virtual void setWidth (double w)
 sets the width of the segment, More...
 
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(); More...
 
virtual bool isInside (const Position &p)
 returns true if the real coordinates lay inside of the segment More...
 
virtual double getSectionIdValue (const Position &p)
 returns a value between 0 and 100 that tells at which section you are on the segment. More...
 
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. More...
 
virtual void draw ()
 draws the obstacle (4 boxes for the playground) More...
 
virtual void create (dSpaceID space)
 
virtual void destroy ()
 
- Public Member Functions inherited from AbstractTrackSection
 AbstractTrackSection (const Position &p, const double angle)
 Constructor, segment is initialized with Position (0,0,0) and a rotation angle=0. More...
 
 AbstractTrackSection (const Matrix &pose)
 Constructor where you can set the pos-matrix by this constructor: More...
 
virtual ~AbstractTrackSection ()
 
Matrix getPoseMatrix ()
 
Position transformToLocalCoord (const Position &p)
 
Position transformToGlobalCoord (const Position &p)
 
Matrix getInversePoseMatrix ()
 

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 More...
 
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 More...
 
- Protected Member Functions inherited from AbstractTrackSection
void setPoseMatrix (const Matrix &m)
 
Position getPosition ()
 gives actual position of the obstacle More...
 

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 More...
 

Detailed Description

class for degree segments

Constructor & Destructor Documentation

DegreeSegment ( const Position p,
const double &  angle 
)

Constructor.

DegreeSegment ( const Matrix position)

Constructor.

virtual ~DegreeSegment ( )
inlinevirtual

Member Function Documentation

void create ( dSpaceID  space)
virtual

Implements AbstractTrackSection.

void destroy ( )
virtual

Implements AbstractTrackSection.

void draw ( )
virtual

draws the obstacle (4 boxes for the playground)

Implements AbstractTrackSection.

Position getGlobalCoordinates ( double  radius,
double  alpha 
)
protected

returns the global coordinates on the track at the given radius and angle that are responsible for the segment of the

double getLength ( )
virtual

returns the length of the segment, here it is the length of the arc

returns the length of the segment, here it is the length of the arc formula is: radius * angle;

Implements AbstractTrackSection.

Position getLocalCoordinates ( double  radius,
double  alpha 
)
protected

returns the local coordinates on the track at the given radius and angle that are responsible for the segment of the

double getSectionIdValue ( const Position p)
virtual

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.

Matrix getTransformedEndMatrix ( )
virtual

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();

gives the position and rotation(angle) of the segment at the end of the segment so that a new segment could be placed there

Implements AbstractTrackSection.

double getWidth ( )
virtual

returns the width of the segment,

Implements AbstractTrackSection.

double getWidthIdValue ( const Position p)
virtual

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.

bool isInside ( const Position p)
virtual

returns true if the real coordinates lay inside of the segment

Implements AbstractTrackSection.

void setCurveAngle ( const double &  alpha)
virtual
void setProperties ( )
protected
void setRadius ( const double &  rad)
virtual
void setWidth ( double  w)
virtual

sets the width of the segment,

Implements AbstractTrackSection.

Member Data Documentation

double angle
protected
Color color
protected

obstacle color

double heightWall
protected
list<dGeomID> innerWalls
protected
int left
protected
bool obstacle_exists
protected
list<dGeomID> outerWalls
protected
double radius
protected
bool show_aabb
protected
double width
protected
double widthWall
protected

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