Class Segment_3

java.lang.Object
Jcg.geometry.Segment_3
All Implemented Interfaces:
Segment_

public class Segment_3 extends Object implements Segment_
  • Field Details

  • Constructor Details

    • Segment_3

      public Segment_3()
    • Segment_3

      public Segment_3(Point_3 p, Point_3 q)
  • Method Details

    • source

      public Point_ source()
      Specified by:
      source in interface Segment_
    • target

      public Point_ target()
      Specified by:
      target in interface Segment_
    • vertex

      public Point_ vertex(int i)
      Specified by:
      vertex in interface Segment_
    • toVector

      public Vector_ toVector()
      returns the vector s.target() - s.source()
      Specified by:
      toVector in interface Segment_
    • opposite

      public Vector_ opposite()
      returns a segment with source and target interchanged
    • squaredLength

      public Number squaredLength()
      returns the squared length
    • hasOn

      public boolean hasOn(Point_ 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
    • isDegenerate

      public boolean isDegenerate()
      segment s is degenerate, if source and target fall together
    • toString

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

      public int dimension()