base
Public Member Functions | Public Attributes | List of all members
base::AngleSegment Class Reference

#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< AngleSegmentsplit (const Angle &angle)
 
std::vector< AngleSegmentgetIntersections (const AngleSegment &b) const
 
double getWidth () const
 
base::Angle getStart () const
 
base::Angle getEnd () const
 

Public Attributes

double width
 
double startRad
 
double endRad
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AngleSegment() [1/2]

base::AngleSegment::AngleSegment ( )

◆ AngleSegment() [2/2]

base::AngleSegment::AngleSegment ( const Angle start,
double  _width 
)

Member Function Documentation

◆ getEnd()

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;

Returns
the end angle of the segement

◆ getIntersections()

std::vector< AngleSegment > base::AngleSegment::getIntersections ( const AngleSegment b) const

Calulates the intersections of this and the given segment.

Parameters
bThe segment wich schould be tested
Returns
A vector, containing a segment for each intersecting part of the segments.

◆ getStart()

Angle base::AngleSegment::getStart ( ) const

Returns the start angle of the segement

Returns
the start angle of the segement

◆ getWidth()

double base::AngleSegment::getWidth ( ) const
inline

Returns the width of the segment in radians

Returns
the width in radians

◆ isInside() [1/2]

bool base::AngleSegment::isInside ( const Angle angle) const

Tests if the given angle is inside of the segment.

Parameters
angle- angle to be tested
Returns
true if angle is inside the segment

◆ isInside() [2/2]

bool base::AngleSegment::isInside ( const AngleSegment segment) const

Tests if the given segment is inside of this segment.

Parameters
segment- segment to be tested
Returns
true if the given segment is inside of this segment

◆ split() [1/2]

bool base::AngleSegment::split ( const Angle angle,
AngleSegment rest 
)
inline

◆ split() [2/2]

std::vector<AngleSegment> base::AngleSegment::split ( const Angle angle)
inline

Member Data Documentation

◆ endRad

double base::AngleSegment::endRad

End angle of the segment

◆ startRad

double base::AngleSegment::startRad

Start angle of the segment

◆ width

double base::AngleSegment::width

Widht of the segment in radians


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