Class OctreeDemo
java.lang.Object
eu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker
eu.svjatoslav.aukio.e3d.examples.OctreeDemo
- All Implemented Interfaces:
eu.svjatoslav.aukio.e3d.gui.FrameListener, eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
public class OctreeDemo
extends eu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker
Demo showing volumetric octree rendering with raytracing capability.
Creates a 3D scene with various geometric shapes stored in an octree data structure.
Press 'r' to render the current view using software raytracing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildScene(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.geometry.Camera camera) Builds the demo scene: grid, light sources, and the full initial voxel bake (spiral, arbitrary rectangles, tiled floor, fractal) added both to the raster scene and to the octree volume, exactly as shown on startup.booleankeyPressed(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel) Handles keyboard input for triggering raytracing.static voidEntry point for the octree demo.Methods inherited from class eu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker
focusLost, focusReceived, keyReleased, onFrame
-
Constructor Details
-
OctreeDemo
public OctreeDemo()Creates a new OctreeDemo instance.
-
-
Method Details
-
main
Entry point for the octree demo.- Parameters:
args- command line arguments (ignored)
-
buildScene
public static void buildScene(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.geometry.Camera camera) Builds the demo scene: grid, light sources, and the full initial voxel bake (spiral, arbitrary rectangles, tiled floor, fractal) added both to the raster scene and to the octree volume, exactly as shown on startup. Called by bothmain(String[])and the golden-image harness — must stay deterministic (no time, no unseeded randomness).- Parameters:
shapes- scene to add shapes tolighting- lighting to configurecamera- camera to position
-
keyPressed
Handles keyboard input for triggering raytracing.- Specified by:
keyPressedin interfaceeu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler- Overrides:
keyPressedin classeu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker- Parameters:
event- the key eventviewPanel- the view panel- Returns:
- true if the event was consumed
-