Skip to content

Game.Common.BoundsMask

Assembly: Game
Namespace: Game.Common

Type: public enum (with [Flags])
Base: System.Enum (underlying type: System.UInt16)

Summary:
A bitmask enum used to describe and filter different bounding categories/layers for game objects (e.g., collision/selection bounds, rendering layers or other logical classifications). The [Flags] attribute allows combining multiple mask values with bitwise operations. Typical use is to mark which layers an object occupies or to test which layers should be considered when querying bounds.


Fields

  • Debug = 0x1
    Used for debug-related bounds or diagnostics. Typically indicates a debug-only bounding category.

  • NormalLayers = 0x2
    Represents the normal/default layers used for ordinary objects.

  • PipelineLayer = 0x4
    Indicates the pipeline layer (e.g., infrastructure conduits or similar pipeline-like objects).

  • SubPipelineLayer = 0x8
    Represents a sub-pipeline layer used for secondary pipeline classifications.

  • WaterwayLayer = 0x10
    Denotes waterway-related bounds (rivers, canals, etc.).

  • IsTree = 0x20
    Flag to indicate the object is a tree (special-case bounding/handling).

  • OccupyZone = 0x40
    Marks bounds that occupy a zoning area (used for occupancy checks).

  • NotOverridden = 0x80
    Indicates the bounds/flags should not be overridden by other systems or modifiers.

  • NotWalkThrough = 0x100
    Specifies that the area is not walk-through (blocking pedestrian movement).

  • HasLot = 0x200
    Indicates the object/area has an associated lot (land parcel) attached.

  • AllLayers = 0x1E
    Composite flag that equals NormalLayers | PipelineLayer | SubPipelineLayer | WaterwayLayer (0x2 | 0x4 | 0x8 | 0x10). Convenient shorthand to select all primary layers except debug and other special flags.

Properties

  • None. This enum exposes only named constants; no properties are defined.

Constructors

  • None. Enums do not define constructors in typical usage.

Methods

  • None. This enum does not define methods.

Usage Example

// Combine multiple flags
BoundsMask mask = BoundsMask.NormalLayers | BoundsMask.PipelineLayer;

// Check if a flag is set
bool hasPipeline = (mask & BoundsMask.PipelineLayer) != 0;

// Add a flag
mask |= BoundsMask.NotWalkThrough;

// Remove a flag
mask &= ~BoundsMask.PipelineLayer;

// Test for any of a group (useful with AllLayers)
bool touchesPrimaryLayers = (mask & BoundsMask.AllLayers) != 0;

Notes: - Because the enum is marked with [Flags], use bitwise operators (|, &, ~) to compose and test masks. - AllLayers is a convenience combination for commonly grouped layers (NormalLayers, PipelineLayer, SubPipelineLayer, WaterwayLayer).