Class HouseDemo

java.lang.Object
eu.svjatoslav.aukio.e3d.examples.house_demo.HouseDemo

public class HouseDemo extends Object
Demo showcasing a walkable house interior with multiple rooms, each lit by a differently colored light source.

The house has three rooms in a row (living room, hall, kitchen) connected by doorways. Walls, floors and ceilings are subdivided into a grid of small quads because shading is flat per polygon — fine subdivision is what makes light falloff and color gradients visible on large surfaces.

Partition walls between rooms are built as two surfaces 10 units apart (wall thickness), each with its normal facing into its own room, so both sides shade correctly for the light in that room.

Run this demo:

java -cp target/aukio-3d-demos.jar eu.svjatoslav.aukio.e3d.examples.house_demo.HouseDemo

Key concepts demonstrated:

  • ShadingEnabled on SolidPolygon with inverse-square light falloff
  • Multiple colored light sources, one per room
  • LightSourceMarker for visualizing light positions
  • Surface subdivision for smooth flat shading
  • Winding order controlling which way a polygon's normal faces
See Also:
  • LightSource
  • LightingManager
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addFurniture(eu.svjatoslav.aukio.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape shapes)
    Adds furniture cubes.
    static void
    addLights(eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes)
    Adds one colored light source per room, each with a marker.
    static void
    buildHouse(eu.svjatoslav.aukio.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape shapes)
    Builds floor, ceiling, exterior walls and the two partition walls.
    static void
    main(String[] args)
    Entry point for the house demo.

    Methods inherited from class Object

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

    • HouseDemo

      public HouseDemo()
  • Method Details

    • main

      public static void main(String[] args)
      Entry point for the house demo.
    • buildHouse

      public static void buildHouse(eu.svjatoslav.aukio.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape shapes)
      Builds floor, ceiling, exterior walls and the two partition walls. Public so tests and tooling can construct the scene without a window.
    • addFurniture

      public static void addFurniture(eu.svjatoslav.aukio.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape shapes)
      Adds furniture cubes. Public so tests and tooling can construct the scene.
    • addLights

      public static void addLights(eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes)
      Adds one colored light source per room, each with a marker. Takes a LightingManager directly so headless tools can use it without a ViewPanel.