public class Edge
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY_POLYGON_HOLES
The Constant KEY_POLYGON_HOLES.
|
| Constructor and Description |
|---|
Edge(Vertex p1,
Vertex p2)
Instantiates a new edge.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<Polygon> |
_toPolygons(java.util.List<Edge> boundaryEdges,
Plane plane)
_to polygons.
|
static java.util.List<Edge> |
boundaryEdgesOfPlaneGroup(java.util.List<Polygon> planeGroup)
Boundary edges of plane group.
|
static java.util.List<Polygon> |
boundaryPaths(java.util.List<Edge> boundaryEdges)
Returns a list of all boundary paths.
|
static java.util.List<Polygon> |
boundaryPathsWithHoles(java.util.List<Polygon> boundaryPaths)
Boundary paths with holes.
|
static java.util.List<Polygon> |
boundaryPolygons(CSG csg)
Boundary polygons.
|
boolean |
colinear(Vector3d p)
Determines whether the specified point is colinear
|
boolean |
colinear(Vector3d p,
double TOL) |
boolean |
contains(Vector3d p)
Determines whether the specified point lies on tthis edge.
|
boolean |
contains(Vector3d p,
double TOL)
Determines whether the specified point lies on tthis edge.
|
boolean |
equals(java.lang.Object obj) |
static boolean |
falseBoundaryEdgeSharedWithOtherEdge(Edge fbe,
Edge e)
False boundary edge shared with other edge.
|
static java.util.List<Edge> |
fromPolygon(Polygon poly)
From polygon.
|
java.util.Optional<Vector3d> |
getClosestPoint(Edge e)
Returns the the point of this edge that is closest to the specified edge.
|
Vector3d |
getDirection()
Gets the direction.
|
java.util.Optional<Vector3d> |
getIntersection(Edge e)
Returns the intersection point between this edge and the specified edge.
|
Vertex |
getP1()
Gets the p1.
|
Vertex |
getP2()
Gets the p2.
|
int |
hashCode() |
boolean |
isThisPointOneOfMine(Vertex test,
double epsilon) |
double |
length() |
void |
setP1(Vertex p1) |
void |
setP2(Vertex p2) |
static java.util.List<Vector3d> |
toPoints(java.util.List<Edge> edges)
To points.
|
static Polygon |
toPolygon(java.util.List<Vector3d> points,
Plane plane)
To polygon.
|
static java.util.List<Polygon> |
toPolygons(java.util.List<Edge> boundaryEdges,
Plane plane)
To polygons.
|
java.lang.String |
toString() |
static java.util.List<Vertex> |
toVertices(java.util.List<Edge> edges)
To vertices.
|
public static final java.lang.String KEY_POLYGON_HOLES
public Vertex getP1()
public Vertex getP2()
public static java.util.List<Edge> fromPolygon(Polygon poly)
poly - the polypublic static java.util.List<Vertex> toVertices(java.util.List<Edge> edges)
edges - the edgespublic static java.util.List<Vector3d> toPoints(java.util.List<Edge> edges)
edges - the edgespublic static Polygon toPolygon(java.util.List<Vector3d> points, Plane plane)
points - the pointsplane - the planepublic static java.util.List<Polygon> toPolygons(java.util.List<Edge> boundaryEdges, Plane plane)
boundaryEdges - the boundary edgesplane - the planepublic static java.util.List<Polygon> boundaryPathsWithHoles(java.util.List<Polygon> boundaryPaths)
boundaryPaths - the boundary pathspublic static java.util.List<Polygon> boundaryPaths(java.util.List<Edge> boundaryEdges)
boundaryEdges - boundary edges (all paths must be closed)public static java.util.List<Polygon> _toPolygons(java.util.List<Edge> boundaryEdges, Plane plane)
boundaryEdges - the boundary edgesplane - the planepublic boolean colinear(Vector3d p)
p - point to checktrue if the specified point lies on this line segment;
false otherwisepublic boolean colinear(Vector3d p, double TOL)
public boolean contains(Vector3d p, double TOL)
p - point to checkTOL - tolerancetrue if the specified point lies on this line segment;
false otherwisepublic boolean contains(Vector3d p)
p - point to checktrue if the specified point lies on this line segment;
false otherwisepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean isThisPointOneOfMine(Vertex test, double epsilon)
public java.lang.String toString()
toString in class java.lang.Objectpublic Vector3d getDirection()
public java.util.Optional<Vector3d> getClosestPoint(Edge e)
e - the edge to checkpublic java.util.Optional<Vector3d> getIntersection(Edge e)
e - edge to intersectpublic static java.util.List<Polygon> boundaryPolygons(CSG csg)
csg - the csgpublic static java.util.List<Edge> boundaryEdgesOfPlaneGroup(java.util.List<Polygon> planeGroup)
planeGroup - the plane grouppublic static boolean falseBoundaryEdgeSharedWithOtherEdge(Edge fbe, Edge e)
fbe - the fbee - the epublic double length()
public void setP1(Vertex p1)
public void setP2(Vertex p2)