SquidLibFovEngine

io.github.srs.model.illumination.engine.SquidLibFovEngine
object SquidLibFovEngine extends FovEngine

A Field of View (FoV) engine implementation based on the SquidLib library.

This object provides a concrete implementation of the FovEngine using SquidLib's FOV algorithms for light propagation calculations in grid-based environments.

Attributes

Graph
Supertypes
trait FovEngine
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

override def compute(occlusionGrid: Grid[Double])(startX: Int, startY: Int, radius: Double): ArraySeq[Double]

SquidLib-based FoV implementation.

SquidLib-based FoV implementation.

Delegates to FOV.reuseFOV using the provided occlusion grid, writing into a reusable buffer, and finally flattens the matrix in row-major order.

Value parameters

occlusionGrid

A grid of occlusion coefficients in the range [0,1], where:

  • 0 represents an empty cell (no occlusion to light).
  • 1 represents a fully blocking cell (complete resistance/occlusion to light).
radius

The maximum distance (in cells) to propagate the light.

startX

The x-coordinate of the light source in cell space.

startY

The y-coordinate of the light source in cell space.

Attributes

Returns

A row-major (x-fast) flattened ArraySeq of doubles in the range [0,1], representing the light intensity at each cell. The size equals width × height of the grid.

Definition Classes