Equalizer 1.0
|
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. | |
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] |
Construct a new pixel viewport with default values.
Definition at line 43 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 139 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 159 of file pixelViewport.h.
References hasArea(), and eq::fabric::Zoom::NONE.
bool eq::fabric::PixelViewport::hasArea | ( | ) | const [inline] |
Definition at line 65 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 242 of file pixelViewport.h.
References hasArea(), invalidate(), and isValid().
void eq::fabric::PixelViewport::invalidate | ( | ) | [inline] |
Invalidate the pixel viewport.
Definition at line 51 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 74 of file pixelViewport.h.
bool eq::fabric::PixelViewport::isValid | ( | ) | const [inline] |
Definition at line 58 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 219 of file pixelViewport.h.
References hasArea().
bool eq::fabric::PixelViewport::operator!= | ( | const PixelViewport & | rhs | ) | const [inline] |
Definition at line 210 of file pixelViewport.h.
const PixelViewport eq::fabric::PixelViewport::operator+ | ( | const Vector2i & | offset | ) | const [inline] |
Definition at line 179 of file pixelViewport.h.
References PixelViewport().
bool eq::fabric::PixelViewport::operator== | ( | const PixelViewport & | rhs | ) | const [inline] |
Definition at line 201 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 189 of file pixelViewport.h.