Klamp't  0.8.1
Terrain.h
1 #ifndef TERRAIN_H
2 #define TERRAIN_H
3 
4 #include "ManagedGeometry.h"
5 #include <vector>
6 #include <string>
7 using namespace std;
8 using namespace Math;
9 
13 class Terrain
14 {
15 public:
19  bool Load(const char* fn);
20  bool Save(const char* fn);
22  bool LoadGeometry(const char* fn);
26  void InitCollisions();
27  inline void SetUniformFriction(Real mu) {
28  kFriction.resize(geometry->NumElements());
29  fill(kFriction.begin(),kFriction.end(),mu);
30  }
32  void DrawGL();
33 
34  string name;
35  string geomFile;
36  ManagedGeometry geometry;
37  vector<Real> kFriction; //per element friction
38 };
39 
40 #endif
A model of a static terrain with known friction.
Definition: Terrain.h:13
A "smart" geometry loading class that caches previous geometries, and does not re-load or re-initiali...
Definition: ManagedGeometry.h:37