NVIDIA Holoscan SDK v2.4.0
Holoscan v2.4.0

Function holoscan::viz::LayerAddView

void holoscan::viz::LayerAddView(float offset_x, float offset_y, float width, float height, const float *matrix = nullptr)

Add a layer view.

By default a layer will fill the whole window. When using a view the layer can be placed freely within the window.

Layers can also be placed in 3D space by specifying a 3D transformation matrix. Note that for geometry layers there is a default matrix which allows coordinates in the range of [0 … 1] instead of the Vulkan [-1 … 1] range. When specifying a matrix for a geometry layer, this default matrix is overwritten.

When multiple views are specified the layer is drawn multiple times using the specified layer views.

It’s possible to specify a negative term for height, which flips the image. When using a negative height, one should also adjust the y value to point to the lower left corner of the viewport instead of the upper left corner.

Parameters
  • offset_x, offset_y – offset of top-left corner of the view. Top left coordinate of the window area is (0, 0) bottom right coordinate is (1, 1)

  • width, height – width and height of the view in normalized range. 1.0 is full size.

  • matrix – row major 4x4 transform matrix (optional, can be nullptr)

Previous Function holoscan::viz::Init(const char *, uint32_t, uint32_t, uint32_t, InitFlags)
Next Function holoscan::viz::LayerOpacity
© Copyright 2022-2024, NVIDIA. Last updated on Oct 1, 2024.