Viewport. More...
#include <gelViewport.h>
Public Member Functions | |
GelViewport () | |
Default constructor. | |
GelViewport (int mode) | |
GelViewport (GelRect dims) | |
GelViewport (GelRectf dims) | |
~GelViewport () | |
Destructor. | |
void | reset () |
void | setAbsRect (GelRect dims) |
void | setRelRect (GelRectf dims) |
GelRect | getAbsRect () const |
GelRectf | getRelRect () const |
void | setSizingMode (int mode) |
int | getSizingMode () const |
void | setBackgroundColor (GelColor col) |
GelColor | getBackgroundColor () const |
GelRect | relToAbs () const |
bool | operator== (const GelViewport &vp) const |
bool | operator!= (const GelViewport &vp) const |
Viewport.
A viewport is an area in which a camera (and consequently, a scene) will be rendered.
Viewports can be positioned and sized by either absolute or relative coordinates.
Absolute means the viewport will use actual pixels.
Relative means the viewport will be set relative to the size of the target window. Valid values range from 0 to 1.
For example: Suppose you want to fill a whole window with a size of 800x600 pixels.
In absolute mode, use the following: GelRect(0, 0, 800, 600).
Relative mode: GelRect(0, 0, 1, 1).
Suppose you want to fill the whole length, but only half of the height. Absolute mode: GelRect(0, 0, 800, 300).
Relative mode: GelRect(0, 0, 1, 0.5).
gel::GelViewport::GelViewport | ( | ) |
Default constructor.
The viewport will use relative sizing by default.
gel::GelViewport::GelViewport | ( | int | mode | ) |
gel::GelViewport::GelViewport | ( | GelRect | dims | ) |
gel::GelViewport::GelViewport | ( | GelRectf | dims | ) |
gel::GelViewport::~GelViewport | ( | ) |
Destructor.
Does nothing yet.
void gel::GelViewport::reset | ( | ) |
void gel::GelViewport::setAbsRect | ( | GelRect | dims | ) | [inline] |
void gel::GelViewport::setRelRect | ( | GelRectf | dims | ) | [inline] |
GelRect gel::GelViewport::getAbsRect | ( | ) | const [inline] |
GelRectf gel::GelViewport::getRelRect | ( | ) | const [inline] |
void gel::GelViewport::setSizingMode | ( | int | mode | ) | [inline] |
int gel::GelViewport::getSizingMode | ( | ) | const [inline] |
void gel::GelViewport::setBackgroundColor | ( | GelColor | col | ) | [inline] |
GelColor gel::GelViewport::getBackgroundColor | ( | ) | const [inline] |
GelRect gel::GelViewport::relToAbs | ( | ) | const |
bool gel::GelViewport::operator== | ( | const GelViewport & | vp | ) | const |
bool gel::GelViewport::operator!= | ( | const GelViewport & | vp | ) | const |
API Documentation by Mark D. Procarione | Generated by |