Class Zone

Class Documentation

class Zone

This class represents a physical area defined by a Mesh, along with metadata and rendered products associated with that area.

Public Types

enum class ZoneMode : uint8_t

Zone operation mode.

Values:

enumerator NONE = 0

No mode specified.

enumerator OCCUPANCY = 1

Occupancy mode specifies the zone shall be triggered when an object enters the zone.

enumerator VACANCY = 2

Vacancy mode specifies the zone shall be triggered when an object leaves the zone.

Public Functions

Zone()

Default constructor.

bool render(const BeamConfig &beam_config)

Renders the zone using the provided beam configuration.

Parameters:

beam_config[in] – The beam configuration to use for rendering.

Returns:

true if the rendering was successful.

void check_invariants() const

Checks the invariants of the Zone.

Public Members

nonstd::optional<Stl> stl

Optional STL defining the zone’s 3D geometry.

nonstd::optional<Zrb> zrb

Optional ZRB containing rendered range images for the zone.

uint32_t point_count = {}

Minimum area (in points) to trigger an alert.

uint32_t frame_count = {}

Minimum time (in frames) to trigger an alert.

ZoneMode mode = {ZoneMode::NONE}

The current operation mode of the zone.

std::string label

Optional label for the ZoneSet.

Public Static Functions

static bool string_to_zonemode(const std::string &str, Zone::ZoneMode &mode)

Converts a ZoneMode enum value to its corresponding string representation.

Parameters:
  • str[in] – The string to convert.

  • mode[out] – The resulting ZoneMode enum value.

Returns:

true if the conversion was successful, false otherwise.