Class RegionBSPTree3D

java.lang.Object
org.episteme.core.mathematics.geometry.RegionBSPTree3D

public class RegionBSPTree3D extends Object
Represents a region in 3D space using a Binary Space Partitioning (BSP) tree.

This is the core data structure for Constructive Solid Geometry (CSG). Each node represents a partitioning plane.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • RegionBSPTree3D

      public RegionBSPTree3D()
      Creates an empty region (void).
    • RegionBSPTree3D

      public RegionBSPTree3D(boolean full)
      Creates a region representing the whole space.
      Parameters:
      full - if true, represents the whole space; if false, represents empty space
  • Method Details

    • contains

      public boolean contains(Vector3D point)
      Checks if a point is inside the region.
      Parameters:
      point - the point to check
      Returns:
      true if inside
    • union

      public RegionBSPTree3D union(RegionBSPTree3D other)
      Computes the union of this region and another.
      Parameters:
      other - the other region
      Returns:
      a new region representing the union
    • intersection

      public RegionBSPTree3D intersection(RegionBSPTree3D other)
      Computes the intersection of this region and another.
      Parameters:
      other - the other region
      Returns:
      a new region representing the intersection
    • difference

      public RegionBSPTree3D difference(RegionBSPTree3D other)
      Computes the difference of this region and another (this - other).
      Parameters:
      other - the other region
      Returns:
      a new region representing the difference