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
    Constructor
    Description
    Creates a new OctreeDemo instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    boolean
    keyPressed(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
    Handles keyboard input for triggering raytracing.
    static void
    main(String[] args)
    Entry point for the octree demo.

    Methods inherited from class eu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker

    focusLost, focusReceived, keyReleased, onFrame

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OctreeDemo

      public OctreeDemo()
      Creates a new OctreeDemo instance.
  • Method Details

    • main

      public static void main(String[] args)
      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 both main(String[]) and the golden-image harness — must stay deterministic (no time, no unseeded randomness).
      Parameters:
      shapes - scene to add shapes to
      lighting - lighting to configure
      camera - camera to position
    • keyPressed

      public boolean keyPressed(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
      Handles keyboard input for triggering raytracing.
      Specified by:
      keyPressed in interface eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
      Overrides:
      keyPressed in class eu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker
      Parameters:
      event - the key event
      viewPanel - the view panel
      Returns:
      true if the event was consumed