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."
104 std::cerr <<
"Circle2D::assign(). radius must be positive value."
129 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
const double & radius() const
get the radius value
Definition circle_2d.h:147
virtual bool contains(const Vector2D &point) const
check if point is within this region
Definition circle_2d.h:127
virtual double area() const
get the area value of this circle
Definition circle_2d.h:116
bool HasIntersection(Line2D line)
HasIntersection : check that this Line2D Has Intersection with circle or not.
Definition circle_2d.cpp:363
int intersection(const Line2D &line, Vector2D *sol1, Vector2D *sol2) const
caluclate the intersection with straight line
Definition circle_2d.cpp:114
Circle2D(const Vector2D &c, const double &r)
construct with center point and radius value.
Definition circle_2d.h:77
static Circle2D circumcircle(const Vector2D &p0, const Vector2D &p1, const Vector2D &p2)
get the circle through three points (circumcircle of the triangle).
Definition circle_2d.cpp:312
const Vector2D & center() const
get the center point
Definition circle_2d.h:137
Vector2D nearestpoint(Vector2D pnt)
Intersect : If HasIntersection, return intersec point.
Definition circle_2d.cpp:391
const Circle2D & assign(const Vector2D &c, const double &r)
assign new value.
Definition circle_2d.h:97
Circle2D()
create a zero area circle at (0,0)
Definition circle_2d.h:67
2d straight line class
Definition line_2d.h:47
2D ray line class
Definition ray_2d.h:44
Region2D()
accessible only from derived classes
Definition region_2d.h:49
2d segment line class
Definition segment_2d.h:46
2D point vector class
Definition vector_2d.h:47
2d vector class Header File.
abstract 2D region class Header File.