git-svn-id: https://scorched3d.svn.sourceforge.net/svnroot/scorched3d/trunk/scorched...
[scorched3d/parasti.git] / src / client / tankgraph / TankMesh.h
blobed2c0aeadac2632f6afd2bfb7b6fbd7db9e2824b
1 ////////////////////////////////////////////////////////////////////////////////
2 // Scorched3D (c) 2000-2009
3 //
4 // This file is part of Scorched3D.
5 //
6 // Scorched3D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // Scorched3D is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with Scorched3D; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ////////////////////////////////////////////////////////////////////////////////
21 #if !defined(AFX_TANKMESH_H__CB857C65_A22F_4FBC_9344_EFF22F8A4EEA__INCLUDED_)
22 #define AFX_TANKMESH_H__CB857C65_A22F_4FBC_9344_EFF22F8A4EEA__INCLUDED_
24 #include <common/Vector4.h>
25 #include <graph/ModelRendererMesh.h>
26 #include <list>
28 class TankMesh : public ModelRendererMesh
30 public:
31 TankMesh(Model &tank);
32 virtual ~TankMesh();
34 void draw(float frame, bool drawS, float *rotMatrix, Vector &position,
35 float fireOffSet, float rotXY, float rotXZ,
36 bool absCenter = false, float scale = 1.0f, float fade = 1.0f,
37 bool setState = true);
38 int getNoTris();
40 static void drawSight();
41 protected:
42 enum MeshType
44 eNone,
45 eTurret,
46 eGun
49 bool drawS_;
50 float fireOffSet_;
51 float scale_;
52 float rotXY_;
53 float rotXZ_;
54 Vector gunOffset_;
55 Vector turretCenter_;
56 std::vector<MeshType> meshTypes_;
58 virtual void drawMesh(unsigned int m, Mesh *mesh, float currentFrame, bool setState);
59 void setupTankMesh();
62 #endif // !defined(AFX_TANKMESH_H__CB857C65_A22F_4FBC_9344_EFF22F8A4EEA__INCLUDED_)