Equalizer  1.4.1
Public Attributes
eq::fabric::PixelViewport Class Reference

Holds a 2D pixel viewport with methods for manipulation. More...

#include <pixelViewport.h>

List of all members.

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 Zoom getZoom (const PixelViewport &rhs) const
int32_t getXEnd () const
int32_t getYEnd () const
const PixelViewport operator+ (const Vector2i &offset) const
Viewport operator/ (const PixelViewport &rhs) const
const PixelViewportoperator-= (const Vector2i &offset)
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

Detailed Description

Holds a 2D pixel viewport with methods for manipulation.

Definition at line 34 of file pixelViewport.h.


Constructor & Destructor Documentation

Construct a new, invalid pixel viewport.

Version:
1.0

Definition at line 40 of file pixelViewport.h.

Referenced by operator+().

+ Here is the caller graph for this function:

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.

Version:
1.0

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.

Version:
1.1.6

Definition at line 48 of file pixelViewport.h.


Member Function Documentation

uint32_t eq::fabric::PixelViewport::getArea ( ) const [inline]
Returns:
the area in pixels.
Version:
1.0

Definition at line 72 of file pixelViewport.h.

int32_t eq::fabric::PixelViewport::getXEnd ( ) const [inline]
Returns:
the X end position.
Version:
1.0

Definition at line 157 of file pixelViewport.h.

int32_t eq::fabric::PixelViewport::getYEnd ( ) const [inline]
Returns:
the Y end position.
Version:
1.0

Definition at line 160 of file pixelViewport.h.

const Zoom eq::fabric::PixelViewport::getZoom ( const PixelViewport rhs) const [inline]
Returns:
the zoom which would result in the given rhs pixel viewport when applied to this pixel viewport.

Definition at line 143 of file pixelViewport.h.

References hasArea(), and eq::fabric::Zoom::NONE.

+ Here is the call graph for this function:

bool eq::fabric::PixelViewport::hasArea ( ) const [inline]
Returns:
true if the pixel viewport has a non-zero area, i.e, it is not empty.
Version:
1.0

Definition at line 69 of file pixelViewport.h.

Referenced by getZoom(), intersect(), and merge().

+ Here is the caller graph for this function:

void eq::fabric::PixelViewport::intersect ( const PixelViewport rhs) [inline]

Create the intersection of the two pixel viewports.

Version:
1.0

Definition at line 253 of file pixelViewport.h.

References hasArea(), invalidate(), and isValid().

+ Here is the call graph for this function:

Invalidate the pixel viewport.

Version:
1.0

Definition at line 55 of file pixelViewport.h.

Referenced by intersect().

+ Here is the caller graph for this function:

bool eq::fabric::PixelViewport::isInside ( const int32_t  pX,
const int32_t  pY 
) const [inline]
Returns:
true if the given point is inside the pixel viewport.
Version:
1.0

Definition at line 78 of file pixelViewport.h.

bool eq::fabric::PixelViewport::isValid ( ) const [inline]
Returns:
true if the pixel viewport has a non-negative, but potentially empty, size.
Version:
1.0

Definition at line 62 of file pixelViewport.h.

Referenced by intersect().

+ Here is the caller graph for this function:

void eq::fabric::PixelViewport::merge ( const PixelViewport rhs) [inline]

Create a pixel viewport that includes both viewports (union).

Version:
1.0

Definition at line 230 of file pixelViewport.h.

References hasArea().

+ Here is the call graph for this function:

bool eq::fabric::PixelViewport::operator!= ( const PixelViewport rhs) const [inline]
Returns:
true if the two pixel viewports are not identical.
Version:
1.0

Definition at line 221 of file pixelViewport.h.

const PixelViewport eq::fabric::PixelViewport::operator+ ( const Vector2i offset) const [inline]
Returns:
the addition of this pvp with an offset.
Version:
1.0

Definition at line 163 of file pixelViewport.h.

References PixelViewport().

+ Here is the call graph for this function:

const PixelViewport& eq::fabric::PixelViewport::operator-= ( const Vector2i offset) [inline]
Returns:
this pvp minus an offset.
Version:
1.3.0

Definition at line 188 of file pixelViewport.h.

bool eq::fabric::PixelViewport::operator== ( const PixelViewport rhs) const [inline]
Returns:
true if the two pixel viewports are identical.
Version:
1.0

Definition at line 212 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.

Version:
1.0

Definition at line 200 of file pixelViewport.h.


The documentation for this class was generated from the following file:
Generated on Mon Nov 26 2012 14:41:50 for Equalizer 1.4.1 by  doxygen 1.7.6.1