18 #ifndef EQFABRIC_PIXEL_H 19 #define EQFABRIC_PIXEL_H 22 #include <eq/fabric/types.h> 23 #include <lunchbox/bitOperation.h> 24 #include <lunchbox/log.h> 25 #include <lunchbox/types.h> 31 std::ostream&
operator<<(std::ostream& os,
const Pixel& pixel);
58 Pixel(
const uint32_t x_,
const uint32_t y_,
const uint32_t w_,
74 x = x * rhs.w + rhs.x;
76 y = y * rhs.h + rhs.y;
86 return x == rhs.x && y == rhs.y && w == rhs.w && h == rhs.h;
95 return x != rhs.x || y != rhs.y || w != rhs.w || h != rhs.h;
105 LBWARN <<
"Invalid " << *
this << std::endl;
114 LBWARN <<
"Corrected " << *
this << std::endl;
118 bool isValid()
const {
return (w > 0 && x < w && h > 0 && y < h); }
131 os <<
"pixel [ " << pixel.x <<
' ' << pixel.y <<
' ' << pixel.w
132 <<
' ' << pixel.h <<
" ]";
138 #endif // EQFABRIC_PIXEL_H void apply(const Pixel &rhs)
Apply (accumulate) another pixel specification.
Defines export visibility macros for library EqualizerFabric.
Pixel(const uint32_t x_, const uint32_t y_, const uint32_t w_, const uint32_t h_)
Construct a pixel specification with default values.
void validate()
Make the pixel specification valid.
bool operator!=(const Pixel &rhs) const
Pixel()
Construct a pixel specification covering all pixels of a frustum.
Holds a pixel decomposition specification with methods for manipulation.
bool operator==(const Pixel &rhs) const
The Equalizer client library.
std::ostream & operator<<(std::ostream &os, const AxisEvent &event)
Print the axis event to the given output stream.
void invalidate()
Make the pixel specification invalid.
static EQFABRIC_API const Pixel ALL
A pixel specification covering all pixels.