Thunderbots Project
Loading...
Searching...
No Matches
Circle Class Referencefinal

#include <circle.h>

Inheritance diagram for Circle:
Collaboration diagram for Circle:

Public Member Functions

 Circle ()
 
 Circle (const Point &origin, double radius)
 
const Pointorigin () const
 
double radius () const
 
double area () const override
 

Detailed Description

A circle with a radius and point representing the origin of the circle.

Constructor & Destructor Documentation

◆ Circle() [1/2]

Circle ( )
explicit

Creates a Circle at origin (0,0) and radius 0.

◆ Circle() [2/2]

Circle ( const Point origin,
double  radius 
)
explicit

Creates a Circle with arbitrary origin and radius.

Parameters
originthe origin of the Circle
radiusthe radius of the Circle
Exceptions
std::invalid_argumentif passed a negative radius.

Member Function Documentation

◆ area()

double area ( ) const
overridevirtual

Returns the area of this Circle.

Returns
the area of this Circle.

Implements ConvexShape.

◆ origin()

const Point & origin ( ) const

Returns the origin of this Circle.

Returns
the origin of this Circle.

◆ radius()

double radius ( ) const

Returns the radius of this Circle.

Returns
the radius of this Circle.

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