java.lang.Object
net.buildtheearth.terracore.worldgen.dataset.vector.geometry.Segment
All Implemented Interfaces:
net.buildtheearth.terracore.geo.bvh.Bounds2d, net.buildtheearth.terracore.geo.interval.Interval

public final class Segment extends Object implements net.buildtheearth.terracore.geo.bvh.Bounds2d, net.buildtheearth.terracore.geo.interval.Interval
A simple representation of a line segment as a pair of two sets of coordinates.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final double
     
    protected final double
     
    protected final double
     
    protected final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Segment(double x0, double z0, double x1, double z1)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    double
    max()
     
    double
     
    double
     
    double
    min()
     
    double
     
    double
     
     
    double
    x0()
     
    double
    x1()
     
    double
    z0()
     
    double
    z1()
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.buildtheearth.terracore.geo.bvh.Bounds2d

    contains, expand, intersects, toCornerBB, toTiles, union, validate

    Methods inherited from interface net.buildtheearth.terracore.geo.interval.Interval

    contains, length
  • Field Details

    • x0

      protected final double x0
    • z0

      protected final double z0
    • x1

      protected final double x1
    • z1

      protected final double z1
  • Constructor Details

    • Segment

      public Segment(double x0, double z0, double x1, double z1)
  • Method Details

    • minX

      public double minX()
      Specified by:
      minX in interface net.buildtheearth.terracore.geo.bvh.Bounds2d
    • maxX

      public double maxX()
      Specified by:
      maxX in interface net.buildtheearth.terracore.geo.bvh.Bounds2d
    • minZ

      public double minZ()
      Specified by:
      minZ in interface net.buildtheearth.terracore.geo.bvh.Bounds2d
    • maxZ

      public double maxZ()
      Specified by:
      maxZ in interface net.buildtheearth.terracore.geo.bvh.Bounds2d
    • min

      public double min()
      Specified by:
      min in interface net.buildtheearth.terracore.geo.interval.Interval
    • max

      public double max()
      Specified by:
      max in interface net.buildtheearth.terracore.geo.interval.Interval
    • x0

      public double x0()
    • z0

      public double z0()
    • x1

      public double x1()
    • z1

      public double z1()
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object