base
|
#include <Angle.hpp>
Public Member Functions | |
AngleSegment () | |
AngleSegment (const Angle &start, double _width) | |
bool | isInside (const Angle &angle) const |
bool | isInside (const AngleSegment &segment) const |
bool | split (const Angle &angle, AngleSegment &rest) |
std::vector< AngleSegment > | split (const Angle &angle) |
std::vector< AngleSegment > | getIntersections (const AngleSegment &b) const |
double | getWidth () const |
base::Angle | getStart () const |
base::Angle | getEnd () const |
Public Attributes | |
double | width |
double | startRad |
double | endRad |
This class represents a Segment of a Circle. This is primary a helper class for doing test if an Angle is inside a certain angle interval.
base::AngleSegment::AngleSegment | ( | ) |
base::AngleSegment::AngleSegment | ( | const Angle & | start, |
double | _width | ||
) |
Angle base::AngleSegment::getEnd | ( | ) | const |
Returns the end angle of the segement Note, as the return value is normalized, using it for computation may result in unexpected behaviour. Better use getStart + getWidth;
std::vector< AngleSegment > base::AngleSegment::getIntersections | ( | const AngleSegment & | b | ) | const |
Calulates the intersections of this and the given segment.
b | The segment wich schould be tested |
Angle base::AngleSegment::getStart | ( | ) | const |
Returns the start angle of the segement
|
inline |
Returns the width of the segment in radians
bool base::AngleSegment::isInside | ( | const Angle & | angle | ) | const |
Tests if the given angle is inside of the segment.
angle | - angle to be tested |
bool base::AngleSegment::isInside | ( | const AngleSegment & | segment | ) | const |
Tests if the given segment is inside of this segment.
segment | - segment to be tested |
|
inline |
|
inline |
double base::AngleSegment::endRad |
End angle of the segment
double base::AngleSegment::startRad |
Start angle of the segment
double base::AngleSegment::width |
Widht of the segment in radians