new Vertex()
This class represents a vertex in a Mesh.
Properties:
Name | Type | Description |
---|---|---|
halfedge |
module:Core.Halfedge | One of the outgoing halfedges associated with this vertex. |
Methods
-
degree()
-
Counts the number of edges adjacent to this vertex.
Returns:
- Type
- number
-
isIsolated()
-
Checks whether this vertex is isolated, i.e., it has no neighboring vertices.
Returns:
- Type
- boolean
-
onBoundary()
-
Checks whether this vertex lies on a boundary.
Returns:
- Type
- boolean
-
adjacentVertices(ccw)
-
Convenience function to iterate over the vertices neighboring this vertex.
Parameters:
Name Type Description ccw
boolean A flag indicating whether iteration should be in CCW or CW order.
Returns:
- Type
- module:Core.Vertex
Example
let v = mesh.vertices[0]; for (let u of v.adjacentVertices()) { // Do something with u }
-
adjacentEdges(ccw)
-
Convenience function to iterate over the edges adjacent to this vertex.
Parameters:
Name Type Description ccw
boolean A flag indicating whether iteration should be in CCW or CW order.
Returns:
- Type
- module:Core.Edge
Example
let v = mesh.vertices[0]; for (let e of v.adjacentEdges()) { // Do something with e }
-
adjacentFaces(ccw)
-
Convenience function to iterate over the faces adjacent to this vertex.
Parameters:
Name Type Description ccw
boolean A flag indicating whether iteration should be in CCW or CW order.
Returns:
- Type
- module:Core.Face
Example
let v = mesh.vertices[0]; for (let f of v.adjacentFaces()) { // Do something with f }
-
adjacentHalfedges(ccw)
-
Convenience function to iterate over the halfedges adjacent to this vertex.
Parameters:
Name Type Description ccw
boolean A flag indicating whether iteration should be in CCW or CW order.
Returns:
- Type
- module:Core.Halfedge
Example
let v = mesh.vertices[0]; for (let h of v.adjacentHalfedges()) { // Do something with h }
-
adjacentCorners(ccw)
-
Convenience function to iterate over the corners adjacent to this vertex.
Parameters:
Name Type Description ccw
boolean A flag indicating whether iteration should be in CCW or CW order.
Returns:
- Type
- module:Core.Corner
Example
let v = mesh.vertices[0]; for (let c of v.adjacentCorners()) { // Do something with c }