Class SceneGlowCaves
The linked caves' boxes the glow modes read (pure; the GPU's FishGlowCaveRow mirrors RowAt(IReadOnlyList<SceneGlowCave>, Vector3, int)): found from the cave-life spots every client loads (SceneCaveLife: each spot of a linked cave carries its interior biome), so nothing new is stored. A glow whose origin is inside a box reads the box's row before any anchor disc or the biome grid.
public static class SceneGlowCaves
- Inheritance
-
SceneGlowCaves
- Inherited Members
Fields
MaxCaves
The most boxes the GPU holds (FishGlowModes.hlsl's _FishGlowCaves: two float4 each).
public const int MaxCaves = 16
Field Value
MostAcross
The widest and tallest a spot's own air is taken, metres.
public const float MostAcross = 12
Field Value
MostUp
The widest and tallest a spot's own air is taken, metres.
public const float MostUp = 30
Field Value
Pad
How far a box reaches past its spots' air, metres (the roof's colonies, the walls' crystals).
public const float Pad = 2
Field Value
Methods
FromSpots(IReadOnlyList<SceneCaveLifeSpot>, List<SceneGlowCave>)
The boxes of the linked caves among spots (a spot with an interior biome; its mouth spots left out, as they
reach out of the cave), one per site and interior in the order first met, each the union of its spots' air padded by
Pad, its row −1. Appended to into.
public static void FromSpots(IReadOnlyList<SceneCaveLifeSpot> spots, List<SceneGlowCave> into)
Parameters
spotsIReadOnlyList<SceneCaveLifeSpot>intoList<SceneGlowCave>
Pack(in SceneGlowCave, out Vector4, out Vector4)
A box packed as the GPU reads it: (min x, min z, max x, max z) and (min y, max y, row, 0).
public static void Pack(in SceneGlowCave c, out Vector4 a, out Vector4 b)
Parameters
cSceneGlowCaveaVector4bVector4
RowAt(IReadOnlyList<SceneGlowCave>, Vector3, int)
The row a glow at a world point reads: the first box holding it with a row, else fallback.
public static int RowAt(IReadOnlyList<SceneGlowCave> caves, Vector3 p, int fallback)
Parameters
cavesIReadOnlyList<SceneGlowCave>pVector3fallbackint
Returns
SpotBounds(in SceneCaveLifeSpot, out Vector3, out Vector3)
The air round one spot, world metres: across it the larger of its extent's x and z (1 to MostAcross), and up and down its extent's y (1.5 to MostUp: a floor's air to the roof, a roost's down to the floor, a box's half height).
public static void SpotBounds(in SceneCaveLifeSpot s, out Vector3 min, out Vector3 max)
Parameters
sSceneCaveLifeSpotminVector3maxVector3