bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
bitrl::utils::geom::Circle Class Reference

The Circle class. Models a common circle. More...

#include <circle.h>

Public Member Functions

 Circle (real_t r)
 Construct a circle centerd at the origin.
 
 Circle (real_t r, const GeomPoint< 2 > &center)
 Construct a circle given its radius and center.
 
real_t radius () const noexcept
 Returns the radius of the circle.
 
GeomPoint< 2 > center () const noexcept
 Returns the center of the circle.
 
real_t area () const
 Returns the area.
 
bool is_inside (const GeomPoint< 2 > &point, real_t tol=bitrl::consts::TOLERANCE) const
 Returns true if the given point lies inside the circle.
 
bool is_inside (const real_t x, const real_t y, real_t tol=bitrl::consts::TOLERANCE) const
 Returns true if the given spatial point (x, y) lies within the circle.
 

Detailed Description

The Circle class. Models a common circle.

Constructor & Destructor Documentation

◆ Circle() [1/2]

bitrl::utils::geom::Circle::Circle ( real_t  r)
inlineexplicit

Construct a circle centerd at the origin.

◆ Circle() [2/2]

bitrl::utils::geom::Circle::Circle ( real_t  r,
const GeomPoint< 2 > &  center 
)
inline

Construct a circle given its radius and center.

Member Function Documentation

◆ area()

real_t bitrl::utils::geom::Circle::area ( ) const
inline

Returns the area.

◆ center()

GeomPoint< 2 > bitrl::utils::geom::Circle::center ( ) const
inlinenoexcept

Returns the center of the circle.

◆ is_inside() [1/2]

bool bitrl::utils::geom::Circle::is_inside ( const GeomPoint< 2 > &  point,
real_t  tol = bitrl::consts::TOLERANCE 
) const
inline

Returns true if the given point lies inside the circle.

◆ is_inside() [2/2]

bool bitrl::utils::geom::Circle::is_inside ( const real_t  x,
const real_t  y,
real_t  tol = bitrl::consts::TOLERANCE 
) const
inline

Returns true if the given spatial point (x, y) lies within the circle.

◆ radius()

real_t bitrl::utils::geom::Circle::radius ( ) const
inlinenoexcept

Returns the radius of the circle.


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