Equalizer 1.0

eq::fabric::Viewport Class Reference

A fractional viewport with methods for manipulation. More...

#include <viewport.h>

Collaboration diagram for eq::fabric::Viewport:

List of all members.

Public Member Functions

void invalidate ()
 Make the viewport invalid.
void apply (const Viewport &rhs)
 Apply (accumulate) another viewport.
void transform (const Viewport &rhs)
 Transform this viewport into the rhs viewport space.
bool operator== (const Viewport &rhs) const
bool operator!= (const Viewport &rhs) const
bool isValid () const
bool hasArea () const
float getArea () const
float getXEnd () const
float getYEnd () const
void intersect (const Viewport &rhs)
 Create the intersection of the two viewports.
void unite (const Viewport &rhs)
 Create the union of the two viewports.
Viewport getCoverage (const Viewport &with) const
 Compute the coverage of another viewport on this viewport.
void applyView (const Viewport &segmentVP, const Viewport &viewVP, const PixelViewport &pvp, const Vector4i &overdraw)
 Apply the view coverage to this viewport.
Constructors
 Viewport ()
 Construct a full fractional viewport.
 Viewport (const float x_, const float y_, const float w_, const float h_)
 Construct a fractional viewport with default values.

Public Attributes

float x
 The X coordinate.
float y
 The Y coordinate.
float w
 The width.
float h
 The height.

Static Public Attributes

static const Viewport FULL
 A full viewport.

Detailed Description

A fractional viewport with methods for manipulation.

Definition at line 36 of file viewport.h.


Constructor & Destructor Documentation

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

Construct a full fractional viewport.

Version:
1.0

Definition at line 42 of file viewport.h.

eq::fabric::Viewport::Viewport ( const float  x_,
const float  y_,
const float  w_,
const float  h_ 
) [inline]

Construct a fractional viewport with default values.

Version:
1.0

Definition at line 45 of file viewport.h.


Member Function Documentation

float eq::fabric::Viewport::getArea ( ) const [inline]
Returns:
the area of this viewport.
Version:
1.0

Definition at line 106 of file viewport.h.

References h.

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

Definition at line 109 of file viewport.h.

References w.

Referenced by unite().

Here is the caller graph for this function:

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

Definition at line 112 of file viewport.h.

References h.

Referenced by unite().

Here is the caller graph for this function:

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

Definition at line 103 of file viewport.h.

Referenced by intersect().

Here is the caller graph for this function:

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

Create the intersection of the two viewports.

Version:
1.0

Definition at line 115 of file viewport.h.

References h, hasArea(), invalidate(), isValid(), w, x, and y.

Referenced by getCoverage().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 95 of file viewport.h.

Referenced by apply(), and intersect().

Here is the caller graph for this function:

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

Definition at line 85 of file viewport.h.

References h, w, x, and y.

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

Definition at line 76 of file viewport.h.

References h, w, x, and y.

void eq::fabric::Viewport::unite ( const Viewport rhs) [inline]

Create the union of the two viewports.

Version:
1.0

Definition at line 147 of file viewport.h.

References getXEnd(), getYEnd(), x, and y.

Here is the call graph for this function:


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