Skip to main content

Region

The Region struct defines a 2D or 3D region in space, typically used to represent areas or volumes within a larger structure, such as an image, texture, or 3D object. It provides several constructors to initialize the region with specific coordinates (x, y, z) and dimensions (width, height, depth). The Region can be initialized using a variety of combinations, such as specifying just the size, the origin and size, or the full region in 3D space. Additionally, it includes methods to retrieve the Origin (the starting point of the region) and the Size (the dimensions of the region). By default, all values are set to zero.

#include <TellusimTypes.h>

Constructors

Region()
Region(uint32_t width, uint32_t height)
Region(uint32_t width, uint32_t height, uint32_t depth)
Region(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
Region(uint32_t x, uint32_t y, uint32_t z, uint32_t width, uint32_t height, uint32_t depth)
Region(const Origin &origin, const Size &size)
explicit Region(const Size &size)

Methods

Region parameters.

Origin getOrigin() const
Size getSize() const

Operators

Region operator+(const Region &r, const Origin &o)
Region operator+(const Region &r, const Size &s)
Region operator-(const Region &r, const Size &s)
Region operator<<(const Region &r, uint32_t m)
Region operator>>(const Region &r, uint32_t m)
Region operator*(const Region &r, uint32_t f)
Region operator/(const Region &r, uint32_t f)
Region operator*(const Region &r, float32_t f)

Variables

TypeNameValue
uint32_tx0
uint32_ty0
uint32_tz0
uint32_twidth0
uint32_theight0
uint32_tdepth0