feat(engine): add DiamondSquare and improve rendering architecture
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 22 Mar 2026 19:10:55 +0000 (21:10 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 22 Mar 2026 19:10:55 +0000 (21:10 +0200)
commit343e15d7b33be804dc538e090daec49b5c7e803b
tree5b18c4f3335b4adfe28b321821c809cb31895aa8
parent2ccd3edafc01d102a24de0cf59903d5346a48e2e
feat(engine): add DiamondSquare and improve rendering architecture

Add DiamondSquare algorithm for procedural terrain heightmap generation.
Merge Rotation class into Quaternion for unified rotation handling.
Introduce global LightingManager in ViewPanel for scene-wide lighting.
Fix text rendering to use per-segment Graphics2D for proper clipping.
Fix raytracer camera frame to use inverse rotation.
Add comprehensive documentation for perspective-correct texture mapping.
Simplify debug log buffer by removing passthrough feature.

Squashed commits:
- fix(raytracer): use inverse rotation when placing camera frame
- refactor(gui): remove stdout passthrough from debug log buffer
- fix(render): use per-segment Graphics2D to clip text rendering
- docs: add CUSTOM_ID properties to all org-mode sections
- feat(math): add DiamondSquare algorithm and document composite shape fields
- refactor(gui): improve developer tools and composite shape logging
- refactor(lighting): use global LightingManager in ViewPanel
- refactor(math): merge Rotation into Quaternion
- docs: move perspective texture docs to dedicated directory
28 files changed:
AGENTS.md
TODO.org
doc/index.org
doc/perspective-correct-textures/Affine distortion.png [new file with mode: 0644]
doc/perspective-correct-textures/Slices.png [new file with mode: 0644]
doc/perspective-correct-textures/index.org [new file with mode: 0644]
doc/rendering-loop.org
src/main/java/eu/svjatoslav/sixth/e3d/gui/Camera.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/DebugLogBuffer.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/DeveloperToolsPanel.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/SegmentRenderingContext.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/ViewPanel.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/humaninput/InputManager.java
src/main/java/eu/svjatoslav/sixth/e3d/math/DiamondSquare.java [new file with mode: 0644]
src/main/java/eu/svjatoslav/sixth/e3d/math/Quaternion.java
src/main/java/eu/svjatoslav/sixth/e3d/math/Rotation.java [deleted file]
src/main/java/eu/svjatoslav/sixth/e3d/math/Transform.java
src/main/java/eu/svjatoslav/sixth/e3d/math/Vertex.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/CameraView.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/RaytracingCamera.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/ShapeCollection.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/solidpolygon/SolidPolygon.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/base/AbstractCompositeShape.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/base/SubShape.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/texture/Texture.java
src/test/java/eu/svjatoslav/sixth/e3d/math/QuaternionTest.java
src/test/java/eu/svjatoslav/sixth/e3d/math/RotationMatrixTest.java [deleted file]