SceneProjector

interface SceneProjector

Abstraction over the isometric projection pipeline.

Decouples the renderer from the concrete IsometricEngine, enabling tests to provide fake projectors that return canned PreparedScene data without running real 3D projection and depth sorting.

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Monotonically increasing version counter for internal state changes. Incremented when mutable parameters (e.g., angle, scale) change, signaling caches that projected output may be stale. Default implementation returns 0 (immutable projector).

Functions

Link copied to clipboard
abstract fun add(shape: Shape, color: IsoColor)

Add a shape to the scene graph.

abstract fun add(path: Path, color: IsoColor, originalShape: Shape? = null, id: String? = null, ownerNodeId: String? = null)

Add a path to the scene graph with optional metadata.

Link copied to clipboard
abstract fun clear()

Clear all items from the scene graph.

Link copied to clipboard
abstract fun findItemAt(preparedScene: PreparedScene, x: Double, y: Double, order: HitOrder = HitOrder.FRONT_TO_BACK, touchRadius: Double = 0.0): RenderCommand?

Find the frontmost item at a screen position (hit testing).

Link copied to clipboard
abstract fun projectScene(width: Int, height: Int, renderOptions: RenderOptions = RenderOptions.Default, lightDirection: Vector = DEFAULT_LIGHT_DIRECTION.normalize()): PreparedScene

Project the scene to 2D and produce sorted render commands.