Extract CSG engine + device hotplug; resolve blend-formula question
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 20 Sep 2026 09:05:55 +0000 (12:05 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 20 Sep 2026 09:05:55 +0000 (12:05 +0300)
commitdca4aa4c762cd6e174e10c961e64e786c3c47182
tree1d5153ed6775d713b07273af5e9d35b9d2c0b50c
parent307a71dd604773c6c7113a562f80d5591f99cec2
Extract CSG engine + device hotplug; resolve blend-formula question

- New Csg utility (pure polygon-list functions: union/subtract/intersect
  over BSP clip/invert sequences). AbstractCompositeShape's three CSG
  methods are now one-line delegates; clonePolygons moved into Csg.
  Composite drops 95 lines and its dependency on BspTree.
- New gui/DeviceHotplug: head-tracker + SpaceMouse hot-plug managers,
  extracted from ViewPanel (which now holds a single field and two
  delegating getters). ViewPanel loses its HeadTrackingManager/
  SpaceMouseManager lifecycle code.
- Blend formulas: PROVEN bit-identical. SolidPolygon's
  ((255-a)*dest + a*src)>>8 and TexturedTriangle's lerp form
  dest + ((a*(src-dest) - dest)>>8) agree for all 16.6M (a,src,dest)
  inputs (exhaustive check). Documented at both span writers; no change.
- transformChildrenParallel's aggregator param: NOT dead as the review
  claimed — it feeds the serial-fallback paths. Restored with accurate
  javadoc (was nearly deleted on the review's say-so; the build caught
  it before commit).

Deliberately NOT split: ViewPanel's render-loop core (mailbox, present
gates, pending paints) and AbstractCompositeShape's parallel-transform
planner — both are concurrency-critical and deliberate; extraction
trades cohesion for race-condition risk with zero functional gain.
src/main/java/eu/svjatoslav/aukio/e3d/gui/DeviceHotplug.java [new file with mode: 0644]
src/main/java/eu/svjatoslav/aukio/e3d/gui/ViewPanel.java
src/main/java/eu/svjatoslav/aukio/e3d/renderer/raster/shapes/basic/solidpolygon/SolidPolygon.java
src/main/java/eu/svjatoslav/aukio/e3d/renderer/raster/shapes/basic/texturedpolygon/TexturedTriangle.java
src/main/java/eu/svjatoslav/aukio/e3d/renderer/raster/shapes/composite/base/AbstractCompositeShape.java
src/main/java/eu/svjatoslav/aukio/e3d/renderer/raster/shapes/composite/base/Csg.java [new file with mode: 0644]