iLab Neuromorphic Robotics Toolkit
0.1
|
#include <nrt/Core/Geometry/Circle.H>
A simple representation of a circle.
Public Member Functions | |
Circle () | |
Default constructor - creates a Circle with both ends at (0,0) | |
Circle (Point2D< T > const ¢er, T const &radius) | |
Construct a Circle from the center and the radius. | |
Circle (T cx, T cy, T radius) | |
Construct a Circle from the given x and y coordinates and radius. | |
Circle (Circle< T > const &other)=default | |
Copy Constructor. | |
Circle (Circle< T > &&other)=default | |
Move constructor. | |
template<class U > | |
Circle (Circle< U > const &other) | |
Conversion copy constructor, uses nrt::clamped_convert<T,U> internally. | |
Circle< T > & | operator= (Circle< T > const &other)=default |
Assignment. | |
Circle< T > & | operator= (Circle< T > &&other)=default |
Move assignment. | |
Point2D< T > const & | center () const |
Get the center. | |
T const & | radius () const |
Get the radius. | |
double | area () const |
Calculate the area. | |
double | circumference () const |
Calculate the circumference. | |
template<class U > | |
bool | contains (Point2D< U > const &p) const |
Calculate whether the given point lies within this circle. More... | |
Protected Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar) |
Friends | |
class | cereal::access |
Related Functions | |
(Note that these are not member functions.) | |
template<class T > | |
std::ostream & | operator<< (std::ostream &out, Circle< T > const &circle) |
Human-readable output to a stream: outputs "c:<center> r:<radius>". More... | |
template<class T > | |
Circle< T > | scale (Circle< T > const &src, double const factor) |
Return a scaled version of the source object. More... | |
template<class T > | |
Circle< T > | rotate (Circle< T > const &src, double const angle) |
Return a rotated version of the source object, about its center by a given angle in radians. More... | |
template<class T > | |
Circle< T > | rotateAbout (Circle< T > const &src, Point2D< T > const &p, double const angle) |
Return a rotated version of the source object, about the given point and by a given angle in radians. More... | |
template<class T > | |
bool | operator== (Circle< T > const &lhs, Circle< T > const &rhs) |
Operator overload for Circle<T> == Circle<T> More... | |
template<class T > | |
bool | operator!= (Circle< T > const &lhs, Circle< T > const &rhs) |
Operator overload for Circle<T> != Circle<T> More... | |
template<class T > | |
Circle< T > | operator+ (Circle< T > const &lhs, Point2D< T > const &rhs) |
Operator overload for Circle<T> + Point2D<T> More... | |
template<class T > | |
Circle< T > | operator+ (Point2D< T > const &lhs, Circle< T > const &rhs) |
Operator overload for Point2D<T> + Circle<T> More... | |
template<class T > | |
Circle< T > | operator- (Circle< T > const &lhs, Point2D< T > const &rhs) |
Operator overload for Circle<T> - Point2D<T> More... | |
template<class T > | |
Circle< T > | operator- (Point2D< T > const &lhs, Circle< T > const &rhs) |
Operator overload for Point2D<T> - Circle<T> More... | |
template<class T > | |
Circle< T > | operator* (Circle< T > const &lhs, double const rhs) |
Operator overload for Circle<T> * double. More... | |
template<class T > | |
Circle< T > | operator* (double const lhs, Circle< T > const &rhs) |
Operator overload for double * Circle<T> More... | |
template<class T > | |
Circle< T > | operator/ (Circle< T > const &lhs, double const rhs) |
Operator overload for Circle<T> / double. More... | |
template<class T > | |
Circle< T > & | operator*= (Circle< T > &lhs, double const rhs) |
Operator overload for Circle<T> *= double. More... | |
template<class T > | |
Circle< T > & | operator/= (Circle< T > &lhs, double const rhs) |
Operator overload for Circle<T> /= double. More... | |
|
inline |
Calculate whether the given point lies within this circle.
This test is inclusive, such that points that are "radius" away from the center if the circle are considered to be contained in the circle
Definition at line 82 of file CircleImpl.H.
|
related |
Human-readable output to a stream: outputs "c:<center> r:<radius>".
Return a scaled version of the source object.
Referenced by nrt::inplaceNormalize().
Return a rotated version of the source object, about its center by a given angle in radians.
For circle this operation is a no-op. It is provided for compatibility with other geometric primitives
|
related |
Return a rotated version of the source object, about the given point and by a given angle in radians.
Operator overload for Circle<T> == Circle<T>
Operator overload for Circle<T> != Circle<T>
|
related |
Operator overload for Circle<T> + Point2D<T>
|
related |
Operator overload for Point2D<T> + Circle<T>
|
related |
Operator overload for Circle<T> - Point2D<T>
|
related |
Operator overload for Point2D<T> - Circle<T>
Operator overload for Circle<T> * double.
Operator overload for double * Circle<T>
Operator overload for Circle<T> / double.
Operator overload for Circle<T> *= double.
Operator overload for Circle<T> /= double.