Vixen
02b45cc4
csharp
public sealed class TerrainHoles

Which samples of a terrain are not there.

Read the guide page for this →

Remarks

What the Holes tool paints — a cave mouth, a doorway into a hillside, a shaft. One bit per sample rather than a height, because a hole is not a very low piece of ground: it has to remove the triangles and the collision, and a height cannot do the second.

⚠ One bit punches the quads around it, not one quad. A quad is four samples, so a hole at a sample kills the up-to-four quads that reference it. Painting a single sample therefore opens a two-by-two hole, which surprises people once and is the only definition that keeps the mesh and the collider agreeing — the physics side has exactly this rule and it is not ours to choose.

Fields and properties (2)

  • public int HoleCount

    How many samples are holes.

  • public bool IsEmpty

    Whether anything has been punched at all.

Methods (5)

  • public TerrainHoles(TerrainDescription description)

    Allocates a mask with no holes in it.

  • public bool IsHole(int x, int z)

    Whether a sample is a hole.

  • public void SetHole(int x, int z, bool hole)

    Punches or fills a sample.

  • public bool IsQuadMissing(int x, int z)

    Whether a quad has any of its four corners punched.

  • public TerrainHoles Clone()

    A copy of this mask.

Used by (14)

  • TerrainVixen.Terrain
  • TerrainRendererVixen.Rendering.Terrain
  • TerrainResizeVixen.Terrain
  • TerrainResizeTestsVixen.Terrain.Tests
  • TerrainSamplesVixen.Terrain
  • TerrainSculptVixen.Terrain
  • TerrainSculptTestsVixen.Terrain.Tests
  • TerrainStoreVixen.Terrain
  • TerrainStoreTestsVixen.Terrain.Tests
  • TerrainSurfaceVixen.Rendering.Terrain
  • TerrainSurfaceTestsVixen.Rendering.Terrain.Tests
  • TerrainEditTestsVixen.Editor.Terrain.Tests
  • TerrainHoleCommandVixen.Editor.Terrain
  • TerrainHoleStrokeVixen.Editor.Terrain