Inkscape
Vector Graphics Editor
|
Set of all points at a fixed distance from the center. More...
#include <circle.h>
Public Member Functions | |
Circle () | |
Circle (Coord cx, Coord cy, Coord r) | |
Circle (Point const ¢er, Coord r) | |
Circle (Coord A, Coord B, Coord C, Coord D) | |
Point | center () const |
Coord | center (Dim2 d) const |
Coord | radius () const |
Coord | area () const |
bool | isDegenerate () const |
void | setCenter (Point const &p) |
void | setRadius (Coord c) |
Rect | boundsFast () const |
Rect | boundsExact () const |
Point | initialPoint () const |
Point | finalPoint () const |
Point | pointAt (Coord t) const |
Coord | valueAt (Coord t, Dim2 d) const |
Coord | timeAt (Point const &p) const |
Coord | nearestTime (Point const &p) const |
bool | contains (Point const &p) const |
bool | contains (Rect const &other) const |
bool | contains (Circle const &other) const |
bool | intersects (Line const &l) const |
bool | intersects (LineSegment const &l) const |
bool | intersects (Circle const &other) const |
std::vector< ShapeIntersection > | intersect (Line const &other) const |
std::vector< ShapeIntersection > | intersect (LineSegment const &other) const |
std::vector< ShapeIntersection > | intersect (Circle const &other) const |
void | setCoefficients (Coord A, Coord B, Coord C, Coord D) |
void | coefficients (Coord &A, Coord &B, Coord &C, Coord &D) const |
std::vector< Coord > | coefficients () const |
Zoom | unitCircleTransform () const |
Zoom | inverseUnitCircleTransform () const |
EllipticalArc * | arc (Point const &initial, Point const &inner, Point const &final) const |
D2< SBasis > | toSBasis () const |
Circle & | operator*= (Translate const &t) |
Circle & | operator*= (Rotate const &) |
Circle & | operator*= (Zoom const &z) |
bool | operator== (Circle const &other) const |
void | fit (std::vector< Point > const &points) |
Fit the circle to the passed points using the least squares method. | |
Private Attributes | |
Point | _center |
Coord | _radius |
Definition at line 68 of file circle.h.
References D, and setCoefficients().
EllipticalArc * Geom::Circle::arc | ( | Point const & | initial, |
Point const & | inner, | ||
Point const & | final | ||
) | const |
inner | a point whose angle with the circle center is inside the angle that the arc spans |
Definition at line 254 of file circle.cpp.
References _center, _radius, Geom::Ellipse::arc(), inner(), Geom::X, and Geom::Y.
Referenced by Inkscape::LivePathEffect::path_from_piecewise_fix_cusps().
|
inline |
|
inline |
Definition at line 85 of file circle.h.
References boundsFast().
Rect Geom::Circle::boundsFast | ( | ) | const |
Definition at line 42 of file circle.cpp.
References _center, and _radius.
Referenced by boundsExact().
|
inline |
Definition at line 75 of file circle.h.
References _center.
Referenced by Geom::are_near(), Geom::PathSink::feed(), and wrap_circle().
std::vector< Coord > Geom::Circle::coefficients | ( | ) | const |
Definition at line 80 of file circle.cpp.
References c, and coefficients().
Referenced by coefficients().
bool Geom::Circle::contains | ( | Circle const & | other | ) | const |
Definition at line 137 of file circle.cpp.
References _center, _radius, and Geom::distance().
|
inline |
Definition at line 94 of file circle.h.
References _center, _radius, and Geom::distance().
Referenced by contains(), and intersect().
bool Geom::Circle::contains | ( | Rect const & | other | ) | const |
Definition at line 129 of file circle.cpp.
References contains(), and Geom::GenericRect< C >::corner().
|
inline |
Definition at line 88 of file circle.h.
References initialPoint().
void Geom::Circle::fit | ( | std::vector< Point > const & | points | ) |
Fit the circle to the passed points using the least squares method.
points | Samples at the perimeter of the circle |
Definition at line 282 of file circle.cpp.
References _center, _radius, Geom::distance(), and Geom::NL::LFMCircle::instance().
Referenced by tighten(), and wrap_circle().
Point Geom::Circle::initialPoint | ( | ) | const |
Definition at line 104 of file circle.cpp.
References _center, _radius, and Geom::X.
Referenced by finalPoint().
std::vector< ShapeIntersection > Geom::Circle::intersect | ( | Circle const & | other | ) | const |
Definition at line 205 of file circle.cpp.
References _center, contains(), Geom::Point::cw(), Geom::intersects, Geom::Point::length(), Geom::lerp(), R, radius(), result, and timeAt().
std::vector< ShapeIntersection > Geom::Circle::intersect | ( | Line const & | other | ) | const |
Definition at line 163 of file circle.cpp.
References _center, _radius, Geom::cross(), D, delta, Geom::Line::finalPoint(), Geom::Line::initialPoint(), Geom::Point::length(), result, timeAt(), Geom::Line::timeAt(), Geom::Line::vector(), Geom::Point::x(), and Geom::Point::y().
Referenced by intersect(), and Inkscape::LivePathEffect::path_from_piecewise_fix_cusps().
std::vector< ShapeIntersection > Geom::Circle::intersect | ( | LineSegment const & | other | ) | const |
Definition at line 198 of file circle.cpp.
References Geom::filter_line_segment_intersections(), intersect(), and result.
bool Geom::Circle::intersects | ( | Circle const & | other | ) | const |
Definition at line 155 of file circle.cpp.
References _center, _radius, and Geom::distance().
bool Geom::Circle::intersects | ( | Line const & | l | ) | const |
Definition at line 144 of file circle.cpp.
References _radius, Geom::cross(), D, delta, Geom::Line::finalPoint(), Geom::Line::initialPoint(), Geom::Point::length(), and Geom::Line::vector().
bool Geom::Circle::intersects | ( | LineSegment const & | l | ) | const |
Zoom Geom::Circle::inverseUnitCircleTransform | ( | ) | const |
Definition at line 94 of file circle.cpp.
|
inline |
Definition at line 125 of file circle.cpp.
References timeAt().
Definition at line 127 of file circle.h.
References _center, _radius, and Geom::Zoom::scale().
bool Geom::Circle::operator== | ( | Circle const & | other | ) | const |
Definition at line 261 of file circle.cpp.
Definition at line 111 of file circle.cpp.
|
inline |
Definition at line 77 of file circle.h.
References _radius.
Referenced by Geom::are_near(), Geom::PathSink::feed(), intersect(), and wrap_circle().
|
inline |
|
inline |
Definition at line 120 of file circle.cpp.
References _center, and Geom::atan2().
Referenced by intersect(), intersect(), and nearestTime().
Definition at line 268 of file circle.cpp.
References _center, _radius, Geom::cos(), and Geom::sin().
Referenced by Inkscape::UI::Tools::PencilTool::_addFreehandPoint().
Zoom Geom::Circle::unitCircleTransform | ( | ) | const |
Definition at line 88 of file circle.cpp.
|
private |
Definition at line 56 of file circle.h.
Referenced by arc(), boundsFast(), center(), center(), coefficients(), contains(), contains(), fit(), initialPoint(), intersect(), intersect(), intersects(), inverseUnitCircleTransform(), operator*=(), operator*=(), operator==(), pointAt(), setCenter(), setCoefficients(), timeAt(), toSBasis(), unitCircleTransform(), and valueAt().
|
private |
Definition at line 57 of file circle.h.
Referenced by arc(), area(), boundsFast(), coefficients(), contains(), contains(), fit(), initialPoint(), intersect(), intersects(), intersects(), inverseUnitCircleTransform(), isDegenerate(), operator*=(), operator==(), pointAt(), radius(), setCoefficients(), setRadius(), toSBasis(), unitCircleTransform(), and valueAt().