GLViewPort Class Reference

#include <GLViewPort.h>

List of all members.

Public Member Functions

 GLViewPort ()
virtual ~GLViewPort ()
void draw ()
void setWindowSize (int width, int height, int awidth=0, int aheight=0)

Static Public Member Functions

static int getWidth ()
static int getHeight ()
static int getActualWidth ()
static int getActualHeight ()
static float getWidthMult ()
static float getHeightMult ()

Static Protected Attributes

static int width_ = 0
static int height_ = 0
static float widthMult_ = 0.0f
static float heightMult_ = 0.0f
static int actualWidth_ = 0
static int actualHeight_ = 0


Detailed Description

Definition at line 24 of file GLViewPort.h.


Constructor & Destructor Documentation

GLViewPort::GLViewPort (  ) 

Definition at line 31 of file GLViewPort.cpp.

GLViewPort::~GLViewPort (  )  [virtual]

Definition at line 35 of file GLViewPort.cpp.


Member Function Documentation

void GLViewPort::draw (  ) 

Definition at line 39 of file GLViewPort.cpp.

References actualHeight_, actualWidth_, GL_MODELVIEW, GL_PROJECTION, glLoadIdentity(), glMatrixMode(), glOrtho(), glViewport(), height_, and width_.

Referenced by Main2DCamera::draw().

void GLViewPort::setWindowSize ( int  width,
int  height,
int  awidth = 0,
int  aheight = 0 
)

The size of the viewport in pixels and actual physcial window size in pixels. This viewport may not be the actual size of the window, in which case the graphics will seem larger or smaller than usual.

Definition at line 51 of file GLViewPort.cpp.

References actualHeight_, actualWidth_, height_, heightMult_, width_, and widthMult_.

Referenced by ClientMain::clientEventLoop(), and createScorchedWindow().

static int GLViewPort::getWidth (  )  [inline, static]

Definition at line 42 of file GLViewPort.h.

References width_.

Referenced by GLWSelectorPart::calculateDimensions(), ShotCountDown::draw(), GLWWindow::draw(), GLWToolTip::draw(), GLMenu::draw(), MessageDialog::draw(), LogDialog::draw(), ConsoleImpl::draw(), BackdropDialog::drawBackground(), BackdropDialog::drawFooter(), BackdropDialog::drawLogo(), GLWWindowManager::loadPositions(), GLWWindow::mouseDrag(), GLWWindowManager::savePositions(), MainCamera::simulate(), TargetRendererImpl::storeTarget2DPos(), and TutorialDialog::TutorialDialog().

static int GLViewPort::getHeight (  )  [inline, static]

Definition at line 43 of file GLViewPort.h.

References height_.

Referenced by ShotCountDown::draw(), GLWWindow::draw(), GLWToolTip::draw(), GLMenu::draw(), MessageDialog::draw(), LogDialog::draw(), BuyAccessoryDialog::draw(), ConsoleImpl::draw(), BackdropDialog::drawBackground(), BackdropDialog::drawFooter(), BackdropDialog::drawLogo(), GLCamera::getDirectionFromPt(), GLWWindowManager::loadPositions(), Mouse::mouseDown(), GLMenu::mouseDown(), GLWWindow::mouseDrag(), Mouse::mouseMove(), Mouse::mouseUp(), GLWWindowManager::savePositions(), InventoryDialog::setupWindow(), GLWSelector::showSelector(), MainCamera::simulate(), and TargetRendererImpl::storeTarget2DPos().

static int GLViewPort::getActualWidth (  )  [inline, static]

Definition at line 44 of file GLViewPort.h.

References actualWidth_.

Referenced by BackdropDialog::capture(), and BackdropDialog::drawBackground().

static int GLViewPort::getActualHeight (  )  [inline, static]

Definition at line 45 of file GLViewPort.h.

References actualHeight_.

Referenced by BackdropDialog::capture(), BackdropDialog::drawBackground(), and GLCamera::getDirectionFromPt().

static float GLViewPort::getWidthMult (  )  [inline, static]

Definition at line 46 of file GLViewPort.h.

References widthMult_.

Referenced by CameraDialog::draw(), GLCamera::getDirectionFromPt(), Mouse::mouseDown(), Mouse::mouseMove(), and Mouse::mouseUp().

static float GLViewPort::getHeightMult (  )  [inline, static]

Definition at line 47 of file GLViewPort.h.

References heightMult_.

Referenced by CameraDialog::draw(), GLCamera::getDirectionFromPt(), Mouse::mouseDown(), Mouse::mouseMove(), and Mouse::mouseUp().


Member Data Documentation

int GLViewPort::width_ = 0 [static, protected]

Definition at line 50 of file GLViewPort.h.

Referenced by draw(), getWidth(), and setWindowSize().

int GLViewPort::height_ = 0 [static, protected]

Definition at line 50 of file GLViewPort.h.

Referenced by draw(), getHeight(), and setWindowSize().

float GLViewPort::widthMult_ = 0.0f [static, protected]

Definition at line 51 of file GLViewPort.h.

Referenced by getWidthMult(), and setWindowSize().

float GLViewPort::heightMult_ = 0.0f [static, protected]

Definition at line 51 of file GLViewPort.h.

Referenced by getHeightMult(), and setWindowSize().

int GLViewPort::actualWidth_ = 0 [static, protected]

Definition at line 52 of file GLViewPort.h.

Referenced by draw(), getActualWidth(), and setWindowSize().

int GLViewPort::actualHeight_ = 0 [static, protected]

Definition at line 52 of file GLViewPort.h.

Referenced by draw(), getActualHeight(), and setWindowSize().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:02 2009 for Scorched3D by  doxygen 1.5.3