Class Zone¶
Defined in File zone.h
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.
-
enumerator NONE = 0¶
Public Functions
-
Zone()¶
Default constructor.
-
bool render(const BeamConfig &beam_config)¶
Renders the zone using the provided beam configuration.
Zone STLs are limited to MAX_TRIANGLES triangles to ensure rendering can be performed in a reasonable amount of time. If the STL contains more than MAX_TRIANGLES triangles, the render function will return false and the zone will not be rendered.
- Parameters:
beam_config[in] The beam configuration to use for rendering.
- Returns:
true if the rendering was successful.
Public Members
-
uint32_t point_count = {}¶
Minimum area (in points) to trigger an alert.
-
uint32_t frame_count = {}¶
Minimum time (in frames) to trigger an alert.
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.
Public Static Attributes
-
static uint32_t MAX_TRIANGLES = 2048¶
Specified by FW.
-
enum class ZoneMode : uint8_t¶