32#ifndef RCSC_GEOM_CIRCLE2D_H
33#define RCSC_GEOM_CIRCLE2D_H
60 static const double EPSILON;
68 : M_center( 0.0, 0.0 ),
84 std::cerr <<
"Circle2D::Circle2D(). radius must be positive value."
103 std::cerr <<
"Circle2D::assign(). radius must be positive value."
128 return M_center.
dist2( point ) < M_radius * M_radius;
static const double PI
pi valur
Definition: angle_deg.h:63
2d circle class
Definition: circle_2d.h:51
int intersection(const Segment2D &segment, Vector2D *sol1, Vector2D *sol2) const
calculate the intersection with segment line
virtual bool contains(const Vector2D &point) const
check if point is within this region
Definition: circle_2d.h:126
virtual double area() const
get the area value of this circle
Definition: circle_2d.h:115
Circle2D(const Vector2D &c, const double r)
construct with center point and radius value.
Definition: circle_2d.h:77
int intersection(const Line2D &line, Vector2D *sol1, Vector2D *sol2) const
caluclate the intersection with straight line
int intersection(const Ray2D &ray, Vector2D *sol1, Vector2D *sol2) const
calculate the intersection with ray line
const Vector2D & center() const
get the center point
Definition: circle_2d.h:135
double radius() const
get the radius value
Definition: circle_2d.h:144
int intersection(const Circle2D &circle, Vector2D *sol1, Vector2D *sol2) const
calculate the intersection with another circle
const Circle2D & assign(const Vector2D &c, const double r)
assign new value.
Definition: circle_2d.h:96
static bool contains(const Vector2D &point, const Vector2D &p0, const Vector2D &p1, const Vector2D &p2)
check if the circumcircle contains the input point
Circle2D()
create a zero area circle at (0,0)
Definition: circle_2d.h:67
static Circle2D circumcircle(const Vector2D &p0, const Vector2D &p1, const Vector2D &p2)
get the circle through three points (circumcircle of the triangle).
2d straight line class
Definition: line_2d.h:47
2D ray line class
Definition: ray_2d.h:44
abstract 2D region class
Definition: region_2d.h:43
2d segment line class
Definition: segment_2d.h:46
2D point vector class
Definition: vector_2d.h:46
double dist2(const Vector2D &p) const
get the squared distance from this to 'p'.
Definition: vector_2d.h:347
abstract 2D region class Header File.
2d vector class Header File.