- Cal3D 0.9 API Reference - |
00001 //****************************************************************************// 00002 // morphtargetmixer.h // 00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger // 00004 //****************************************************************************// 00005 // This library is free software; you can redistribute it and/or modify it // 00006 // under the terms of the GNU Lesser General Public License as published by // 00007 // the Free Software Foundation; either version 2.1 of the License, or (at // 00008 // your option) any later version. // 00009 //****************************************************************************// 00010 00011 #ifndef CAL_MORPHTARGETMIXER_H 00012 #define CAL_MORPHTARGETMIXER_H 00013 00014 //****************************************************************************// 00015 // Includes // 00016 //****************************************************************************// 00017 00018 #include "cal3d/global.h" 00019 00020 //****************************************************************************// 00021 // Forward declarations // 00022 //****************************************************************************// 00023 00024 class CalModel; 00025 00026 //****************************************************************************// 00027 // Class declaration // 00028 //****************************************************************************// 00029 00030 /*****************************************************************************/ 00033 class CAL3D_API CalMorphTargetMixer 00034 { 00035 // member variables 00036 protected: 00037 std::vector<float> m_vectorCurrentWeight; 00038 std::vector<float> m_vectorEndWeight; 00039 std::vector<float> m_vectorDuration; 00040 CalModel *m_pModel; 00041 00042 // constructors/destructor 00043 public: 00044 CalMorphTargetMixer(); 00045 virtual ~CalMorphTargetMixer(); 00046 00047 // member functions 00048 public: 00049 bool blend(int id, float weight, float delay); 00050 bool clear(int id, float delay); 00051 float getCurrentWeight(int id); 00052 float getCurrentWeightBase(); 00053 int getMorphTargetCount(); 00054 bool create(CalModel *pModel); 00055 void destroy(); 00056 void update(float deltaTime); 00057 }; 00058 00059 #endif 00060 00061 //****************************************************************************//