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

Terrain.h

Go to the documentation of this file.
00001 #ifndef _TERRAIN_H_
00002 #define _TERRAIN_H_
00003 
00004 #include "BuriedObject.h"
00005 #include "Coin.h"
00006 #include "ColorMapLoader.h"
00007 #include "DirtPath.h"
00008 #include "HeightMapLoader.h"
00009 #include "Inventory.h"
00010 #include "LocalWorld.h"
00011 #include "Museum.h"
00012 #include "Object.h"
00013 #include "Path.h"
00014 #include "River.h"
00015 #include "StaticBuilding.h"
00016 #include "Tree.h"
00017 #include "Vector2.h"
00018 #include "Vector3.h"
00019 #include "Water.h"
00020 #include "WaterFall.h"
00021 
00028 class Terrain : public LocalWorld
00029 {
00030  public:
00031   Terrain(string filename);
00032   virtual ~Terrain();
00033 
00034   virtual void draw();
00035   double getHeight(double x, double z); 
00036 
00037   int getWidthDimension() { return dynamic_cast < HeightMapLoader *>(_fileLoader)->getWidthDimension(); }
00038   int getHeightDimension() { return dynamic_cast < HeightMapLoader *>(_fileLoader)->getHeightDimension(); }
00039 
00040   Inventory *getBuriedObject(int x, int z);
00041   void removeBuriedObject();
00042   
00043   virtual Object *checkCollision(Vector3 position, double radius = 0.0);
00044   int getScaleSize() { return dynamic_cast < HeightMapLoader *>(_fileLoader)->getScaleSize(); }
00045 
00046  protected:
00050   void load();
00051 
00052   vector < ColorMapObject * > _colorMapObjects;
00053 
00054   vector < Water * > _water; // hold rivers, ponds, etc
00055   vector < StaticBuilding * > _staticBuildings; // hold museum, post office, etc
00056   vector < Path * > _paths; // holds dirt/stone paths
00057   vector < Plant * > _plants;
00058   vector < BuriedObject * > _buriedObjects;
00059   // hold the last burried object picked
00060   BuriedObject *_lastBuriedObject;
00061 };
00062 
00063 #endif

Generated on Wed Apr 21 11:10:53 2004 for naturecalls by doxygen1.2.18