GEOS 3.9.1
Orientation.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2018 Paul Ramsey <pramsey@cleverlephant.ca>
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: algorithm/Orientation.java @ 2017-09-04
16 *
17 **********************************************************************/
18
19#ifndef GEOS_ALGORITHM_ORIENTATION_H
20#define GEOS_ALGORITHM_ORIENTATION_H
21
22#include <geos/export.h>
23#include <geos/geom/Coordinate.h>
24#include <geos/geom/CoordinateSequence.h>
25
26namespace geos {
27namespace algorithm { // geos::algorithm
28
43class GEOS_DLL Orientation {
44public:
45
46 /* A value that indicates an orientation or turn */
47 enum {
48 CLOCKWISE = -1,
49 COLLINEAR = 0,
50 COUNTERCLOCKWISE = 1,
51 RIGHT = -1,
52 LEFT = 1,
53 STRAIGHT = 0
54 };
55
68 static int index(const geom::Coordinate& p1, const geom::Coordinate& p2,
69 const geom::Coordinate& q);
70
90 static bool isCCW(const geom::CoordinateSequence* ring);
91
116 static bool isCCWArea(const geom::CoordinateSequence* ring);
117
118};
119
120
121} // namespace geos::algorithm
122} // namespace geos
123
124
125#endif // GEOS_ALGORITHM_ORIENTATION_H
Functions to compute the orientation of basic geometric structures including point triplets (triangle...
Definition Orientation.h:43
static bool isCCWArea(const geom::CoordinateSequence *ring)
static bool isCCW(const geom::CoordinateSequence *ring)
static int index(const geom::Coordinate &p1, const geom::Coordinate &p2, const geom::Coordinate &q)
Returns the orientation index of the direction of the point q relative to a directed infinite line sp...
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:58
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26