Blender V2.61 - r43446
|
00001 00006 #ifndef __KX_MATERIALIPOCONTROLLER_H__ 00007 #define __KX_MATERIALIPOCONTROLLER_H__ 00008 00009 00010 00011 #include "SG_Controller.h" 00012 #include "SG_Spatial.h" 00013 #include "KX_IInterpolator.h" 00014 00015 #include "STR_String.h" //typedef dword 00016 00017 class KX_MaterialIpoController : public SG_Controller 00018 { 00019 public: 00020 MT_Vector4 m_rgba; 00021 MT_Vector3 m_specrgb; 00022 MT_Scalar m_hard; 00023 MT_Scalar m_spec; 00024 MT_Scalar m_ref; 00025 MT_Scalar m_emit; 00026 MT_Scalar m_alpha; 00027 00028 private: 00029 T_InterpolatorList m_interpolators; 00030 bool m_modified; 00031 00032 double m_ipotime; 00033 dword m_matname_hash; 00034 public: 00035 KX_MaterialIpoController(dword matname_hash) : 00036 m_modified(true), 00037 m_ipotime(0.0), 00038 m_matname_hash(matname_hash) 00039 {} 00040 virtual ~KX_MaterialIpoController(); 00041 virtual SG_Controller* GetReplica(class SG_Node* destnode); 00042 virtual bool Update(double time); 00043 virtual void SetSimulatedTime(double time) { 00044 m_ipotime = time; 00045 m_modified = true; 00046 } 00047 00048 void 00049 SetOption( 00050 int option, 00051 int value 00052 ){ 00053 // intentionally empty 00054 }; 00055 00056 00057 void AddInterpolator(KX_IInterpolator* interp); 00058 00059 00060 #ifdef WITH_CXX_GUARDEDALLOC 00061 public: 00062 void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_MaterialIpoController"); } 00063 void operator delete( void *mem ) { MEM_freeN(mem); } 00064 #endif 00065 }; 00066 00067 00068 00069 00070 #endif//__KX_MATERIALIPOCONTROLLER_H__