GT RoboCup SSL
Soccer software, robot firmware
Geometry2d::Arc Class Reference

An arc (a segment of a circle) specified by a center point, a radius and a starting and ending angle. More...

Public Member Functions

 Arc ()
 Default-initialze an arc to the empty arc.
 
 Arc (Point center, float radius, float start, float end)
 Initialize an arc with a given center, radius, and starting and ending angle (in radians). More...
 
Point center () const
 
void setCenter (Point center)
 
float radius () const
 
void setRadius (float radius)
 
float start () const
 
void setStart (float start)
 
float end () const
 
void setEnd (float end)
 
float radius_sq () const
 
std::vector< Pointintersects (const Line &line) const
 
std::vector< Pointintersects (const Segment &segment) const
 

Detailed Description

An arc (a segment of a circle) specified by a center point, a radius and a starting and ending angle.

Note
: the starting and ending angles should be in the range [-M_PI, M_PI] or intersection functions will not work as expected. In addition, start should be less than or equal to end

Constructor & Destructor Documentation

◆ Arc()

Geometry2d::Arc::Arc ( Point  center,
float  radius,
float  start,
float  end 
)
inline

Initialize an arc with a given center, radius, and starting and ending angle (in radians).

Parameters
centerthe center point of the characteristic circle
radiusthe radius of the characteristic circle
startthe starting angle in radians in the range [-M_PI, M_PI]
endthe ending angle in radians in the range [-M_PI, M_PI]
Note
angle 0 radians is aligned with the x axis.

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