Gui.h

00001 // ----------------------------------------------------------------------------
00002 //
00003 // tagGame - Example code from the book:
00004 //
00005 //           Artficial Intelligence for Computer Games: An Introduction
00006 //           by John David Funge
00007 //
00008 //           www.ai4games.org
00009 //
00010 // Source code distributed under the Copyright (c) 2003-2007, John David Funge
00011 // Original author: John David Funge (www.jfunge.com)
00012 //
00013 // Licensed under the Academic Free License version 3.0 
00014 // (for details see LICENSE.txt in this directory).
00015 //
00016 // ----------------------------------------------------------------------------
00017 
00018 #ifndef TG_GUI_H
00019 #define TG_GUI_H
00020 
00021 #include "Vec.h"
00022 
00023 class GLUquadric;
00024 
00025 namespace tagGame
00026 {
00027    class GameState;
00028 
00030    class Gui
00031    {
00032    public:
00033       static const int colorDim = 4; // rgba
00034 
00035       static void createWindow(int const width, int const height, std::string const& title);
00036       static void destroyWindow();
00037       static void render(GameState* gs);
00038       static bool isQuit();
00039 
00040       static void drawCircle(RealVec const& center, RealVec const& orientation, Real const radius);
00041       static void drawArrow(RealVec const& begin, RealVec const& direction);
00042       static void drawLineSegment(RealVec const& begin, RealVec const& end);
00043       static void setColor(RealVec const& color);
00044 
00046       static void pause(int const t);
00047 
00048       static RealVec const& getColorFromName(std::string const& colorName);
00049 
00050    protected:
00051    private:
00052       static void initGL(int const width, int const height);
00053       static GLUquadric* q;
00054    };
00055 }
00056 
00057 #endif

Generated on Sat Mar 31 22:30:54 2007 for tagGame by  doxygen 1.5.1