Equalizer 1.0

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.
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

Detailed Description

Holds a 2D pixel viewport with methods for manipulation.

Definition at line 34 of file pixelViewport.h.


Constructor & Destructor Documentation

eq::fabric::PixelViewport::PixelViewport ( ) [inline]

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]

Construct a new pixel viewport with default values.

Version:
1.0

Definition at line 43 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 68 of file pixelViewport.h.

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

Definition at line 139 of file pixelViewport.h.

References eq::fabric::Viewport::FULL, and hasArea().

Here is the call graph for this function:

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

Definition at line 173 of file pixelViewport.h.

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

Definition at line 176 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 159 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 65 of file pixelViewport.h.

Referenced by getSubVP(), 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 242 of file pixelViewport.h.

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

Here is the call graph for this function:

void eq::fabric::PixelViewport::invalidate ( ) [inline]

Invalidate the pixel viewport.

Version:
1.0

Definition at line 51 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 74 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 58 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 219 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 210 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 179 of file pixelViewport.h.

References PixelViewport().

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 identical.
Version:
1.0

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.

Version:
1.0

Definition at line 189 of file pixelViewport.h.


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:10 for Equalizer 1.0 by  doxygen 1.7.3