GEOS
3.12.0
include
geos
algorithm
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
#pragma once
20
21
#include <geos/export.h>
22
#include <geos/geom/Coordinate.h>
23
#include <geos/geom/CoordinateSequence.h>
24
25
namespace
geos
{
26
namespace
algorithm {
// geos::algorithm
27
42
class
GEOS_DLL
Orientation
{
43
public
:
44
45
/* A value that indicates an orientation or turn */
46
enum
{
47
CLOCKWISE = -1,
48
COLLINEAR = 0,
49
COUNTERCLOCKWISE = 1,
50
RIGHT = -1,
51
LEFT = 1,
52
STRAIGHT = 0
53
};
54
67
static
int
index
(
const
geom::CoordinateXY& p1,
const
geom::CoordinateXY& p2,
68
const
geom::CoordinateXY& q);
69
89
static
bool
isCCW
(
const
geom::CoordinateSequence
* ring);
90
115
static
bool
isCCWArea
(
const
geom::CoordinateSequence
* ring);
116
117
};
118
119
120
}
// namespace geos::algorithm
121
}
// namespace geos
122
geos::algorithm::Orientation::isCCWArea
static bool isCCWArea(const geom::CoordinateSequence *ring)
geos
Basic namespace for all GEOS functionalities.
Definition:
Angle.h:25
geos::algorithm::Orientation::index
static int index(const geom::CoordinateXY &p1, const geom::CoordinateXY &p2, const geom::CoordinateXY &q)
Returns the orientation index of the direction of the point q relative to a directed infinite line sp...
geos::geom::CoordinateSequence
The internal representation of a list of coordinates inside a Geometry.
Definition:
CoordinateSequence.h:56
geos::algorithm::Orientation
Functions to compute the orientation of basic geometric structures including point triplets (triangle...
Definition:
Orientation.h:42
geos::algorithm::Orientation::isCCW
static bool isCCW(const geom::CoordinateSequence *ring)
Generated by
1.8.20