GEOS  3.14.0dev
Public Member Functions | Static Public Attributes | List of all members
geos::triangulate::quadedge::Vertex Class Reference

Models a site (node) in a QuadEdgeSubdivision. More...

#include <Vertex.h>

Public Member Functions

 Vertex (double _x, double _y)
 
 Vertex (double _x, double _y, double _z)
 
 Vertex (const geom::Coordinate &_p)
 
double getX () const
 
double getY () const
 
double getZ () const
 
void setZ (double _z)
 
const geom::CoordinategetCoordinate () const
 
bool equals (const Vertex &_x) const
 
bool equals (const Vertex &_x, double tolerance) const
 
int classify (const Vertex &p0, const Vertex &p1)
 
double crossProduct (const Vertex &v) const
 
double dot (Vertex v) const
 
std::unique_ptr< Vertextimes (double c) const
 
std::unique_ptr< Vertexsum (Vertex v) const
 
std::unique_ptr< Vertexsub (const Vertex &v) const
 
double magn () const
 
std::unique_ptr< Vertexcross () const
 
bool isInCircle (const Vertex &a, const Vertex &b, const Vertex &c) const
 
bool isCCW (const Vertex &b, const Vertex &c) const
 
bool rightOf (const QuadEdge &e) const
 
bool leftOf (const QuadEdge &e) const
 

Static Public Attributes

static const int LEFT = 0
 
static const int RIGHT = 1
 
static const int BEYOND = 2
 
static const int BEHIND = 3
 
static const int BETWEEN = 4
 
static const int ORIGIN = 5
 
static const int DESTINATION = 6
 

Detailed Description

Models a site (node) in a QuadEdgeSubdivision.

The sites can be points on a line string representing a linear site.

The vertex can be considered as a vector with a norm, length, inner product, cross product, etc. Additionally, point relations (e.g., is a point to the left of a line, the circle defined by this point and two others, etc.) are also defined in this class.

It is common to want to attach user-defined data to the vertices of a subdivision. One way to do this is to subclass Vertex to carry any desired information.

Author
JTS: David Skea
JTS: Martin Davis
Benjamin Campbell

Member Function Documentation

◆ crossProduct()

double geos::triangulate::quadedge::Vertex::crossProduct ( const Vertex v) const
inline

Computes the cross product k = u X v.

Parameters
va vertex
Returns
returns the magnitude of u X v

◆ dot()

double geos::triangulate::quadedge::Vertex::dot ( Vertex  v) const
inline

Computes the inner or dot product

Parameters
va vertex
Returns
returns the dot product u.v

◆ isCCW()

bool geos::triangulate::quadedge::Vertex::isCCW ( const Vertex b,
const Vertex c 
) const
inline

Tests whether the triangle formed by this vertex and two other vertices is in CCW orientation.

Parameters
ba vertex
ca vertex
Returns
true if the triangle is oriented CCW

◆ isInCircle()

bool geos::triangulate::quadedge::Vertex::isInCircle ( const Vertex a,
const Vertex b,
const Vertex c 
) const
inline

Tests if the vertex is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise).

Parameters
aa vertex of the triangle
ba vertex of the triangle
ca vertex of the triangle
Returns
true if this vertex is in the circumcircle of (a,b,c)

References geos::geom::INTERIOR, and geos::triangulate::quadedge::TrianglePredicate::isInCircleRobust().

◆ times()

std::unique_ptr<Vertex> geos::triangulate::quadedge::Vertex::times ( double  c) const
inline

Computes the scalar product c(v)

Parameters
cscaling factor
Returns
returns the scaled vector

The documentation for this class was generated from the following file: