Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

surface.h

Go to the documentation of this file.
00001 #ifndef __SURFACE_H__
00002 #define __SURFACE_H__
00003 #include "bolt.h"
00004 #include "id_table.h"
00005 #include "ext_stl.h"
00006 #include "obstacle_grid.h"
00007 #include "spectre.h"
00009 class Surface {
00010     Matrix pos; 
00011 public:
00013     IdTable<Bolt> boltField;
00015     ObstacleGrid obstacleGrid;
00016     
00017     void draw(); 
00018 
00019     Vector toWorld(const Vector &localSpace);
00021     Vector toSurface(const Vector &worldSpace);
00022 };
00023 
00025 class World {
00026     //Private copy constructor to give an error
00027     World (const World &) {
00028     }
00029 public:
00030     void fixBoltCollideOrder() {
00031         for (int i=0;i<surfaces.size();i++) {
00032             surfaces[i]->boltField.fixCollideOrder();
00033         }
00034     }
00035     std::vector <Surface *> surfaces; 
00036     IdTable<Spectre> table; 
00037     std::vector <int> freeSurfaces; 
00038     ~World () {
00039         for (unsigned int i=0;i<surfaces.size();i++) {
00040             delete surfaces[i];
00041         }
00042     }
00043     World () {}
00044 };
00045 
00046 #endif

Generated on Mon Jul 7 21:13:45 2003 for Ethereal by doxygen1.2.15