2011-02-22 10:33:14 +00:00
|
|
|
|
|
|
|
/** \file KX_MaterialIpoController.h
|
|
|
|
* \ingroup ketsji
|
|
|
|
*/
|
|
|
|
|
2006-01-06 03:46:54 +00:00
|
|
|
#ifndef __KX_MATERIALIPOCONTROLLER_H__
|
|
|
|
#define __KX_MATERIALIPOCONTROLLER_H__
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "SG_Controller.h"
|
|
|
|
#include "SG_Spatial.h"
|
|
|
|
#include "KX_IInterpolator.h"
|
|
|
|
|
2008-07-25 13:45:57 +00:00
|
|
|
#include "STR_String.h" //typedef dword
|
|
|
|
|
2006-01-06 03:46:54 +00:00
|
|
|
class KX_MaterialIpoController : public SG_Controller
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MT_Vector4 m_rgba;
|
|
|
|
MT_Vector3 m_specrgb;
|
|
|
|
MT_Scalar m_hard;
|
|
|
|
MT_Scalar m_spec;
|
|
|
|
MT_Scalar m_ref;
|
|
|
|
MT_Scalar m_emit;
|
|
|
|
MT_Scalar m_alpha;
|
|
|
|
|
|
|
|
private:
|
|
|
|
T_InterpolatorList m_interpolators;
|
|
|
|
bool m_modified;
|
|
|
|
|
|
|
|
double m_ipotime;
|
2008-07-25 13:45:57 +00:00
|
|
|
dword m_matname_hash;
|
2006-01-06 03:46:54 +00:00
|
|
|
public:
|
2008-07-25 13:45:57 +00:00
|
|
|
KX_MaterialIpoController(dword matname_hash) :
|
2006-01-06 03:46:54 +00:00
|
|
|
m_modified(true),
|
2008-07-25 13:45:57 +00:00
|
|
|
m_ipotime(0.0),
|
|
|
|
m_matname_hash(matname_hash)
|
2006-01-06 03:46:54 +00:00
|
|
|
{}
|
|
|
|
virtual ~KX_MaterialIpoController();
|
|
|
|
virtual SG_Controller* GetReplica(class SG_Node* destnode);
|
|
|
|
virtual bool Update(double time);
|
|
|
|
virtual void SetSimulatedTime(double time) {
|
|
|
|
m_ipotime = time;
|
|
|
|
m_modified = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SetOption(
|
|
|
|
int option,
|
|
|
|
int value
|
2012-06-06 22:38:39 +00:00
|
|
|
) {
|
2006-01-06 03:46:54 +00:00
|
|
|
// intentionally empty
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
void AddInterpolator(KX_IInterpolator* interp);
|
2009-08-18 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_CXX_GUARDEDALLOC
|
2012-06-25 09:14:37 +00:00
|
|
|
MEM_CXX_CLASS_ALLOC_FUNCS("GE:KX_MaterialIpoController")
|
2009-08-18 15:37:31 +00:00
|
|
|
#endif
|
2006-01-06 03:46:54 +00:00
|
|
|
};
|
|
|
|
|
2012-10-09 13:36:42 +00:00
|
|
|
#endif /* __KX_MATERIALIPOCONTROLLER_H__ */
|