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 );
49 Pixel() : x( 0 ), y( 0 ), w( 1 ), h( 1 ) {}
52 Pixel(
const uint32_t x_,
const uint32_t y_,
53 const uint32_t w_,
const uint32_t h_ )
54 : x( x_ ), y( y_ ), w( w_ ), h( h_ ) {}
63 x = x * rhs.w + rhs.x;
65 y = y * rhs.h + rhs.y;
75 return x==rhs.x && y==rhs.y && w==rhs.w && h==rhs.h;
84 return x!=rhs.x || y!=rhs.y || w!=rhs.w || h!=rhs.h;
94 LBWARN <<
"Invalid " << *
this << std::endl;
99 LBWARN <<
"Corrected " << *
this << std::endl;
103 bool isValid()
const {
return ( w>0 && x<w && h>0 && y<h ); }
117 os <<
"pixel [ " << pixel.x <<
' ' << pixel.y
118 <<
' ' << pixel.w <<
' ' << pixel.h <<
" ]";
134 #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.