add missing files after merging
[blender.git] / source / gameengine / Ketsji / KX_MaterialIpoController.h
1
2 /** \file KX_MaterialIpoController.h
3  *  \ingroup ketsji
4  */
5
6 #ifndef __KX_MATERIALIPOCONTROLLER_H__
7 #define __KX_MATERIALIPOCONTROLLER_H__
8
9
10
11 #include "SG_Controller.h"
12 #include "SG_Spatial.h"
13 #include "KX_IInterpolator.h"
14
15 #include "STR_String.h" //typedef dword
16
17 class KX_MaterialIpoController : public SG_Controller
18 {
19 public:
20         MT_Vector4                      m_rgba;
21         MT_Vector3                      m_specrgb;
22         MT_Scalar                       m_hard;
23         MT_Scalar                       m_spec;
24         MT_Scalar                       m_ref;
25         MT_Scalar                       m_emit;
26         MT_Scalar                       m_alpha;
27
28 private:
29         T_InterpolatorList      m_interpolators;
30         bool                            m_modified;
31
32         double                  m_ipotime;
33         dword                           m_matname_hash;
34 public:
35         KX_MaterialIpoController(dword matname_hash) : 
36                                 m_modified(true),
37                                 m_ipotime(0.0),
38                                 m_matname_hash(matname_hash)
39                 {}
40         virtual ~KX_MaterialIpoController();
41         virtual SG_Controller*  GetReplica(class SG_Node* destnode);
42         virtual bool Update(double time);
43         virtual void SetSimulatedTime(double time) {
44                 m_ipotime = time;
45                 m_modified = true;
46         }
47         
48                 void
49         SetOption(
50                 int option,
51                 int value
52         ){
53                 // intentionally empty
54         };
55
56
57         void    AddInterpolator(KX_IInterpolator* interp);
58
59
60 #ifdef WITH_CXX_GUARDEDALLOC
61 public:
62         void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_MaterialIpoController"); }
63         void operator delete( void *mem ) { MEM_freeN(mem); }
64 #endif
65 };
66
67
68
69
70 #endif//__KX_MATERIALIPOCONTROLLER_H__