nx_metadata_sdk 1.0 Metadata SDK

Public Member Functions | Public Attributes | List of all members
nx::sdk::analytics::Rect Struct Reference

## Public Member Functions
| Rect ()=default
| Rect (float x, float y, float width, float height)
| Rect (Point topLeft, float width, float height)
Point | center () const
bool | isValid () const

## Public Attributes
float | x = -1
float | y = -1
float | width = -1
float | height = -1

## Constructor & Destructor Documentation

## ◆ Rect()

nx::sdk::analytics::Rect::Rect | ( |  | ) |
| default

Creates an invalid rectangle.

## Member Function Documentation

## ◆ center()

Point nx::sdk::analytics::Rect::center | ( |  | ) | const
| inline

Calculates the center of the rectangle.

Returns
  Point with both coordinates in the range [0..1].

## Member Data Documentation

## ◆ height

float nx::sdk::analytics::Rect::height = -1

Height of the rectangle. Valid value must be in the range [0..1], and the rule `y + height <= 1` must be satisfied.

## ◆ width

float nx::sdk::analytics::Rect::width = -1

Width of the rectangle. Valid value must be in the range [0..1], and the rule `x + width <= 1` must be satisfied.

## ◆ x

float nx::sdk::analytics::Rect::x = -1

X coordinate of the top left corner. Valid value must be in the range [0..1]. Zero is at the leftmost position in the video frame.

## ◆ y

float nx::sdk::analytics::Rect::y = -1

Y coordinate of the top left corner. Valid value must be in the range [0..1]. Zero is at the topmost position in the video frame.

The documentation for this struct was generated from the following file:

- src/nx/sdk/analytics/rect.h