Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
terrain.h
Go to the documentation of this file.
1 #ifndef TERRAIN_H_
2 #define TERRAIN_H_
3 #include "gfx/quadtree.h"
4 class Unit;
5 class Vector;
6 
7 #define TERRAINRENDER 1
8 #define TERRAINUPDATE 2
9 class Terrain : public QuadTree
10 {
11  updateparity *updatetransform;
12  float TotalSizeX;
13  float TotalSizeZ;
14  float mass;
15  int whichstage;
16  char draw;
17  void ApplyForce( Unit *un, const Vector &norm, float distance );
18 public: Terrain( const char *filename,
19  const Vector &Scales,
20  const float mass,
21  const float radius,
22  updateparity *updatetransform = identityparity );
23  void SetTotalSize( float X, float Z )
24  {
25  TotalSizeX = X;
26  TotalSizeZ = Z;
27  }
28  ~Terrain();
29  void Collide( Unit *un, const Matrix &t );
30  void Collide( Unit *un );
31  void Collide();
32  void SetTransformation( const Matrix &mat );
33  static void CollideAll();
34  static void DeleteAll();
35  void Render();
36  static void RenderAll();
37  static void UpdateAll( int resolution );
38  void DisableDraw();
39  void EnableDraw();
40  void DisableUpdate();
41  void EnableUpdate();
42  Vector GetUpVector( const Vector &pos );
43 };
44 #endif
45