Equalizer  1.4.1
Public Member Functions | Public Attributes | Static Public Attributes
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.
 Viewport (const Vector4f &from)
 Construct a fractional viewport from a Vector4f.

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

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, explicit]

Construct a fractional viewport with default values.

Version:
1.0

Definition at line 45 of file viewport.h.

eq::fabric::Viewport::Viewport ( const Vector4f from) [inline, explicit]

Construct a fractional viewport from a Vector4f.

Version:
1.3.0

Definition at line 50 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 111 of file viewport.h.

References h.

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

Definition at line 114 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 117 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 108 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 120 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 100 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 90 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 81 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 152 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 Mon Nov 26 2012 14:41:50 for Equalizer 1.4.1 by  doxygen 1.7.6.1