public static class TriMesh.Edge
extends java.lang.Object
An edge is specified by two nodes A and B. The order of these nodes is significant. An edge is directed from A to B.
Every edge has a mate. An edge and its mate reference the same two nodes, but in the opposite order, so they have opposite directions. Therefore, an edge does not equal its mate.
When constructing an edge, a tri that references the two nodes A and B may be specified. If non-null, this tri may be used to quickly determine the two tris left and right of the edge that references its nodes. For an edge on the hull of the mesh, either the left or right tri is null.
Constructor and Description |
---|
TriMesh.Edge(TriMesh.Node a,
TriMesh.Node b)
Constructs a directed edge that references the specified nodes.
|
TriMesh.Edge(TriMesh.Node a,
TriMesh.Node b,
TriMesh.Tri abc)
Constructs a directed edge that references the specified nodes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
int |
hashCode() |
boolean |
isVisibleFromPoint(double x,
double y)
Determines whether this edge is visible from the specified point.
|
TriMesh.Edge |
mate()
Returns the mate of this edge.
|
TriMesh.Node |
nodeA()
Returns the node A in the edge.
|
TriMesh.Node |
nodeB()
Returns the node B in the edge.
|
TriMesh.Node |
nodeLeft()
Returns the other node (not in this face) in the tri left of this face.
|
TriMesh.Node |
nodeRight()
Returns the other node (not in this face) in the tri right of this face.
|
TriMesh.Tri |
triLeft()
Returns the tri left of this face.
|
TriMesh.Tri |
triRight()
Returns the tri right of this face.
|
public TriMesh.Edge(TriMesh.Node a, TriMesh.Node b)
a
- a node of the edge.b
- a node of the edge.public TriMesh.Edge(TriMesh.Node a, TriMesh.Node b, TriMesh.Tri abc)
a
- a node of the edge.b
- a node of the edge.abc
- a tri that references nodes A and B; null, if none.public final TriMesh.Node nodeA()
public final TriMesh.Node nodeB()
public TriMesh.Tri triLeft()
public TriMesh.Tri triRight()
public TriMesh.Node nodeLeft()
public TriMesh.Node nodeRight()
public final TriMesh.Edge mate()
public boolean isVisibleFromPoint(double x, double y)
x
- the x coordinate of the point.y
- the y coordinate of the point.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object