# gizai/models/resplat/place

a place made from a video as a game uses it, one textured mesh for its look and its collider. The world's Gaussians are drawn as depths from each camera of the video, the depths are fused into a signed distance whose zero is the surface (gizlang/capture collider: TSDF as KinectFusion, surface nets, quadric simplify), and the surface is laid out on a texture (gizai/render/atlas) and baked from the Gaussians seen from the same cameras (gizai/render/bake). The mesh stands on the video's ground (gizlang/capture standOf).

```gizlang
import * as Place from "gizai/models/resplat/place";
```

## Types

### `Depths`

```gizlang
type Depths = { view: Captured.View; width: i64; height: i64; distances: Distances; }
```

What a camera of the video sees of a place as distances: its square-pixel view, its size and the distances.

- `view`: `gizlang_capture.View`
- `width`: `i64`
- `height`: `i64`
- `distances`: `M36.Distances`

## Functions

### `depthsOf`

```gizlang
function depthsOf(splats: Tensor, v: View, width: i64): Depths
```

What camera V of the video sees of SPLATS as distances, `width` pixels wide (Gaussians distancesOn).

Effects: fail, read, write, console, io, alloc.

### `meshOf`

```gizlang
function meshOf(world: World, pictures: Tensor): Written throws string
```

The place of WORLD (its Gaussians and the views of its video, in one frame) as one textured mesh standing on its
ground (glTF's axes: +y up, the first camera looking to -z from over the origin), with about TRIANGLES triangles. Its
colors are the video's frames PICTURES ([v, 3, H, W], 0..1, one a view of the world in order), where the Gaussians
show the surface whole.

Effects: fail, read, write, console, io, alloc.

