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
cont_terrain.h
Go to the documentation of this file.
1 #include "cmd/collide2/Stdafx.h"
3 #include "terrain.h"
4 class StarSystem;
5 const int numcontterr = 4;
6 struct MeshDat
7 {
8  class Mesh *mesh;
11 };
13 {
14  Vector Scales;
15  float sizeX;
16  float sizeZ;
17  int width;
18  int numcontterr;
19  Terrain **data;
20  MeshDat *md;
21  Matrix transformation;
22  QVector *location;
23  bool *dirty;
24  bool checkInvScale( double &pos, double campos, float size );
25 public: ContinuousTerrain( const char *filenameUL, const Vector &Scales = Vector( 0, 0, 0 ), const float mass = 0 );
26  void SetTransformation( const Matrix &transformation );
30  void AdjustTerrain( StarSystem* );
31 
32  void AdjustTerrain( Matrix &transform, const Matrix &transformation, const QVector &unitpos, int i );
34  void DisableDraw();
35  void EnableDraw();
36  void DisableUpdate();
37  void EnableUpdate();
38  void Draw();
39  QVector GetGroundPosIdentTrans( QVector ShipPos, Vector &norm );
40  QVector GetGroundPos( QVector ShipPos, Vector &norm );
41  Vector GetUpVector( const Vector &pos );
42  void Collide( Unit *un, Matrix trans );
43  void Collide( Unit *un );
44  void Collide();
45  void GetTotalSize( float &X, float &Z )
46  {
47  X = sizeX;
48  Z = sizeZ;
49  }
50 };
51