Class Edge

java.lang.Object
eu.mihosoft.vrl.v3d.Edge

public class Edge extends Object
Author:
miho
  • Field Details

  • Constructor Details

  • Method Details

    • getP1

      public Vertex getP1()
      Returns:
      the p1
    • getP2

      public Vertex getP2()
      Returns:
      the p2
    • fromPolygon

      public static List<Edge> fromPolygon(Polygon poly)
    • toVertices

      public static List<Vertex> toVertices(List<Edge> edges)
    • toPoints

      public static List<Vector3d> toPoints(List<Edge> edges)
    • toPolygons

      public static List<Polygon> toPolygons(List<Edge> boundaryEdges, Plane plane)
    • boundaryPathsWithHoles

      public static List<Polygon> boundaryPathsWithHoles(List<Polygon> boundaryPaths)
    • _toPolygons

      public static List<Polygon> _toPolygons(List<Edge> boundaryEdges, Plane plane)
    • contains

      public boolean contains(Vector3d p, double TOL)
      Determines whether the specified point lies on tthis edge.
      Parameters:
      p - point to check
      TOL - tolerance
      Returns:
      true if the specified point lies on this line segment; false otherwise
    • contains

      public boolean contains(Vector3d p)
      Determines whether the specified point lies on tthis edge.
      Parameters:
      p - point to check
      Returns:
      true if the specified point lies on this line segment; false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getDirection

      public Vector3d getDirection()
    • getClosestPoint

      public Optional<Vector3d> getClosestPoint(Edge e)
      Returns the the point of this edge that is closest to the specified edge. NOTE: returns an empty optional if the edges are parallel
      Parameters:
      e - the edge to check
      Returns:
      the the point of this edge that is closest to the specified edge
    • getIntersection

      public Optional<Vector3d> getIntersection(Edge e)
      Returns the intersection point between this edge and the specified edge. NOTE: returns an empty optional if the edges are parallel or if the intersection point is not inside the specified edge segment
      Parameters:
      e - edge to intersect
      Returns:
      the intersection point between this edge and the specified edge
    • boundaryPolygons

      public static List<Polygon> boundaryPolygons(CSG csg)