Class Edge

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

public class Edge extends Object
Author:
miho
  • Field Details Link icon

  • Constructor Details Link icon

  • Method Details Link icon

    • getP1 Link icon

      public Vertex getP1()
      Returns:
      the p1
    • getP2 Link icon

      public Vertex getP2()
      Returns:
      the p2
    • fromPolygon Link icon

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

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

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

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

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

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

      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 Link icon

      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 Link icon

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

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

      public Vector3d getDirection()
    • getClosestPoint Link icon

      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 Link icon

      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 Link icon

      public static List<Polygon> boundaryPolygons(CSG csg)