- 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 CalMesh; 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 float m_duration; 00040 CalMesh *m_pMesh; 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 blendBase(float weight, float delay); 00051 bool clear(int id, float delay); 00052 bool clearBase(float delay); 00053 float getCurrentWeight(int id); 00054 float getCurrentWeightBase(); 00055 int getMorphTargetCount(); 00056 bool create(CalMesh *pMesh); 00057 void destroy(); 00058 void update(float deltaTime); 00059 }; 00060 00061 #endif 00062 00063 //****************************************************************************//