Class Util2d

java.lang.Object
jaba.Util2d

public class Util2d extends Object
Created by IntelliJ IDEA. User: PoliMi Date: 21-giu-2005 Time: 11.54.31 To change this template use File | Settings | File Templates.
  • Constructor Details

    • Util2d

      public Util2d()
  • Method Details

    • Collinear

      public boolean Collinear(newPoint a, newPoint b, newPoint p)
      The method checks if p is collinear at points a and b
      Parameters:
      a -
      b -
      p -
      Returns:
      true if they are collinear
    • DomRemove2D

      public Vector<newPoint> DomRemove2D(Vector<newPoint> vertices)
      La funzione elimina i punti dominati dal vettore passato
      Parameters:
      vertices - รจ un vettore di NewPoint
      Returns:
      un vettore di NewPoint contenente i vertici non dominati
    • LExplode2D

      public Vector<newPoint> LExplode2D(Vector<newPoint> vertices)
      The method adds the axis projections to a vertex vector
      Parameters:
      vertices - is the vector of NewPoint passed
      Returns:
      a vector of NewPoint containing initial vertices + projections
    • VPresent

      public boolean VPresent(newPoint a, Vector<newPoint> vertices)
      The method checks if a 2D vertex is present in a vertex vector
      Parameters:
      a - the passed newPoint
      vertices - the array of newPoints to check
      Returns:
      true if it is present
    • RemoveCollinear

      public Vector<newPoint> RemoveCollinear(Vector<newPoint> vertices)