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
building_generic.h
Go to the documentation of this file.
1 #ifndef __BUILDING_GENERIC_H
2 #define __BUILDING_GENERIC_H
3 
4 #include "unit_generic.h"
5 class Terrain;
7 class Flightgroup;
8 class Building : public Unit
9 {
10 protected:
12  {
15  }
16  parent;
17  bool continuous;
18  bool vehicle;
19 
20 protected: Building( ContinuousTerrain *parent,
21  bool vehicle,
22  const char *filename,
23  bool SubUnit,
24  int faction,
25  const std::string &unitModifications = std::string( "" ),
26  Flightgroup *fg = NULL );
27  Building( Terrain *parent,
28  bool vehicle,
29  const char *filename,
30  bool SubUnit,
31  int faction,
32  const std::string &unitModifications = std::string( "" ),
33  Flightgroup *fg = NULL );
34 
35  friend class UnitFactory;
36 
37 public:
38 
39  virtual enum clsptr isUnit() const
40  {
41  return BUILDINGPTR;
42  }
43 
44  virtual void UpdatePhysics2( const Transformation &trans,
45  const Transformation &old_physical_state,
46  const Vector &accel,
47  float difficulty,
48  const Matrix &transmat,
49  const Vector &CumulativeVelocity,
50  bool ResolveLast,
51  UnitCollection *uc = NULL )
52  {
53  Unit::UpdatePhysics2( trans, old_physical_state, accel, difficulty, transmat, CumulativeVelocity, ResolveLast, uc );
54  }
55 
56  bool ownz( void *parent )
57  {
58  return this->parent.terrain == (Terrain*) parent;
59  }
60 
61 protected: Building( std::vector< Mesh* >m, bool b, int i ) : Unit( m, b, i ) {}
63  Building() {}
65 //Building( const Building& );
67 //Building& operator=( const Building& );
68 };
69 
70 #endif
71