Viewport Class Reference
Represents a square domain over [0,1]^2, overlaid with a conceptual grid of uniformly-sized tiles (representing pixels). More...
#include <Viewport.h>
Public Member Functions | |
Constructors | |
| Viewport (unsigned width, unsigned height) | |
| Viewport (unsigned noSamples) | |
| Viewport () | |
Accessors | |
| unsigned | getWidth () const |
| unsigned | getHeight () const |
| real_t | getInvWidth () const |
| real_t | getInvHeight () const |
| void | getBin (const Point2 &pt, unsigned &outX, unsigned &outY) const |
Mutators | |
| void | setSize (unsigned width, unsigned height) |
| Sets the number of rows and columns in this domain. | |
| void | setWidth (unsigned width) |
| Sets the number of bins in one row of this domain. | |
| void | setHeight (unsigned height) |
| Sets the number of bins in one column of this domain. | |
Detailed Description
Represents a square domain over [0,1]^2, overlaid with a conceptual grid of uniformly-sized tiles (representing pixels).
- Date:
- Fall 2008
Definition at line 18 of file Viewport.h.
Constructor & Destructor Documentation
| Viewport::Viewport | ( | unsigned | width, | |
| unsigned | height | |||
| ) | [inline] |
Definition at line 23 of file Viewport.h.
| Viewport::Viewport | ( | unsigned | noSamples | ) | [inline] |
Definition at line 28 of file Viewport.h.
| Viewport::Viewport | ( | ) | [inline] |
Definition at line 38 of file Viewport.h.
Member Function Documentation
| unsigned Viewport::getWidth | ( | ) | const [inline] |
| unsigned Viewport::getHeight | ( | ) | const [inline] |
- Returns:
- the number of bins within one column of this domain
Definition at line 53 of file Viewport.h.
| real_t Viewport::getInvWidth | ( | ) | const [inline] |
- Returns:
- the horizontal length of a single bin in this domain
Definition at line 58 of file Viewport.h.
| real_t Viewport::getInvHeight | ( | ) | const [inline] |
- Returns:
- the vertical length of a single bin in this domain
Definition at line 63 of file Viewport.h.
| void Viewport::getBin | ( | const Point2 & | pt, | |
| unsigned & | outX, | |||
| unsigned & | outY | |||
| ) | const [inline] |
- Returns:
- the integer bin along this domain which contains the given
ptlying in the unit interval after being mapped to an image of the width and height of this domain
Definition at line 72 of file Viewport.h.
| void Viewport::setSize | ( | unsigned | width, | |
| unsigned | height | |||
| ) | [inline] |
| void Viewport::setWidth | ( | unsigned | width | ) | [inline] |
| void Viewport::setHeight | ( | unsigned | height | ) | [inline] |
The documentation for this class was generated from the following file:
Generated on 28 Feb 2009 for Milton by
1.5.6