Class PolyhedralArea

All Implemented Interfaces:
Iterable<org.joml.Vector3ic>, Area

public final class PolyhedralArea extends PolygonArea
A 3D implementation of a PolygonArea. Generated by AI, as I can't find any examples of polyhedral point testing, only 2D point in polygon stuff.
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<PolyhedralArea> CODEC
  • Constructor Details

    • PolyhedralArea

      public PolyhedralArea()
  • Method Details

    • calculateEncompassingArea

      protected void calculateEncompassingArea()
      Description copied from class: EncompassingArea
      Calculates the minimum and maximum points of this area.
      Overrides:
      calculateEncompassingArea in class EncompassingArea
    • contains

      public boolean contains(double x, double y, double z)
      Description copied from interface: Area
      Gets whether the specified point is within this area.

      This method will always return false if the area is incomplete.

      Specified by:
      contains in interface Area
      Overrides:
      contains in class PolygonArea
      Parameters:
      x - the x point to check
      y - the y point to check
      z - the z point to check
      Returns:
      true if the point is within the area specified by Area.points()
    • getBoundaryPoints

      public Set<org.joml.Vector3ic> getBoundaryPoints()
      Description copied from interface: Area
      Returns a set of points representing the boundary of this area.
      Specified by:
      getBoundaryPoints in interface Area
      Overrides:
      getBoundaryPoints in class EncompassingArea
    • getMinimumPoints

      public int getMinimumPoints()
      Description copied from class: EncompassingArea
      Gets the minimum number of points for this area.
      Overrides:
      getMinimumPoints in class PolygonArea
      Returns:
      the minimum number of points required to build this area
    • getType

      public AreaType<?> getType()
      Specified by:
      getType in interface Area
      Overrides:
      getType in class PolygonArea