# Class: Vertex

#### new Vertex()

Models a site (node) in a QuadEdgeSubdivision. The sites can be points on a lineString 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. Initializes a new Vertex. Will call the correct init* -function based on arguments
Source:

### Members

#### (static) BEHIND

BEHIND The integer representing behind
Source:

#### (static) BETWEEN

BETWEEN The integer representing between
Source:

#### (static) BEYOND

BEYOND The integer representing beyond
Source:

#### (static) DESTINATION

DESTINATION The integer representing destination
Source:

#### (static) LEFT

LEFT The integer representing left
Source:

#### (static) ORIGIN

ORIGIN The integer representing origin
Source:

#### (static) RIGHT

RIGHT The integer representing right
Source:

### Methods

#### bisector(a, b) → {jsts.algorithm.HCoordinate}

Returns the perpendicular bisector of the line between the input vertices
##### Parameters:
Name Type Description
`a` jsts.triangulate.quadedge.Vertex A vertex.
`b` jsts.triangulate.quadedge.Vertex A vertex.
Source:
##### Returns:
The bisector.
Type
jsts.algorithm.HCoordinate

Computes the centre of the circumcircle of this vertex and two others.
##### Parameters:
Name Type Description
`b` jsts.triangulate.quadedge.Vertex a vertex.
`c` jsts.triangulate.quadedge.Vertex a vertex.
Source:
##### Returns:
the Coordinate which is the circumcircle of the 3 points.
Type

Computes the value of the ratio of the circumradius to shortest edge. If smaller than some given tolerance B, the associated triangle is considered skinny. For an equal lateral triangle this value is 0.57735. The ratio is related to the minimum triangle angle theta by: circumRadius/shortestEdge = 1/(2sin(theta)).
##### Parameters:
Name Type Description
`b` jsts.triangulate.quadedge second vertex of the triangle.
`c` jsts.triangulate.quadedge third vertex of the triangle.
Source:
##### Returns:
ratio of circumradius to shortest edge.
Type
Number

#### classify(p0, p1) → {Number}

Clasifys a vertex with respect to another vertex
##### Parameters:
Name Type Description
`p0` jsts.triangulate.quadedge.Vertex The first vertex.
`p1` jsts.triangulate.quadedge.Vertex The second vertex.
Source:
##### Returns:
The classification.
Type
Number

Returns k X v (cross product). This is a vector perpendicular to v.
Source:
##### Returns:
A perpendicular vertex to this vertex.
Type

#### crossProduct(v) → {Number}

Computes the cross product k = u X v.
##### Parameters:
Name Type Description
`v` jsts.triangulate.quadedge.Vertex a vertex.
Source:
##### Returns:
The magnitude of u X v.
Type
Number

#### distance(v1, v2) → {Number}

Calculates the distance between two vertices
##### Parameters:
Name Type Description
`v1` jsts.triangulate.quadedge.Vertex a vertex.
`v2` jsts.triangulate.quadedge.Vertex a vertex.
Source:
The distance.
Type
Number

#### dot(v) → {Number}

Computes the inner or dot product
##### Parameters:
Name Type Description
`v` jsts.triangulate.quadedge.Vertex a vertex.
Source:
##### Returns:
The dot product u.v.
Type
Number

#### equals() → {Boolean}

Checks if this vertex is identical to another vertex. Calls correct equals* function based on arguments
Source:
##### Returns:
true if the vertex equals eachother.
Type
Boolean

#### equalsExact(other) → {Boolean}

Checks if this vertex is identical to other
##### Parameters:
Name Type Description
`other` jsts.triangulate.quadedge.Vertex The vertex to compare this vertex to.
Source:
##### Returns:
true if this vertex equals other.
Type
Boolean

#### equalsWithTolerance(other, tolerance) → {Boolean}

Checks if this vertex is identical to other with respect to a tolerance
##### Parameters:
Name Type Description
`other` jsts.triangulate.quadedge.Vertex The vertex to compare this vertex to.
`tolerance` Number The tolerance to consider when comparing the two vertexes.
Source:
##### Returns:
true if this vertex equals other.
Type
Boolean

#### getCoordinate() → {jsts.geom.Coordinate}

Gets the coordinate of the vertex
Source:
##### Returns:
The coordinate.
Type
jsts.geom.Coordinate

#### getX() → {Number}

Gets the X-coordinate
Source:
##### Returns:
The X-coordinate.
Type
Number

#### getY() → {Number}

Gets the Y-coordinate
Source:
##### Returns:
The Y-coordinate.
Type
Number

#### getZ() → {Number}

Gets the Z-coordinate
Source:
##### Returns:
The Z-coordinate.
Type
Number

#### initFromCoordinate(_p)

Initializes a new Vertex
##### Parameters:
Name Type Description
`_p` jsts.geom.Coordinate the coordinate to initialize the vertex from.
Source:

#### initFromXY(x, y)

Initializes a new Vertex
##### Parameters:
Name Type Description
`x` Number the X-coordinate.
`y` Number the Y-coordinate.
Source:

#### isCCW(b, c) → {Boolean}

Tests whether the triangle formed by this vertex and two other vertices is in CCW orientation.
##### Parameters:
Name Type Description
`b` jsts.triangulate.quadedge.Vertex a vertex.
`c` jsts.triangulate.quadedge.Vertex a vertex.
Source:
##### Returns:
true if the triangle is oriented CCW.
Type
Boolean

#### isInCircle(a, b, c) → {Boolean}

Checks if this vertex lies in the circle defined by a, b and c
##### Parameters:
Name Type Description
`a` jsts.triangulate.quadedge.Vertex A vertex.
`b` jsts.triangulate.quadedge.Vertex A vertex.
`c` jsts.triangulate.quadedge.Vertex A vertex.
Source:
##### Returns:
true if this vertex lies in the circle.
Type
Boolean

#### leftOf(e) → {Boolean}

Tests wheter this vertex lies to the left of an edge
##### Parameters:
Name Type Description
`e` jsts.triangulate.quadedge.QuadEdge A quadedge.
Source:
##### Returns:
true if this vertex lies to the left of the edge.
Type
Boolean

#### magn() → {Number}

Computes the magnitude.
Source:
##### Returns:
The magnitude of this vertex.
Type
Number

returns a new vertex that is mid-way between this vertex and another end point.
##### Parameters:
Name Type Description
`a` jsts.triangulate.quadedge.Vertex the other end point.
Source:
##### Returns:
the point mid-way between this and that.
Type

#### rightOf(e) → {Boolean}

Tests wheter this vertex lies to the right of an edge
##### Parameters:
Name Type Description
`e` jsts.triangulate.quadedge.QuadEdge A quadedge.
Source:
##### Returns:
true if this vertex lies to the right of the edge.
Type
Boolean

#### setZ(z)

Sets the Z-coordinate
##### Parameters:
Name Type Description
`z` Number the new z-coordinate.
Source:

Computes the substraction of vectors.
##### Parameters:
Name Type Description
`v` jsts.triangulate.quadedge.Vertex Another vertex.
Source:
##### Returns:
The substraction of v from this.
Type

Computes the sum of vectors.
##### Parameters:
Name Type Description
`v` jsts.triangulate.quadedge.Vertex Another vertex.
Source:
##### Returns:
The sum of the this and v.
Type

Computes the scalar product c(v).
##### Parameters:
Name Type Description
`c` Number The scalar.
Source:
##### Returns:
The scaled vector.
Type