Class BoxRegion

java.lang.Object
net.apartium.cocoabeans.space.BoxRegion
All Implemented Interfaces:
Region

@AvailableSince("0.0.22") public class BoxRegion extends Object implements Region
  • Constructor Details

    • BoxRegion

      public BoxRegion(double x0, double x1, double y0, double y1, double z0, double z1)
    • BoxRegion

      public BoxRegion(Position pos0, Position pos1)
  • Method Details

    • contains

      public boolean contains(Position position)
      Description copied from interface: Region
      Check if the position is in the region
      Specified by:
      contains in interface Region
      Parameters:
      position - position to check
      Returns:
      true if the position is in the region or false otherwise
    • distance

      public double distance(Position position)
      Description copied from interface: Region
      Return the distance between region and position If position is inside the region, return 0 (Note that this is not the same as the distance between the region and the center of the region) (Note this method is more expensive than Region.contains(Position) method when you just want to check if the position is inside the region)
      Specified by:
      distance in interface Region
      Parameters:
      position - position
      Returns:
      distance between region and position (or 0 if position is inside the region)
    • getX0

      public double getX0()
    • getX1

      public double getX1()
    • getY0

      public double getY0()
    • getY1

      public double getY1()
    • getZ0

      public double getZ0()
    • getZ1

      public double getZ1()
    • setX

      public void setX(double x0, double x1)
    • setY

      public void setY(double y0, double y1)
    • setZ

      public void setZ(double z0, double z1)
    • set

      public void set(Position pos0, Position pos1)