]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - plugins/spritemodel/spritemodel.h
Merge branch 'mschwan/gdef-inline-fix' into 'master'
[xonotic/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() {
40         if ( --refCount == 0 ) {
41                 delete this;
42         }
43 }
44
45 //IRender
46 void Draw( int state, int rflags ) const;
47 const aabb_t *GetAABB() const { return &m_BBox; }
48
49 //ISelect
50 //bool TestRay (const ray_t *ray, vec_t *dist) const;
51
52 void Construct( IShader *pShader );
53
54 protected:
55 IShader *m_pShader;
56
57 private:
58 int refCount;
59 aabb_t m_BBox;
60 };
61
62 void LoadSpriteModel( entity_interfaces_t *interfaces, const char *name );