new HalfEdge(vertex)
Constructs a new half-edge.
Parameters:
Name | Type | Description |
---|---|---|
vertex |
Vector3 | The vertex of this half-edge. It represents the head/destination of the respective full edge. |
Members
-
nullable next :HalfEdge
-
A reference to the next half-edge.
- Default Value:
- null
-
nullable polygon :Polygon
-
A reference to its polygon/face.
- Default Value:
- null
-
nullable prev :HalfEdge
-
A reference to the previous half-edge.
- Default Value:
- null
-
nullable twin :HalfEdge
-
A reference to the opponent half-edge.
- Default Value:
- null
-
vertex :Vector3
-
The vertex of this half-edge. It represents the head/destination of the respective full edge.
Methods
-
getDirection(result) → {Vector3}
-
Computes the direction of this half edge. The method assumes the half edge has a valid reference to a previous half edge.
Parameters:
Name Type Description result
Vector3 The result vector.
-
head() → {Vector3}
-
Returns the head of this half-edge. That's a reference to the own vertex.
-
length() → {Number}
-
Computes the length of this half-edge.
Returns:
Number -The length of this half-edge.
-
linkOpponent(edge) → {HalfEdge}
-
Links the given opponent half edge with this one.
Parameters:
Name Type Description edge
HalfEdge The opponent edge to link.
-
squaredLength() → {Number}
-
Computes the squared length of this half-edge.
Returns:
Number -The squared length of this half-edge.
-
tail() → {Vector3}
-
Returns the tail of this half-edge. That's a reference to the previous half-edge vertex.