32#ifndef RCSC_GEOM_SECTOR2D_H
33#define RCSC_GEOM_SECTOR2D_H
130 return M_angle_left_start;
140 return M_angle_right_end;
159 double d2 = rel.
r2();
160 return ( M_min_radius * M_min_radius <= d2
161 && d2 <= M_max_radius * M_max_radius
163 M_angle_right_end ) );
172 double div = ( M_angle_right_end - M_angle_left_start ).degree();
177 return ( 2.0 * M_min_radius *
M_PI ) * ( div / 360.0 );
186 double div = ( M_angle_right_end - M_angle_left_start ).degree();
191 return ( 2.0 * M_max_radius *
M_PI ) * ( div / 360.0 );
#define M_PI
PI value macro.
Definition angle_deg.cpp:43
degree wrapper class
Definition angle_deg.h:45
bool isWithin(const AngleDeg &left, const AngleDeg &right) const
check if this angle is within [left, right] (turn clockwise).
Definition angle_deg.cpp:60
Region2D()
accessible only from derived classes
Definition region_2d.h:49
double getCircumferenceMin() const
get smaller side circumference(ENSYUU NO NAGASA)
Definition sector_2d.h:170
virtual double area() const
calculate the area of this region
Definition sector_2d.cpp:106
const double & radiusMax() const
get the big side radius
Definition sector_2d.h:118
const Vector2D & center() const
get the center point
Definition sector_2d.h:98
const Sector2D & assign(const Vector2D &c, const double &min_r, const double &max_r, const AngleDeg &start, const AngleDeg &end)
assign new value
Definition sector_2d.cpp:73
virtual bool contains(const Vector2D &point) const
check if point is within this region
Definition sector_2d.h:156
const double & radiusMin() const
get the small side radius
Definition sector_2d.h:108
double getCircumferenceMax() const
get bigger side circumference(ENSYUU NO NAGASA)
Definition sector_2d.h:184
const AngleDeg & angleLeftStart() const
get the left start angle
Definition sector_2d.h:128
const AngleDeg & angleRightEnd() const
get the right end angle
Definition sector_2d.h:138
2D point vector class
Definition vector_2d.h:47
AngleDeg th() const
get the angle of vector.
Definition vector_2d.h:194
double r2() const
get the squared length of vector.
Definition vector_2d.h:139
2d vector class Header File.
abstract 2D region class Header File.