|
GEOS
3.5.0
|
#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::Coordinate & | getCoordinate () const |
| bool | equals (const Vertex &_x) const |
| bool | equals (const Vertex &_x, double tolerance) const |
| virtual int | classify (const Vertex &p0, const Vertex &p1) |
| double | crossProduct (const Vertex &v) const |
| double | dot (Vertex v) const |
| std::auto_ptr< Vertex > | times (double c) const |
| std::auto_ptr< Vertex > | sum (Vertex v) const |
| std::auto_ptr< Vertex > | sub (const Vertex &v) const |
| double | magn () const |
| std::auto_ptr< Vertex > | cross () const |
| virtual 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 |
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 (see ConstraintVertex).
|
inline |
Computes the cross product k = u X v.
| v | a vertex |
References geos::geom::Coordinate::x, and geos::geom::Coordinate::y.
|
inline |
Computes the inner or dot product
| v,a | vertex |
References geos::geom::Coordinate::x, and geos::geom::Coordinate::y.
Tests whether the triangle formed by this vertex and two other vertices is in CCW orientation.
| b | a vertex |
| c | a vertex |
References geos::geom::Coordinate::x, and geos::geom::Coordinate::y.
|
virtual |
Tests if the vertex is inside the circle defined by the triangle with vertices a, b, c (oriented counter-clockwise).
| a | a vertex of the triangle |
| b | a vertex of the triangle |
| c | a vertex of the triangle |
|
inline |
Computes the scalar product c(v)
| v,a | vertex |
References geos::geom::Coordinate::x, and geos::geom::Coordinate::y.
1.8.11