Class GridSegment_2

java.lang.Object
Jcg.geometry.GridSegment_2

public class GridSegment_2 extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • source

      public GridPoint_2 source()
    • target

      public GridPoint_2 target()
    • vertex

      public GridPoint_2 vertex(int i)
    • toVector

      public GridVector_2 toVector()
      returns the vector s.target() - s.source()
    • opposite

      public GridVector_2 opposite()
      returns a segment with source and target interchanged
    • hasOn

      public boolean hasOn(GridPoint_2 p)
      A point is on s, iff it is equal to the source or target of s, or if it is in the interior of s
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • dimension

      public int dimension()