Vixen
02b45cc4
csharp
public readonly record struct TerrainRect

A rectangle of samples, in sample indices.

Read the guide page for this →

Fields and properties (9)

  • public int X

    The low X index.

  • public int Z

    The low Z index.

  • public int Width

    How many samples along X.

  • public int Height

    How many samples along Z.

  • public static TerrainRect Empty

    The empty rectangle, which every operation on it does nothing to.

  • public bool IsEmpty

    Whether it covers no samples.

  • public int EndX

    One past the last X index.

  • public int EndZ

    One past the last Z index.

  • public int Count

    How many samples it covers.

Methods (5)

  • public TerrainRect(int X, int Z, int Width, int Height)

    A rectangle of samples, in sample indices.

  • public bool Contains(int x, int z)

    Whether a sample is inside.

  • public TerrainRect Clip(TerrainRect other)

    The part of this rectangle that is also inside another.

  • public TerrainRect Union(TerrainRect other)

    The smallest rectangle containing both.

  • public TerrainRect Grow(int margin)

    Grown by a margin on every side.

Used by (34)

  • TerrainVixen.Terrain
  • TerrainAtlasVixen.Terrain
  • TerrainAtlasTestsVixen.Terrain.Tests
  • TerrainDescriptionVixen.Terrain
  • TerrainDescriptionTestsVixen.Terrain.Tests
  • TerrainEditLayerVixen.Terrain
  • TerrainLayerTestsVixen.Terrain.Tests
  • TerrainLodNodeVixen.Terrain
  • TerrainMipsVixen.Terrain
  • TerrainPaintVixen.Terrain
  • TerrainRectTestsVixen.Terrain.Tests
  • TerrainRendererVixen.Rendering.Terrain
  • TerrainResizeVixen.Terrain
  • TerrainSamplesVixen.Terrain
  • TerrainSculptVixen.Terrain
  • TerrainSculptTestsVixen.Terrain.Tests
  • TerrainSplatVixen.Rendering.Terrain
  • TerrainSplatTestsVixen.Rendering.Terrain.Tests
  • TerrainSplineVixen.Terrain
  • TerrainSplineTestsVixen.Terrain.Tests
  • TerrainStrokeVixen.Terrain
  • TerrainStrokeRedoVixen.Terrain
  • TerrainStrokeTestsVixen.Terrain.Tests
  • TerrainWeightRedoVixen.Terrain
  • TerrainWeightStrokeVixen.Terrain
  • TypeRegistrationVixen.Terrain
  • ITerrainCollidersVixen.Editor.Terrain
  • TerrainEditVixen.Editor.Terrain
  • TerrainEditTestsVixen.Editor.Terrain.Tests
  • TerrainHoleCommandVixen.Editor.Terrain
  • TerrainHoleStrokeVixen.Editor.Terrain
  • TerrainPaintCommandVixen.Editor.Terrain
  • TerrainPaintModeTestsVixen.Editor.Terrain.Tests
  • TerrainStrokeCommandVixen.Editor.Terrain