|
GEOS 3.13.1
|
#include <CircularArc.h>
Public Types | |
| using | CoordinateXY = geom::CoordinateXY |
Public Member Functions | |
| CircularArc (const CoordinateXY &q0, const CoordinateXY &q1, const CoordinateXY &q2) | |
| int | orientation () const |
| const CoordinateXY & | getCenter () const |
| Return the center point of the circle associated with this arc. | |
| double | getRadius () const |
| Return the radius of the circle associated with this arc. | |
| bool | isCircle () const |
| Return whether this arc forms a complete circle. | |
| bool | isLinear () const |
| Returns whether this arc forms a straight line (p0, p1, and p2 are collinear) | |
| double | getAngle () const |
| Return the inner angle of the sector associated with this arc. | |
| double | getLength () const |
| Return the length of the arc. | |
| double | getArea () const |
| Return the area enclosed by the arc p0-p1-p2 and the line segment p2-p0. | |
| double | theta0 () const |
| Return the angle of p0. | |
| double | theta2 () const |
| Return the angle of p2. | |
| bool | containsPointOnCircle (const CoordinateXY &q) const |
| bool | containsPoint (const CoordinateXY &q) |
| bool | containsAngle (double theta) const |
| Check to see if a given angle lies on this arc. | |
| bool | isUpwardAtPoint (const CoordinateXY &q) const |
| Iterator | begin () const |
| Iterator | end () const |
Public Attributes | |
| const CoordinateXY & | p0 |
| const CoordinateXY & | p1 |
| const CoordinateXY & | p2 |
A CircularArc is a reference to three points that define a circular arc. It provides for the lazy calculation of various arc properties such as the center, radius, and orientation
|
inline |
Check to see if a coordinate lies on the arc, after testing whether it lies on the circle.
References geos::geom::BOUNDARY, containsPointOnCircle(), getCenter(), getRadius(), and geos::triangulate::quadedge::TrianglePredicate::isInCircleNormalized().
|
inline |
Check to see if a coordinate lies on the arc Only the angle is checked, so it is assumed that the point lies on the circle of which this arc is a part.
References containsAngle(), and getCenter().
Referenced by containsPoint().
|
inline |
Return the inner angle of the sector associated with this arc.
Even Rouault: potential optimization?: using crossproduct(p0 - center, p2 - center) = radius * radius * sin(angle) could yield the result by just doing a single asin(), instead of 2 atan2() actually one should also likely compute dotproduct(p0 - center, p2 - center) = radius * radius * cos(angle), and thus angle = atan2(crossproduct(p0 - center, p2 - center) , dotproduct(p0 - center, p2 - center) )
References isCircle(), orientation(), theta0(), and theta2().
Referenced by getArea(), and getLength().
|
inline |
Return true if the arc is pointing positive in the y direction at the location of a specified point. The point is assumed to be on the arc.
References getCenter(), orientation(), and geos::geom::Quadrant::quadrant().
|
inline |
Return the orientation of the arc as one of:
References geos::algorithm::Orientation::index().
Referenced by containsAngle(), getAngle(), and isUpwardAtPoint().