Klamp't  0.9.0
Terrain.h
1 #ifndef TERRAIN_H
2 #define TERRAIN_H
3 
4 #include "ManagedGeometry.h"
5 #include <vector>
6 #include <string>
7 
8 namespace Klampt {
9  using namespace std;
10  using namespace Math;
11 
16 {
17 public:
21  bool Load(const char* fn);
22  bool Save(const char* fn);
24  bool LoadGeometry(const char* fn);
28  void InitCollisions();
29  inline void SetUniformFriction(Real mu) {
30  kFriction.resize(geometry->NumElements());
31  fill(kFriction.begin(),kFriction.end(),mu);
32  }
34  void DrawGL();
35  void DrawGLOpaque(bool opaque);
36 
37  string name;
38  string geomFile;
39  ManagedGeometry geometry;
40  vector<Real> kFriction; //per element friction
41 };
42 
43 } //namespace Klampt
44 
45 #endif
A "smart" geometry loading class that caches previous geometries and maintains shared collision detec...
Definition: ManagedGeometry.h:62
A model of a static terrain with known friction.
Definition: Terrain.h:15
Definition: ContactDistance.h:6