Viewport
The Viewport struct represents a 2D rectangular area in a 3D space used for rendering. It defines the position and size of the viewport as well as the near and far clipping planes. The struct contains four main properties: x, y, width, and height, which describe the position and dimensions of the viewport. It also includes znear and zfar properties, which define the near and far planes for depth clipping.
#include <TellusimTypes.h>
Constructors
Viewport()
Viewport(float32_t width, float32_t height)
Viewport(float32_t x, float32_t y, float32_t width, float32_t height)
Viewport(float32_t x, float32_t y, float32_t width, float32_t height, float32_t znear, float32_t zfar)
Methods
float32_t getLeft() const
float32_t getBottom() const
float32_t getRight() const
float32_t getTop() const
Variables
Type | Name | Value |
---|---|---|
float32_t | x | 0.0f |
float32_t | y | 0.0f |
float32_t | width | 1.0f |
float32_t | height | 1.0f |
float32_t | znear | 0.0f |
float32_t | zfar | 1.0f |