![]() |
Maria GDK 5.0.0.927
Documentation of native code in develop branch
|
#include <StkPolygon.h>
Public Member Functions | |
| NodeIter | begin () const |
| const VectorType & | getNode (int i) const |
| VectorType & | getNode (int i) |
| void | setNode (int i, const VectorType &n) |
| NodeIter | end () const |
| void | append (const VectorType &p) |
| const std::vector< VectorType > & | nodes () const |
| std::vector< VectorType > & | nodes () |
| int | size () const |
| bool | empty () const |
| double | calcArea () const |
| Ring | calcConvHull () const |
| Calculate the convex hull of this ring. | |
| void | removeDuplicates (double eps=1e-6) |
| void | reverse () |
| double | calcShortestDistance (const VectorType &p) const |
| Calculate the shortest distance from the point p to the ring. | |
| bool | isInside (const Ring &r) |
| Check if ring is inside another ring. | |
Ring - Polygon ring. Each polygon consists of one or more rings. Usually these are ordered so that a counterclockwise ring represents a filled polygon (positive area), while a clockwise ring is a hole (negative area).
|
inline |
Calculate 2D area. Area is defined by
![\[
A = \sum_{i=0}^{k-1} (x_i y_{i+1} - x_{i+1} y_i)
\]](form_17.png)
Where 


Positive area indicates counter-clockwise winding, and negative means clockwise.