Class HullEdge

java.lang.Object
jaba.convexHull3d.HullEdge

public class HullEdge extends Object
This class is an abstraction of an edge ( place where surfaces end )
Author:
Sebastiano Spicuglia
  • Field Details

  • Constructor Details

    • HullEdge

      public HullEdge()
      Creates a new Edge object.
  • Method Details

    • hashCode

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

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

      protected boolean areAllFacesVisible()
      Returns true if the faces adjacent to this edge are both visible in the current convex hull, false otherwise.
      Returns:
    • getAdjFaces

      public HullFace[] getAdjFaces()
      Returns the array of the faces adjacent to this edge.
      Returns:
      the array of the faces adjacent to this edge.
    • getEndPoints

      public HullVertex[] getEndPoints()
      Returns the points that limit this edge.
      Returns:
      the points that limit this edge.
    • getNewFace

      protected HullFace getNewFace()
      Returns the new face.
      Returns:
      the new face.
    • isDeleted

      protected boolean isDeleted()
      True if this edge is no longer in the convex hull, false otherwise.
      Returns:
    • isOneFaceVisible

      protected boolean isOneFaceVisible()
      Returns true if one or more faces adjacent to this edge are visible in the current convex hull, false otherwise.
      Returns:
    • setDelete

      protected void setDelete(boolean b)
      Setter for the delete field
      Parameters:
      b - the value you want to set
    • setAdjFaceAt

      protected void setAdjFaceAt(HullFace face, int i)
      Allows you to set at index i the value face in the adjFaces field.
      Parameters:
      face - the value you want to set
      i - the index you want to modify
    • setEndPoints

      public void setEndPoints(HullVertex p0, HullVertex p1)
      Setters for endPoints field.
      Parameters:
      p0 - first point
      p1 - second point
    • getEndPoint

      public HullVertex getEndPoint(int i)
    • setEndPoint

      public void setEndPoint(int i, HullVertex v)
    • getFace

      public HullFace getFace(int i)
    • setFace

      public void setFace(int i, HullFace f)
    • setFirstAdjFace

      protected void setFirstAdjFace(HullFace face)
      Setter for first adjacent face
      Parameters:
      face - the face you want to set
    • setSecondAdjFace

      protected void setSecondAdjFace(HullFace face)
      Setter for second adjacent face
      Parameters:
      face - the face you want to set
    • setNewFace

      protected void setNewFace(HullFace face)
      Setter for new face field
      Parameters:
      face - the face you want to set