Class HouseDemo
java.lang.Object
eu.svjatoslav.aukio.e3d.examples.house_demo.HouseDemo
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFurniture(eu.svjatoslav.aukio.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape shapes) Adds furniture cubes.static voidaddLights(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 voidbuildHouse(eu.svjatoslav.aukio.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape shapes) Builds floor, ceiling, exterior walls and the two partition walls.static voidEntry point for the house demo.
-
Constructor Details
-
HouseDemo
public HouseDemo()
-
-
Method Details
-
main
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 aLightingManagerdirectly so headless tools can use it without aViewPanel.
-