new Face()
This class represents a face in a Mesh.
Properties:
Name | Type | Description |
---|---|---|
halfedge |
module:Core.Halfedge | One of the halfedges associated with this face. |
Methods
-
isBoundaryLoop()
-
Checks whether this face is a boundary loop.
Returns:
- Type
- boolean
-
adjacentVertices(ccw)
-
Convenience function to iterate over the vertices in this face.
Iterates over the vertices of a boundary loop if this face is a boundary loop.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 f = mesh.faces[0]; // or let b = mesh.boundaries[0] for (let v of f.adjacentVertices()) { // Do something with v }
-
adjacentEdges(ccw)
-
Convenience function to iterate over the edges in this face.
Iterates over the edges of a boundary loop if this face is a boundary loop.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 f = mesh.faces[0]; // or let b = mesh.boundaries[0] for (let e of f.adjacentEdges()) { // Do something with e }
-
adjacentFaces(ccw)
-
Convenience function to iterate over the faces neighboring this face.
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 f = mesh.faces[0]; // or let b = mesh.boundaries[0] for (let g of f.adjacentFaces()) { // Do something with g }
-
adjacentHalfedges(ccw)
-
Convenience function to iterate over the halfedges in this face.
Iterates over the halfedges of a boundary loop if this face is a boundary loop.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 f = mesh.faces[0]; // or let b = mesh.boundaries[0] for (let h of f.adjacentHalfedges()) { // Do something with h }
-
adjacentCorners(ccw)
-
Convenience function to iterate over the corners in this face. Not valid if this face
is a boundary loop.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 f = mesh.faces[0]; for (let c of f.adjacentCorners()) { // Do something with c }