Equalizer  1.9.0
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
eq::fabric::Viewport Class Reference

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

#include <viewport.h>

+ Collaboration diagram for eq::fabric::Viewport:

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. More...
 
void unite (const Viewport &rhs)
 Create the union of the two viewports. More...
 
Viewport getCoverage (const Viewport &with) const
 Compute the coverage of another viewport on this viewport.
 
EQFABRIC_API 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. More...
 
 Viewport (const float x_, const float y_, const float w_, const float h_)
 Construct a fractional viewport with default values. More...
 
 Viewport (const Vector4f &from)
 Construct a fractional viewport from a Vector4f. More...
 

Public Attributes

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

Static Public Attributes

static EQFABRIC_API const Viewport FULL
 A full viewport.
 

Detailed Description

A fractional viewport with methods for manipulation.

Definition at line 34 of file viewport.h.

Constructor & Destructor Documentation

eq::fabric::Viewport::Viewport ( )
inline

Construct a full fractional viewport.

Version
1.0

Definition at line 40 of file viewport.h.

eq::fabric::Viewport::Viewport ( const float  x_,
const float  y_,
const float  w_,
const float  h_ 
)
inlineexplicit

Construct a fractional viewport with default values.

Version
1.0

Definition at line 43 of file viewport.h.

eq::fabric::Viewport::Viewport ( const Vector4f &  from)
inlineexplicit

Construct a fractional viewport from a Vector4f.

Version
1.3.0

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

References h, and w.

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

Definition at line 112 of file viewport.h.

References w, and x.

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 115 of file viewport.h.

References h, and y.

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 106 of file viewport.h.

References h, and w.

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 118 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 98 of file viewport.h.

References h, w, x, and y.

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 88 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 79 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 150 of file viewport.h.

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

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: