Class RegionBSPTree3D
java.lang.Object
org.episteme.core.mathematics.geometry.RegionBSPTree3D
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 Summary
ConstructorsConstructorDescriptionCreates an empty region (void).RegionBSPTree3D(boolean full) Creates a region representing the whole space. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if a point is inside the region.difference(RegionBSPTree3D other) Computes the difference of this region and another (this - other).intersection(RegionBSPTree3D other) Computes the intersection of this region and another.union(RegionBSPTree3D other) Computes the union of this region and another.
-
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
Checks if a point is inside the region.- Parameters:
point- the point to check- Returns:
- true if inside
-
union
Computes the union of this region and another.- Parameters:
other- the other region- Returns:
- a new region representing the union
-
intersection
Computes the intersection of this region and another.- Parameters:
other- the other region- Returns:
- a new region representing the intersection
-
difference
Computes the difference of this region and another (this - other).- Parameters:
other- the other region- Returns:
- a new region representing the difference
-