#include <GLWPlanView.h>

Public Member Functions | |
| GLWPlanView (float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f) | |
| virtual | ~GLWPlanView () |
| virtual void | simulate (float frameTime) |
| virtual void | mouseDown (int button, float x, float y, bool &skipRest) |
| virtual void | mouseDrag (int button, float mx, float my, float x, float y, bool &skipRest) |
| virtual void | mouseUp (int button, float x, float y, bool &skipRest) |
| virtual void | draw () |
| void | addRecievePoints (unsigned int playerId, std::list< Vector > &recievepoints) |
| REGISTER_CLASS_HEADER (GLWPlanView) | |
Protected Member Functions | |
| void | drawMap () |
| void | drawTexture () |
| void | drawWall () |
| void | drawCameraPointer () |
| void | drawTanks () |
| void | drawLines () |
| void | drawLine (PlayerDrawnInfo &info) |
| void | drawBuoys () |
| bool | simulateLine (PlayerDrawnInfo &info) |
Protected Attributes | |
| GLTexture | arrowTex_ |
| GLTexture | tankTex_ |
| GLTexture | circleTex_ |
| float | arenaX_ |
| float | arenaY_ |
| float | arenaWidth_ |
| float | arenaHeight_ |
| float | landscapeWidth_ |
| float | landscapeHeight_ |
| float | animationTime_ |
| float | flashTime_ |
| float | totalTime_ |
| float | pointTime_ |
| float | planColor_ |
| bool | flash_ |
| bool | firstTime_ |
| bool | dragging_ |
| float | dragLastX_ |
| float | dragLastY_ |
| PlayerDrawnInfo | localPoints_ |
| std::list < PlayerDrawnInfo > | dragPoints_ |
| std::list< Vector > | sendPoints |
Classes | |
| struct | PlayerDrawnInfo |
Definition at line 30 of file GLWPlanView.h.
| GLWPlanView::GLWPlanView | ( | float | x = 0.0f, |
|
| float | y = 0.0f, |
|||
| float | w = 0.0f, |
|||
| float | h = 0.0f | |||
| ) |
Definition at line 53 of file GLWPlanView.cpp.
References GLWidget::setToolTip(), and ToolTip::ToolTipHelp.
| GLWPlanView::~GLWPlanView | ( | ) | [virtual] |
Definition at line 68 of file GLWPlanView.cpp.
| void GLWPlanView::simulate | ( | float | frameTime | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 72 of file GLWPlanView.cpp.
References animationTime_, dragging_, dragPoints_, flash_, flashTime_, ComsLinesMessage::getLines(), Vector::getNullVector(), ScorchedClient::instance(), localPoints_, maxAnimationTime, planColor_, pointTime_, GLWPlanView::PlayerDrawnInfo::recievepoints, sendPoints, ComsMessageSender::sendToServer(), simulateLine(), and totalTime_.
| void GLWPlanView::mouseDown | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 447 of file GLWPlanView.cpp.
References arenaHeight_, arenaWidth_, arenaX_, arenaY_, TargetCamera::CamFree, dragging_, dragLastX_, dragLastY_, fixed::fromFloat(), MainCamera::getCamera(), MainCamera::getTarget(), GLWidget::h_, GLWidget::inBox(), MainCamera::instance(), ScorchedClient::instance(), localPoints_, MAX, GameState::MouseButtonLeft, GameState::MouseButtonRight, GLWPlanView::PlayerDrawnInfo::points, pointTime_, sendPoints, TargetCamera::setCameraType(), GLCamera::setLookAt(), totalTime_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
| void GLWPlanView::mouseDrag | ( | int | button, | |
| float | mx, | |||
| float | my, | |||
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 496 of file GLWPlanView.cpp.
References dragging_, dragLastX_, dragLastY_, GLWidget::h_, GLWidget::inBox(), localPoints_, GLWPlanView::PlayerDrawnInfo::points, pointTime_, sendPoints, totalTime_, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
| void GLWPlanView::mouseUp | ( | int | button, | |
| float | x, | |||
| float | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 518 of file GLWPlanView.cpp.
References dragging_, Vector::getNullVector(), localPoints_, GLWPlanView::PlayerDrawnInfo::points, and sendPoints.
| void GLWPlanView::draw | ( | ) | [virtual] |
Reimplemented from GLWidget.
Definition at line 143 of file GLWPlanView.cpp.
References arenaHeight_, arenaWidth_, arenaX_, arenaY_, GLWidget::draw(), drawMap(), firstTime_, ClientLinesHandler::instance(), OptionsDisplay::instance(), ScorchedClient::instance(), landscapeHeight_, landscapeWidth_, and ClientLinesHandler::registerCallback().
| void GLWPlanView::addRecievePoints | ( | unsigned int | playerId, | |
| std::list< Vector > & | recievepoints | |||
| ) |
Definition at line 528 of file GLWPlanView.cpp.
References dragPoints_, planColor_, GLWPlanView::PlayerDrawnInfo::playerId, and GLWPlanView::PlayerDrawnInfo::recievepoints.
Referenced by ClientLinesHandler::processMessage().
| GLWPlanView::REGISTER_CLASS_HEADER | ( | GLWPlanView | ) |
| void GLWPlanView::drawMap | ( | ) | [protected] |
Definition at line 171 of file GLWPlanView.cpp.
References arenaHeight_, arenaWidth_, arenaX_, arenaY_, arrowTex_, GLState::BLEND_ON, circleTex_, GLTexture::create(), GLState::DEPTH_OFF, drawBuoys(), drawCameraPointer(), drawLines(), drawTanks(), drawTexture(), S3D::getDataFile(), glPopMatrix(), glPushMatrix(), glScalef(), glTranslatef(), GLWidget::h_, ImageFactory::loadAlphaImageHandle(), ImageFactory::loadImageHandle(), MAX, tankTex_, GLState::TEXTURE_ON, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by draw().
| void GLWPlanView::drawTexture | ( | ) | [protected] |
Definition at line 314 of file GLWPlanView.cpp.
References arenaHeight_, arenaWidth_, arenaX_, arenaY_, GLTexture::draw(), Landscape::getPlanATexture(), GL_QUADS, glBegin(), glColor3f(), glEnd(), glTexCoord2f(), glVertex2f(), Landscape::instance(), landscapeHeight_, landscapeWidth_, and planColor_.
Referenced by drawMap().
| void GLWPlanView::drawWall | ( | ) | [protected] |
| void GLWPlanView::drawCameraPointer | ( | ) | [protected] |
Definition at line 336 of file GLWPlanView.cpp.
References arenaHeight_, arenaWidth_, arrowTex_, GLTexture::draw(), Vector::get2DPerp(), MainCamera::getCamera(), GLCamera::getCurrentPos(), GLCamera::getLookAt(), GL_QUADS, glBegin(), glColor4f(), glEnd(), glPopMatrix(), glPushMatrix(), glTexCoord2f(), glTranslatef(), glVertex3fv(), GLWidget::h_, MainCamera::instance(), MAX, Vector::Normalize2D(), and GLWidget::w_.
Referenced by drawMap().
| void GLWPlanView::drawTanks | ( | ) | [protected] |
Definition at line 400 of file GLWPlanView.cpp.
References GLWToolTip::addToolTip(), arenaHeight_, arenaWidth_, arenaX_, arenaY_, FixedVector::asVector(), GLTexture::draw(), drawQuad(), flash_, Tank::getColor(), TankContainer::getPlayingTanks(), Tank::getPosition(), GLWTranslate::getPosX(), GLWTranslate::getPosY(), TankState::getReadyState(), Target::getRenderer(), TankState::getSpectator(), TankState::getState(), Tank::getState(), ScorchedContext::getTankContainer(), TankPosition::getTankPosition(), TargetRendererImplTank::getTips(), GL_QUADS, glBegin(), glColor3fv(), glEnd(), GLWidget::h_, GLWToolTip::instance(), ScorchedClient::instance(), MAX, TankState::sNormal, TankState::SNotReady, TankState::sReady, tankTex_, GLWTankTips::tankTip, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by drawMap().
| void GLWPlanView::drawLines | ( | ) | [protected] |
Definition at line 212 of file GLWPlanView.cpp.
References dragPoints_, drawLine(), glLineWidth(), glPopMatrix(), glPushMatrix(), glScalef(), glTranslatef(), GLWidget::h_, ScorchedClient::instance(), localPoints_, GLWPlanView::PlayerDrawnInfo::playerId, GLWPlanView::PlayerDrawnInfo::points, GLState::TEXTURE_OFF, GLWidget::w_, GLWidget::x_, and GLWidget::y_.
Referenced by drawMap().
| void GLWPlanView::drawLine | ( | PlayerDrawnInfo & | info | ) | [protected] |
Definition at line 268 of file GLWPlanView.cpp.
References Tank::getColor(), TankContainer::getTankById(), ScorchedContext::getTankContainer(), GL_LINE_STRIP, glBegin(), glColor4f(), glEnd(), glVertex2f(), ScorchedClient::instance(), GLWPlanView::PlayerDrawnInfo::playerId, GLWPlanView::PlayerDrawnInfo::points, GLWPlanView::PlayerDrawnInfo::recievepoints, and totalTime_.
Referenced by drawLines().
| void GLWPlanView::drawBuoys | ( | ) | [protected] |
Definition at line 383 of file GLWPlanView.cpp.
References circleTex_, GLTexture::draw(), drawQuad(), ScorchedContext::getOptionsTransient(), LandscapePoints::getPoints(), Landscape::getPoints(), OptionsTransient::getWallColor(), GL_QUADS, glBegin(), glColor3fv(), glEnd(), Landscape::instance(), ScorchedClient::instance(), int(), and OptionsTransient::wallNone.
Referenced by drawMap().
| bool GLWPlanView::simulateLine | ( | PlayerDrawnInfo & | info | ) | [protected] |
Definition at line 246 of file GLWPlanView.cpp.
References GLWPlanView::PlayerDrawnInfo::points, GLWPlanView::PlayerDrawnInfo::recievepoints, and totalTime_.
Referenced by simulate().
GLTexture GLWPlanView::arrowTex_ [protected] |
GLTexture GLWPlanView::tankTex_ [protected] |
GLTexture GLWPlanView::circleTex_ [protected] |
float GLWPlanView::arenaX_ [protected] |
Definition at line 56 of file GLWPlanView.h.
Referenced by draw(), drawMap(), drawTanks(), drawTexture(), and mouseDown().
float GLWPlanView::arenaY_ [protected] |
Definition at line 56 of file GLWPlanView.h.
Referenced by draw(), drawMap(), drawTanks(), drawTexture(), and mouseDown().
float GLWPlanView::arenaWidth_ [protected] |
Definition at line 56 of file GLWPlanView.h.
Referenced by draw(), drawCameraPointer(), drawMap(), drawTanks(), drawTexture(), and mouseDown().
float GLWPlanView::arenaHeight_ [protected] |
Definition at line 56 of file GLWPlanView.h.
Referenced by draw(), drawCameraPointer(), drawMap(), drawTanks(), drawTexture(), and mouseDown().
float GLWPlanView::landscapeWidth_ [protected] |
float GLWPlanView::landscapeHeight_ [protected] |
float GLWPlanView::animationTime_ [protected] |
float GLWPlanView::flashTime_ [protected] |
float GLWPlanView::totalTime_ [protected] |
Definition at line 60 of file GLWPlanView.h.
Referenced by drawLine(), mouseDown(), mouseDrag(), simulate(), and simulateLine().
float GLWPlanView::pointTime_ [protected] |
Definition at line 61 of file GLWPlanView.h.
Referenced by mouseDown(), mouseDrag(), and simulate().
float GLWPlanView::planColor_ [protected] |
Definition at line 62 of file GLWPlanView.h.
Referenced by addRecievePoints(), drawTexture(), and simulate().
bool GLWPlanView::flash_ [protected] |
bool GLWPlanView::firstTime_ [protected] |
bool GLWPlanView::dragging_ [protected] |
Definition at line 64 of file GLWPlanView.h.
Referenced by mouseDown(), mouseDrag(), mouseUp(), and simulate().
float GLWPlanView::dragLastX_ [protected] |
float GLWPlanView::dragLastY_ [protected] |
PlayerDrawnInfo GLWPlanView::localPoints_ [protected] |
Definition at line 66 of file GLWPlanView.h.
Referenced by drawLines(), mouseDown(), mouseDrag(), mouseUp(), and simulate().
std::list<PlayerDrawnInfo> GLWPlanView::dragPoints_ [protected] |
Definition at line 67 of file GLWPlanView.h.
Referenced by addRecievePoints(), drawLines(), and simulate().
std::list<Vector> GLWPlanView::sendPoints [protected] |
Definition at line 68 of file GLWPlanView.h.
Referenced by mouseDown(), mouseDrag(), mouseUp(), and simulate().
1.5.3