Equalizer
1.2.1
|
Holds a 2D pixel viewport with methods for manipulation. More...
#include <pixelViewport.h>
Public Member Functions | |
Constructors | |
PixelViewport () | |
Construct a new, invalid pixel viewport. | |
PixelViewport (const int32_t x_, const int32_t y_, const int32_t w_, const int32_t h_) | |
Construct a new pixel viewport with default values. | |
PixelViewport (const int32_t pvp[4]) | |
Construct a new pixel viewport with default values. | |
Data Access | |
void | invalidate () |
Invalidate the pixel viewport. | |
bool | isValid () const |
bool | hasArea () const |
uint32_t | getArea () const |
bool | isInside (const int32_t pX, const int32_t pY) const |
Operations | |
void | apply (const Viewport &rhs) |
Apply a fractional viewport to this pixel viewport. | |
void | apply (const Pixel &pixel) |
Apply a pixel decomposition to this pixel viewport. | |
void | apply (const Zoom &zoom) |
Apply a zoom to this pixel viewport. | |
const Viewport | getSubVP (const PixelViewport &rhs) const |
const Zoom | getZoom (const PixelViewport &rhs) const |
int32_t | getXEnd () const |
int32_t | getYEnd () const |
const PixelViewport | operator+ (const Vector2i &offset) const |
void | unapply (const Pixel &pixel) |
Perform the inverse operation of applying a pixel decomposition to this pixel viewport. | |
bool | operator== (const PixelViewport &rhs) const |
bool | operator!= (const PixelViewport &rhs) const |
void | merge (const PixelViewport &rhs) |
Create a pixel viewport that includes both viewports (union). | |
void | intersect (const PixelViewport &rhs) |
Create the intersection of the two pixel viewports. | |
Public Attributes | |
int32_t | x |
int32_t | y |
int32_t | w |
int32_t | h |
Holds a 2D pixel viewport with methods for manipulation.
Definition at line 34 of file pixelViewport.h.
eq::fabric::PixelViewport::PixelViewport | ( | ) | [inline] |
Construct a new, invalid pixel viewport.
Definition at line 40 of file pixelViewport.h.
Referenced by operator+().
eq::fabric::PixelViewport::PixelViewport | ( | const int32_t | x_, |
const int32_t | y_, | ||
const int32_t | w_, | ||
const int32_t | h_ | ||
) | [inline, explicit] |
Construct a new pixel viewport with default values.
Definition at line 43 of file pixelViewport.h.
eq::fabric::PixelViewport::PixelViewport | ( | const int32_t | pvp[4] | ) | [inline, explicit] |
Construct a new pixel viewport with default values.
Definition at line 48 of file pixelViewport.h.
uint32_t eq::fabric::PixelViewport::getArea | ( | ) | const [inline] |
const Viewport eq::fabric::PixelViewport::getSubVP | ( | const PixelViewport & | rhs | ) | const [inline] |
Definition at line 143 of file pixelViewport.h.
References eq::fabric::Viewport::FULL, and hasArea().
int32_t eq::fabric::PixelViewport::getXEnd | ( | ) | const [inline] |
int32_t eq::fabric::PixelViewport::getYEnd | ( | ) | const [inline] |
const Zoom eq::fabric::PixelViewport::getZoom | ( | const PixelViewport & | rhs | ) | const [inline] |
Definition at line 163 of file pixelViewport.h.
References hasArea(), and eq::fabric::Zoom::NONE.
bool eq::fabric::PixelViewport::hasArea | ( | ) | const [inline] |
Definition at line 69 of file pixelViewport.h.
Referenced by getSubVP(), getZoom(), intersect(), and merge().
void eq::fabric::PixelViewport::intersect | ( | const PixelViewport & | rhs | ) | [inline] |
Create the intersection of the two pixel viewports.
Definition at line 246 of file pixelViewport.h.
References hasArea(), invalidate(), and isValid().
void eq::fabric::PixelViewport::invalidate | ( | ) | [inline] |
Invalidate the pixel viewport.
Definition at line 55 of file pixelViewport.h.
Referenced by intersect().
bool eq::fabric::PixelViewport::isInside | ( | const int32_t | pX, |
const int32_t | pY | ||
) | const [inline] |
Definition at line 78 of file pixelViewport.h.
bool eq::fabric::PixelViewport::isValid | ( | ) | const [inline] |
Definition at line 62 of file pixelViewport.h.
Referenced by intersect().
void eq::fabric::PixelViewport::merge | ( | const PixelViewport & | rhs | ) | [inline] |
Create a pixel viewport that includes both viewports (union).
Definition at line 223 of file pixelViewport.h.
References hasArea().
bool eq::fabric::PixelViewport::operator!= | ( | const PixelViewport & | rhs | ) | const [inline] |
Definition at line 214 of file pixelViewport.h.
const PixelViewport eq::fabric::PixelViewport::operator+ | ( | const Vector2i & | offset | ) | const [inline] |
Definition at line 183 of file pixelViewport.h.
References PixelViewport().
bool eq::fabric::PixelViewport::operator== | ( | const PixelViewport & | rhs | ) | const [inline] |
Definition at line 205 of file pixelViewport.h.
void eq::fabric::PixelViewport::unapply | ( | const Pixel & | pixel | ) | [inline] |
Perform the inverse operation of applying a pixel decomposition to this pixel viewport.
Definition at line 193 of file pixelViewport.h.