19 #ifndef GEOS_TRIANGULATE_QUADEDGE_VERTEX_H 20 #define GEOS_TRIANGULATE_QUADEDGE_VERTEX_H 32 namespace triangulate {
40 namespace triangulate {
62 static const int LEFT = 0;
63 static const int RIGHT = 1;
64 static const int BEYOND = 2;
65 static const int BEHIND = 3;
66 static const int BETWEEN = 4;
67 static const int ORIGIN = 5;
68 static const int DESTINATION = 6;
73 Vertex(
double _x,
double _y);
75 Vertex(
double _x,
double _y,
double _z);
162 inline std::unique_ptr<Vertex>
165 return std::unique_ptr<Vertex>(
new Vertex(c * p.
x, c * p.
y));
169 inline std::unique_ptr<Vertex>
176 inline std::unique_ptr<Vertex>
186 return (sqrt(p.
x * p.
x + p.
y * p.
y));
190 inline std::unique_ptr<Vertex>
193 return std::unique_ptr<Vertex>(
new Vertex(p.
y, -p.
x));
226 return (b.
p.
x - p.
x) * (c.
p.
y - p.
y)
227 > (b.
p.
y - p.
y) * (c.
p.
x - p.
x);
230 bool rightOf(
const QuadEdge& e)
const;
231 bool leftOf(
const QuadEdge& e)
const;
234 static std::unique_ptr<algorithm::HCoordinate> bisector(
const Vertex& a,
const Vertex& b);
239 return sqrt(pow(v2.
getX() - v1.
getX(), 2.0)
253 double circumRadiusRatio(
const Vertex& b,
const Vertex& c);
261 std::unique_ptr<Vertex> midPoint(
const Vertex& a);
270 std::unique_ptr<Vertex> circleCenter(
const Vertex& b,
const Vertex& c)
const;
316 #endif //GEOS_TRIANGULATE_QUADEDGE_VERTEX_H
std::unique_ptr< Vertex > sum(Vertex v) const
bool equals(const Vertex &_x, double tolerance) const
bool isCCW(const Vertex &b, const Vertex &c) const
Coordinate is the lightweight class used to store coordinates.
std::unique_ptr< Vertex > times(double c) const
Models a site (node) in a QuadEdgeSubdivision.
bool isInCircle(const Vertex &a, const Vertex &b, const Vertex &c) const
std::unique_ptr< Vertex > cross() const
double dot(Vertex v) const
bool equals(const Vertex &_x) const
static bool isInCircleRobust(const Coordinate &a, const Coordinate &b, const Coordinate &c, const Coordinate &p)
bool operator<(const Vertex &v1, const Vertex &v2)
std::unique_ptr< Vertex > sub(const Vertex &v) const
Basic namespace for all GEOS functionalities.
double distance(const Coordinate &p) const
double distance(const Vertex &v1, const Vertex &v2)
A class that represents the edge data structure which implements the quadedge algebra.
const geom::Coordinate & getCoordinate() const
double crossProduct(const Vertex &v) const