Thunderbots Project
Loading...
Searching...
No Matches
Stadium Class Reference

#include <stadium.h>

Inheritance diagram for Stadium:
Collaboration diagram for Stadium:

Public Member Functions

 Stadium ()=delete
 
 Stadium (const Segment &segment, double radius)
 
 Stadium (const Point &point1, const Point &point2, double radius)
 
 Stadium (const Point &point, const Vector &vector, double radius)
 
Segment segment () const
 
double radius () const
 
Polygon innerRectangle () const
 
double area () const override
 

Detailed Description

A tube/stadium/pill/discorectangle shape with a radius and a line segment

Constructor & Destructor Documentation

◆ Stadium() [1/4]

Stadium ( )
delete

Creates a Stadium with radius 0 and line segment from (0,0) to (0,0)

◆ Stadium() [2/4]

Stadium ( const Segment segment,
double  radius 
)
explicit

Creates a Stadium with arbitrary line segment and radius

Parameters
lengththe line segment between the centers of the two semicircles of the Stadium
radiusthe radius of the two semicircles of the Stadium

◆ Stadium() [3/4]

Stadium ( const Point point1,
const Point point2,
double  radius 
)
explicit

Creates a Stadium with line segment between two arbitrary points and radius

Parameters
point1the center of the first semicircle of the Stadium
point2the center of the second semicircle of the Stadium
radiusthe radius of the two semicircles of the Stadium

◆ Stadium() [4/4]

Stadium ( const Point point,
const Vector vector,
double  radius 
)
explicit

Creates a Stadium with a line segment between arbitrary point and vector originating from said point

Parameters
pointthe center of the first semicircle of the Stadium
vectorthe vector from the center of the first semicircle of the Stadium to the second
radiusthe radius of the two semicircles of the Stadium

Member Function Documentation

◆ area()

double area ( ) const
overridevirtual

Returns the area of this Stadium

Returns
the area of this Stadium

Implements ConvexShape.

◆ innerRectangle()

Polygon innerRectangle ( ) const

Returns the inner rectangle of this Stadium

Returns
the inner rectangle of this Stadium

◆ radius()

double radius ( ) const

Returns the radius of the semicircles of this Stadium

Returns
the radius of the semicircles of this Stadium

◆ segment()

Segment segment ( ) const

Returns the line Segment between the centers of the semicircles of this Stadium

Returns
the line segment between the centers of the semicircles of this Stadium

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