|
GEOS 3.15.0beta1
|
#include <CircularArc.h>
Public Member Functions | |
| CircularArc () | |
| CircularArc (const CoordinateSequence &, std::size_t pos) | |
| CircularArc (const CoordinateSequence &, std::size_t pos, const CoordinateXY ¢er, double radius, int orientation) | |
| CircularArc (std::unique_ptr< CoordinateSequence >, std::size_t pos) | |
| CircularArc (std::unique_ptr< CoordinateSequence >, std::size_t pos, const CoordinateXY ¢er, double radius, int orientation) | |
| CircularArc (const CircularArc &other) | |
| CircularArc (CircularArc &&) noexcept | |
| CircularArc & | operator= (const CircularArc &other) |
| CircularArc & | operator= (CircularArc &&) noexcept |
| double | getAngle () const |
| Return the inner angle of the sector associated with this arc. | |
| double | getArea () const |
| Return the area enclosed by the arc p0-p1-p2 and the line segment p2-p0. | |
| const CoordinateXY & | getCenter () const |
| Return the center point of the circle associated with this arc. | |
| const CoordinateSequence * | getCoordinateSequence () const |
| std::size_t | getCoordinatePosition () const |
| CoordinateXY | getDirectionPoint () const |
| CoordinateXY | getReverseDirectionPoint () const |
| Envelope | getEnvelope () const |
| double | getLength () const |
| Return the length of the arc. | |
| void | addLinearizedPoints (CoordinateSequence &seq, const algorithm::CurveToLineParams ¶ms) const |
| int | getOrientation () const |
| double | getRadius () const |
| Return the radius of the circle associated with this arc. | |
| double | getSagitta () const |
| Return the distance from the centerpoint of the arc to the line segment formed by the end points of the arc. | |
| bool | isCCW () const |
| 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 | theta0 () const |
| Return the angle of p0. | |
| double | theta1 () const |
| Return the angle of p1. | |
| double | theta2 () const |
| Return the angle of p2. | |
| bool | containsAngle (double theta) const |
| Check to see if a given angle lies on this arc. | |
| bool | containsPoint (const CoordinateXY &q) const |
| bool | containsPointOnCircle (const CoordinateXY &q) const |
| CoordinateXY | closestPoint (const CoordinateXY &p) const |
| std::array< CoordinateXY, 2 > | closestPoints (const CoordinateXY &p1, const CoordinateXY &p2) const |
| std::array< CoordinateXY, 2 > | closestPoints (const CircularArc &other) const |
| double | distance (const CoordinateXY &p) const |
| double | distance (const CoordinateXY &p1, const CoordinateXY &p2) const |
| double | distance (const CircularArc &other) const |
| bool | isUpwardAtPoint (const CoordinateXY &q) const |
| CircularArc | reverse () const |
| bool | equals (const CircularArc &other, double tol) const |
| Iterator | begin () const |
| Iterator | end () const |
| template<typename T = CoordinateXY> | |
| const T & | p0 () const |
| template<typename T = CoordinateXY> | |
| const T & | p1 () const |
| template<typename T = CoordinateXY> | |
| const T & | p2 () const |
| std::string | toString () const |
| template<typename F> | |
| auto | applyAt (std::size_t i, F &&f) const |
Static Public Member Functions | |
| template<typename CoordType> | |
| static CircularArc | create (const CoordType &p0, const CoordType &p1, const CoordType &p2) |
| static CircularArc | create (const CoordinateXY &p0, const CoordinateXY &p2, const CoordinateXY ¢er, double radius, int orientation) |
| static CircularArc | create (const Coordinate &p0, const Coordinate &p2, const CoordinateXY ¢er, double radius, int orientation) |
| static CircularArc | create (const CoordinateXYM &p0, const CoordinateXYM &p2, const CoordinateXY ¢er, double radius, int orientation) |
| static CircularArc | create (const CoordinateXYZM &p0, const CoordinateXYZM &p2, const CoordinateXY ¢er, double radius, int orientation) |
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
| geos::geom::CircularArc::CircularArc | ( | ) |
Create an empty CircularArc backed by a null CoordinateSequence. A CircularArc created in this way will crash if methods are called on it, but a default constructor is necessary to construct std::array<CircularArc, >
Referenced by CircularArc(), CircularArc(), create(), and isUpwardAtPoint().
| geos::geom::CircularArc::CircularArc | ( | const CoordinateSequence & | , |
| std::size_t | pos ) |
Create a CircularArc that refers to points in the provided CoordinateSequence. The CoordinateSequence is not owned by the CircularArc and should remain reachable for the lifetime of the CircularArc. The center, radius, and orientation can be specified to avoid lossy re-computation. They are not checked for consistency with the references coordinates.
References CircularArc().
| geos::geom::CircularArc::CircularArc | ( | std::unique_ptr< CoordinateSequence > | , |
| std::size_t | pos ) |
Create a CircularArc that refers to points in the provided CoordinateSequence. Ownership of the CoordinateSequence is transferred to the CircularArc. The center, radius, and orientation can be specified to avoid lossy re-computation. They are not checked for consistency with the references coordinates.
References CircularArc().
| void geos::geom::CircularArc::addLinearizedPoints | ( | CoordinateSequence & | seq, |
| const algorithm::CurveToLineParams & | params ) const |
Add linearized points representing this arc to the provided CoordinateSequence. The origin point of the arc will NOT be added.
| bool geos::geom::CircularArc::containsPoint | ( | const CoordinateXY & | q | ) | const |
Check to see if a coordinate lies on the arc, after testing whether it lies on the circle.
|
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().
|
inlinestatic |
Create a CircularArc from the given coordinates, automatically allocating a CoordinateSequence to store them. Typically, it is more efficient to create a larger CoordinateSequence that multiple CircularArcs refer to. However, the "create" methods are convenient for writing tests.
References CircularArc(), and create().
Referenced by create().
| CoordinateXY geos::geom::CircularArc::getDirectionPoint | ( | ) | const |
Computes a direction point suitable for ordering arcs with the same origin point. The direction point is located at a distance R along the line tangent to the arc at the origin point.
|
inline |
Return the orientation of the arc as one of:
References geos::algorithm::Orientation::index().
| bool geos::geom::CircularArc::isUpwardAtPoint | ( | const CoordinateXY & | q | ) | const |
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 CircularArc().