Skip to main content

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

TypeNameValue
float32_tx0.0f
float32_ty0.0f
float32_twidth1.0f
float32_theight1.0f
float32_tznear0.0f
float32_tzfar1.0f