Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields

gltorch.h

00001 /***************************************************************************
00002                           gltorch.h  -  description
00003                              -------------------
00004     begin                : Sat Sep 20 2003
00005     copyright            : (C) 2003 by Gabor Torok
00006     email                : cctorok@yahoo.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef GLTORCH_H
00019 #define GLTORCH_H
00020 
00021 #include "glshape.h"
00022 
00023 class GLShape;
00024 
00029 class GLTorch : public GLShape  {
00030 private:
00031   GLuint flameTex;
00032 
00033   int PARTICLE_COUNT;
00034   ParticleStruct *particle[200];
00035   
00036   GLuint torchback;
00037   int torch_dir;
00038   
00039 public:
00040   GLTorch(GLuint texture[], GLuint flameTex,
00041                   int width, int depth, int height,
00042                   char *name, int descriptionGroup,
00043                   Uint32 color, Uint8 shapePalIndex=0, 
00044                   GLuint torchback=0, int torch_dir=Constants::NORTH);
00045         
00046   ~GLTorch();
00047   
00048   void draw();
00049 
00050   inline bool drawFirst() { return false; }
00051   // if true, the next two functions are called
00052   inline bool drawLater() { return true; }
00053   inline void setupBlending() { glBlendFunc(GL_SRC_ALPHA, GL_ONE); }
00054 
00055           
00056 protected:
00057   void initParticles();
00058 };
00059 
00060 #endif

Generated on Thu Jun 16 21:50:43 2005 for scourge by  doxygen 1.4.0