bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
intro_example_1::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=bitsim::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=bitsim::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]

Construct a circle centerd at the origin.

◆ Circle() [2/2]

bitsim::geometry::Circle::Circle ( real_t r,
const GeomPoint< 2 > & center )
inline

Construct a circle given its radius and center.

Member Function Documentation

◆ area()

Returns the area.

◆ center()

GeomPoint< 2 > bitsim::geometry::Circle::center ( ) const
inlinenoexcept

Returns the center of the circle.

◆ is_inside() [1/2]

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

Returns true if the given point lies inside the circle.

◆ is_inside() [2/2]

bool bitsim::geometry::Circle::is_inside ( const real_t x,
const real_t y,
real_t tol = bitsim::consts::TOLERANCE ) const
inline

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

◆ radius()

real_t bitsim::geometry::Circle::radius ( ) const
inlinenoexcept

Returns the radius of the circle.


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