Table of Contents

Method CollectWorldHeight

Namespace
Pinwheel.Vista
Assembly
Pinwheel.Vista.Runtime.dll

CollectWorldHeight(ITile[], RenderTexture, Bounds)

Asks overlapping tiles that implement ISceneHeightProvider to draw their height data into a target texture.

public static void CollectWorldHeight(ITile[] tiles, RenderTexture targetRt, Bounds worldBounds)

Parameters

tiles ITile[]

The tiles to inspect. Each tile is tested against worldBounds in XZ space before its height provider callback is invoked.

targetRt RenderTexture

The destination render texture representing the requested world region. Providers draw their own height data into this texture using coordinates derived from worldBounds.

worldBounds Bounds

The world-space bounds whose height data should be collected.

Remarks

The method converts the requested bounds and each tile's bounds to XZ rectangles, then forwards the request to OnCollectSceneHeight(RenderTexture, Rect) for tiles that overlap. Note that the current implementation returns immediately when it encounters the first non-overlapping tile, rather than skipping it and continuing, so the supplied tile order can affect how much data is collected.