Table of Contents

Class AreaBlocker

Namespace
GridForge.Blockers
Assembly
GridForge.dll

A manually placed blocker that obstructs a two-dimensional XZ-plane area on one world Y layer.

public class AreaBlocker : Blocker, IBlocker
Inheritance
AreaBlocker
Implements
Inherited Members

Constructors

AreaBlocker(GridWorld, FixedBoundArea, Fixed64, bool, bool)

Initializes a new area blocker bound to the supplied world.

public AreaBlocker(GridWorld world, FixedBoundArea blockArea, Fixed64 layerY = default, bool isActive = true, bool cacheCoveredVoxels = false)

Parameters

world GridWorld

The world whose grids this blocker should affect.

blockArea FixedBoundArea

The XZ-plane area to block.

layerY Fixed64

The world Y layer to block. Defaults to zero.

isActive bool

Flag whether or not blocker is active.

cacheCoveredVoxels bool

Flag whether or not to cache covered voxels.

AreaBlocker(GridWorld, Vector2d, Vector2d, Fixed64, bool, bool)

Initializes a new area blocker from XZ-plane min/max bounds.

public AreaBlocker(GridWorld world, Vector2d boundsMin, Vector2d boundsMax, Fixed64 layerY = default, bool isActive = true, bool cacheCoveredVoxels = false)

Parameters

world GridWorld

The world whose grids this blocker should affect.

boundsMin Vector2d

The 2D minimum bound whose X component maps to world X and Y component maps to world Z.

boundsMax Vector2d

The 2D maximum bound whose X component maps to world X and Y component maps to world Z.

layerY Fixed64

The world Y layer to block. Defaults to zero.

isActive bool

Flag whether or not blocker is active.

cacheCoveredVoxels bool

Flag whether or not to cache covered voxels.

Methods

GetBoundsMax()

Gets the max bounds of the area to block. Must be implemented by subclasses.

protected override Vector3d GetBoundsMax()

Returns

Vector3d

GetBoundsMin()

Gets the min bounds of the area to block. Must be implemented by subclasses.

protected override Vector3d GetBoundsMin()

Returns

Vector3d