Class Main

java.lang.Object
eu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker
eu.svjatoslav.aukio.e3d.examples.life_demo.Main
All Implemented Interfaces:
eu.svjatoslav.aukio.e3d.gui.FrameListener, eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler

public class Main extends eu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker
Main entry point for Conway's Game of Life 3D demo. Creates a 30x30 cell matrix where cells evolve based on Conway's rules. The user can interact with cells by clicking to toggle their state.

Key controls:

  • Space - Evolve one generation
  • Enter - Evolve with history (leaves stars marking previous positions)
  • C - Clear the matrix
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new Main instance for the Game of Life demo.
  • 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: the 30x30 cell matrix (initially all dead — a fixed starting pattern), the help panel, and the decorative grid, with the camera positioned to overview the board.
    boolean
    keyPressed(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
    Handle keyboard input.
    static void
    main(String[] args)
    Entry point for the Game of Life 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

    • Main

      public Main()
      Creates a new Main instance for the Game of Life demo.
  • Method Details

    • main

      public static void main(String[] args)
      Entry point for the Game of Life 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: the 30x30 cell matrix (initially all dead — a fixed starting pattern), the help panel, and the decorative grid, with the camera positioned to overview the board. 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 (unused here)
      camera - camera to position
    • keyPressed

      public boolean keyPressed(KeyEvent event, eu.svjatoslav.aukio.e3d.gui.ViewPanel viewPanel)
      Handle keyboard input.
      Specified by:
      keyPressed in interface eu.svjatoslav.aukio.e3d.gui.humaninput.KeyboardInputHandler
      Overrides:
      keyPressed in class eu.svjatoslav.aukio.e3d.gui.humaninput.WorldNavigationUserInputTracker