]> icculus.org git repositories - divverent/netradiant.git/blob - plugins/spritemodel/spritemodel.h
local variables ALSO work better when declared
[divverent/netradiant.git] / plugins / spritemodel / spritemodel.h
1 /*
2 Copyright (C) 2002 Dominic Clifton.
3
4 This file is part of GtkRadiant.
5
6 GtkRadiant 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.
10
11 GtkRadiant 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.
15
16 You should have received a copy of the GNU General Public License
17 along with GtkRadiant; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19 */
20
21 //
22 // Sprite Model Plugin
23 //
24 // Code by Hydra aka Dominic Clifton
25 //
26 // Based on MD3Model source code by SPoG
27 //
28
29 #include "plugin.h"
30
31 /*! i guess a description should go here... */
32 class CSpriteModel: public IRender//, public ISelect
33 {
34 public:
35   CSpriteModel();
36   ~CSpriteModel();
37
38   void IncRef() { refCount++; }
39   void DecRef() { if(--refCount == 0) delete this; }
40
41   //IRender
42         void Draw(int state, int rflags) const;
43   const aabb_t *GetAABB() const { return &m_BBox; }
44
45   //ISelect
46   //bool TestRay (const ray_t *ray, vec_t *dist) const;
47
48   void Construct(IShader *pShader);
49
50 protected:
51   IShader *m_pShader;
52
53 private:
54   int refCount;
55         aabb_t m_BBox;
56 };
57
58 void LoadSpriteModel(entity_interfaces_t *interfaces, const char *name);
59