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
Type | Name | Value |
---|---|---|
uint32_t | x | 0 |
uint32_t | y | 0 |
uint32_t | z | 0 |
uint32_t | width | 0 |
uint32_t | height | 0 |
uint32_t | depth | 0 |