Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HBhvInterpolator.h

00001 //
00002 // Copyright (c) 2000 by Tech Soft 3D, LLC.
00003 // The information contained herein is confidential and proprietary to
00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under
00005 // civil and criminal statutes.  Tech Soft 3D shall pursue its civil
00006 // and criminal remedies in the event of unauthorized use or misappropriation
00007 // of its trade secrets.  Use of this information by anyone other than
00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a
00009 // written non-disclosure agreement, expressly prescribing the scope and
00010 // manner of such use.
00011 //
00012 
00013 #ifndef _H_HBhvInterpolator_H
00014 #define _H_HBhvInterpolator_H
00015 
00016 #ifdef H_PACK_8
00017 #pragma pack(push)
00018 #pragma pack(8)
00019 #endif
00020 
00021 #include "HTools.h"
00022 #include "HBhvUtility.h"
00023 #include "varray.h"
00024 
00025 
00026 class HUtilityXMLGenerator;
00027 class HBhvAnimation;
00028   
00029 #ifdef WINDOWS_SYSTEM
00030 template class MVO_API VArray< HKeyframe *>;
00031 template class MVO_API VArray< void *>;
00032 #endif
00033 
00034 
00038 enum TrailInterpolatorType
00039 {
00040     Forward,          
00041     Backward,           
00042     Full                
00043 };
00044 
00045 
00046 #define REPLACE_VARRAY(c, pos) {    if (m_pArray.Count() > pos)     \
00047                                     {                               \
00048                                     HKeyframe *temp = m_pArray[pos];\
00049                                     delete temp;\
00050                                     }                               \
00051                                     m_pArray.ReplaceAt(c, pos);    }                                
00052 
00053 #define REMOVE_VARRAY(pos)          {  HKeyframe *temp = m_pArray[pos];\
00054                                         delete temp;\
00055                                         m_pArray.RemoveAt(pos);    }                                
00056 
00057 #define CURVE_ARRAY(pos)        ((HKeyframeChannelCurve *)GetAt(pos))
00058                             
00059 
00060 
00062 
00067 class MVO_API HBhvInterpolator
00068 {
00069 public:
00075     HBhvInterpolator(HBhvAnimation *animation = 0, const char *name = 0);
00076     virtual ~HBhvInterpolator();
00077 
00079     virtual const char * GetType() = 0;
00080 
00086     void SetInstancedInterpolator(HBhvInterpolator *interpolator);
00087 
00094     virtual HBhvInterpolator *CreateInstance(HBhvAnimation *animationinst) = 0;
00095 
00101     void  Replace(HKeyframe * c, int pos) { REPLACE_VARRAY(c, pos); }
00102 
00108     void  Insert(HKeyframe * piece, int pos = 0) { m_pArray.InsertAt(piece, pos); }
00109 
00114     void  Append(HKeyframe * piece) { m_pArray.InsertAt(piece, m_pArray.Count()); }
00115 
00120     void  Remove(int pos) { REMOVE_VARRAY(pos); }
00121 
00123     const char * GetName() { return m_Name; }
00124 
00130     virtual HKeyframe *GetAt(int pos) { return m_pArray[pos]; }
00131 
00134     HKeyframe **GetArray() { return &m_pArray[0]; }
00135 
00137     virtual int   GetArrayLength() { return m_pArray.Count(); }
00138    
00146     void Duplicate(int pos, bool replace, bool next);
00147     
00154     void Copy(int pos, int adpos, bool replace);
00155  
00159     virtual void Serialize(HUtilityXMLGenerator *xmlgen) { }
00160 
00166     virtual void Interpolate(int keyframe, float fraction) { };
00167     virtual void Evaluate(int keyframe, float fraction, bool &hasPos, HPoint &pos, bool &hasQuat, HQuat &quat, bool &hasScale, HPoint &scale) { };
00168  
00170     HBhvAnimation * GetAnimation() { return m_pAnimation; }
00171 
00175     void  SetAnimation(HBhvAnimation *animation) { m_pAnimation = animation; }
00176 
00181     void GetTranslationFromMatrix(HPoint &translation);
00186     void GetRotationFromMatrix(HQuat &rotation);
00187 
00191     virtual void Reset() { };
00192 
00193 protected:  
00194 
00198     void SetTarget();
00199 
00204     void AddPositionToMatrix(HPoint &trans);
00205 
00210     void AddRotationToMatrix(float rot[16]);
00211 
00216     void AddScaleToMatrix(HPoint &scale);
00217     
00218     
00219     char                        m_Name[BHV_MAX_NAME_LENGTH];        
00220     VArray< HKeyframe *>        m_pArray;                           
00221     HBhvAnimation*              m_pAnimation;                       
00222     HBhvInterpolator*           m_pInterpolatorInstance;            
00223     HC_KEY                      m_pTarget;                          
00225 };
00226 
00227 
00229 
00233 class MVO_API HBhvInterpolatorPosition : public HBhvInterpolator
00234 {
00235 public:
00241     HBhvInterpolatorPosition(HBhvAnimation *animation = 0, const char *name = 0);
00242 
00243 
00245     const char * GetType();
00246 
00253     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
00254 
00261     void  InsertLinear(HPoint pos, int l = 0) { HKeyframeChannelLinear * linear = new HKeyframeChannelLinear; 
00262                 linear->m_cp = pos; m_pArray.InsertAt(linear, l); }
00269     void  ReplaceLinear(HPoint pos, int l) { HKeyframeChannelLinear * c = new HKeyframeChannelLinear; 
00270                 c->m_cp = pos; REPLACE_VARRAY(c, l) }
00277     void  InsertCurve(HPoint pos, int l = 0) { HKeyframeChannelCurve * linear = new HKeyframeChannelCurve; 
00278                 linear->m_cp = pos; m_pArray.InsertAt(linear, l); }
00285     void  ReplaceCurve(HPoint pos, int l) { HKeyframeChannelCurve * c = new HKeyframeChannelCurve; 
00286                 c->m_cp = pos; REPLACE_VARRAY(c, l) }
00287 
00294     void  InsertDiscrete(HPoint pos, int l = 0) { HKeyframeChannelDiscrete * d = new HKeyframeChannelDiscrete; 
00295                 d->m_cp = pos; m_pArray.InsertAt(d, l); }
00296 
00300     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
00304     static  void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
00305 
00311     virtual void Interpolate(int keyframe, float fraction);
00312 
00313     virtual void Evaluate(int keyframe, float fraction, bool &hasPos, HPoint &pos, bool &hasQuat, HQuat &quat, bool &hasScale, HPoint &scale);
00314 
00318     virtual void Reset();
00319     
00326     virtual void CalculatePos(int keyframe, float fraction, HPoint &res);
00327 
00328 protected:
00333     virtual void InterpolateCamera(HPoint &pos, bool simulate = false);
00334 
00339     virtual void InterpolateCamera2(HPoint &pos, bool simulate = false);
00340 
00345     virtual void CalculateAllTangents(); 
00346 };
00347 
00349 
00352 class MVO_API HBhvInterpolatorTrail : public HBhvInterpolatorPosition
00353 {
00354 public:
00360     HBhvInterpolatorTrail(HBhvAnimation *animation = 0, const char *name = 0);
00361     ~HBhvInterpolatorTrail();
00362 
00363 
00365     const char * GetType();
00366 
00373     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
00374  
00378     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
00382     static  void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
00383 
00389     virtual void Interpolate(int keyframe, float fraction);
00393     virtual void Reset();
00394 
00398     void Init();
00399     void SetTrailType(TrailInterpolatorType tt) { m_TrailType = tt; }
00400     void SetTrailColor(const char *color) { strcpy(m_Color, color); }
00401     void SetTrailWeight(int weight) { m_Weight = weight; }
00402     void SetTrailStyle(const char *style) { strcpy(m_Style, style); }
00403     
00404     
00405 protected:
00406     TrailInterpolatorType m_TrailType; 
00407     char                m_Color[MVO_SMALL_BUFFER_SIZE]; 
00408     int                 m_Weight; 
00409     char                m_Style[MVO_SMALL_BUFFER_SIZE]; 
00410     HC_KEY              m_TrailSegment, m_trailKey;         
00411     int                 m_lastkeyframe;
00412     bool                m_initialized;
00413  
00414 };
00415 
00417 
00420 class MVO_API HBhvInterpolatorAxisRotate : public HBhvInterpolator
00421 {
00422 public:
00428     HBhvInterpolatorAxisRotate(HBhvAnimation *animation = 0, const char *name = 0);
00429 
00433     void SetAxis(float x, float y, float z) {m_axis.x = x; m_axis.y = y; m_axis.z = z; }
00434 
00438     void GetAxis (HPoint &axis) { axis = m_axis; }
00439 
00441     const char * GetType();
00442 
00449     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
00450   
00457     void  Insert(float angle, int l = 0) { HKeyframeAxisRotation* linear = new HKeyframeAxisRotation; 
00458                 linear->m_angle = angle; m_pArray.InsertAt(linear, l); }
00465     void  Replace(float angle, int l) { HKeyframeAxisRotation * c = new HKeyframeAxisRotation; 
00466                 c->m_angle = angle; REPLACE_VARRAY(c, l); }
00467 
00471     static  void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
00472 
00476     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
00477 
00478 
00484     virtual void Interpolate(int keyframe, float fraction);
00485     virtual void Evaluate(int keyframe, float fraction, bool &hasPos, HPoint &pos, bool &hasQuat, HQuat &quat, bool &hasScale, HPoint &scale);
00486 
00487 protected:
00488     HPoint          m_axis;             
00490 };
00491 
00492 
00494     
00495 class MVO_API HBhvInterpolatorColor : public HBhvInterpolator
00496 {
00497 public:
00504     HBhvInterpolatorColor(HBhvAnimation *animation = 0, const char *name = 0);
00506     const char * GetType();
00507 
00514     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
00515 
00523     void  Insert(HPoint pos, int l = 0) { HKeyframeChannelLinear* color = new HKeyframeChannelLinear; 
00524                 color->m_cp = pos; m_pArray.InsertAt(color, l); }
00532     void  Replace(HPoint pos, int l) { HKeyframeChannelLinear * c = new HKeyframeChannelLinear; 
00533                 c->m_cp = pos; REPLACE_VARRAY(c, l); }
00534 
00538     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
00539 
00543     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
00544     
00548     void SetGeomType (const char *geomtype);
00549 
00551     char * GetGeomType () { return m_GeomType; }
00552 
00557     void SetColorComponent (const char *ColorComponent);
00558 
00560     char * GetColorComponent () { return m_ColorComponent; }
00561 
00567     virtual void Interpolate(int keyframe, float fraction);
00568 
00569 protected:
00570     char                m_ColorComponent[MVO_BUFFER_SIZE];  
00571     char                m_GeomType[MVO_BUFFER_SIZE];        
00573 };
00574 
00575 
00576 /*
00577 class MVO_API HBhvInterpolatorQuat : public HBhvInterpolator
00578 {
00579 public:
00580     HBhvInterpolatorQuat(const char *name = 0);
00581     const char * GetType();
00582 
00583     virtual HBhvInterpolatorInstance * CreateInstance(HBhvanimation *ainst);
00584     void  Insert(HQuat pos, int l) { HKeyframeQuatSlerp * rot = new HKeyframeQuatSlerp; 
00585                 rot->m_quat = pos; m_pArray.InsertAt(rot, l); }
00586     void  Replace(HQuat pos, int l) { HKeyframeQuatSlerp * c = new HKeyframeQuatSlerp; 
00587                 c->m_quat = pos; REPLACE_VARRAY(c, l); }
00588 
00589 };
00590 
00591 
00592 
00593 class MVO_API HBhvInterpolatorInstanceQuat : public HBhvInterpolatorInstance
00594 {
00595 public:
00596     HBhvInterpolatorInstanceQuat(HBhvInterpolatorQuat *ip, HBhvanimation *ainst) : HBhvInterpolatorInstance((HBhvInterpolator *)ip, ainst) {}
00597     virtual void Interpolate(int keyframe, float fraction);
00598  
00599 protected:
00600 
00601     virtual void InterpolateCamera(float *quat);
00602 
00603 };
00604 
00605 */
00606 
00607 
00608 
00610 
00611 class MVO_API HBhvInterpolatorScale : public HBhvInterpolator
00612 {
00613 public:
00614 
00621     virtual void CalculatePos(int keyframe, float fraction,  HPoint &res);
00622 
00623 
00628     virtual void CalculateAllTangents(); 
00629 
00633     virtual void Reset();
00634 
00640     HBhvInterpolatorScale(HBhvAnimation *animation = 0, const char *name = 0);
00641 
00643     const char * GetType();
00644 
00651     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
00652 
00659     void  Insert(HPoint pos, int l = 0) { HKeyframeChannelLinear * scale = new HKeyframeChannelLinear; 
00660                 scale->m_cp = pos; m_pArray.InsertAt(scale, l); }
00667     void  Replace(HPoint pos, int l) { HKeyframeChannelLinear * c = new HKeyframeChannelLinear; 
00668                 c->m_cp = pos; REPLACE_VARRAY(c, l) }
00669 
00673     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
00674 
00678     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
00679 
00685     virtual void Interpolate(int keyframe, float fraction);
00686     void Evaluate(int keyframe, float fraction, bool &hasPos, HPoint &pos, bool &hasQuat, HQuat &quat, bool &hasScale, HPoint &scale);
00687 
00688  
00689 protected:
00694     virtual void InterpolateCamera(HPoint &Scale, bool simulate = false);
00699     virtual void InterpolateCamera2(HPoint &Scale, bool simulate = false);
00700 
00701 };
00702 
00703  
00704 
00706 class MVO_API HBhvInterpolatorQuatSquad : public HBhvInterpolator
00707 {
00708 public:
00709 
00715     HBhvInterpolatorQuatSquad(HBhvAnimation *animation = 0, const char *name = 0);
00716 
00718     const char * GetType();
00719 
00726     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
00727 
00734     void  Insert(HQuat q, int l = 0) { HKeyframeQuatSquad * rot = new HKeyframeQuatSquad; 
00735                 rot->m_quat = q; m_pArray.InsertAt(rot, l); }
00736     
00743     void  InsertLinear(HQuat q, int l = 0) { HKeyframeQuatSquad * rot = new HKeyframeQuatSquad; 
00744                 rot->m_quat = q; rot->m_bLinear = true; m_pArray.InsertAt(rot, l); }
00745 
00752     void  Replace(HQuat q, int l) { HKeyframeQuatSquad * c = new HKeyframeQuatSquad; 
00753                 c->m_quat = q; REPLACE_VARRAY(c, l); }
00760     void  ReplaceLinear(HQuat q, int l) { HKeyframeQuatSquad * c = new HKeyframeQuatSquad; 
00761                 c->m_quat = q; c->m_bLinear = true; REPLACE_VARRAY(c, l); }
00762 
00766     void AdjustQuaternions();
00767 
00771     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
00772 
00776     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
00777 
00783     virtual void Interpolate(int keyframe, float fraction);
00784     virtual void Evaluate(int keyframe, float fraction, bool &hasPos, HPoint &pos, bool &hasQuat, HQuat &quat, bool &hasScale, HPoint &scale);
00785 
00792     virtual void CalculateQuat(int keyframe, float fraction,  HQuat &res);
00793 
00794 
00795 
00796 protected:
00801     virtual void InterpolateCamera(HQuat &quat, bool simulate = false);
00802 
00807     virtual void InterpolateCamera2(HQuat &quat, bool simulate = false);
00808 
00809 };
00810 
00811  
00812 
00813 
00815 
00818 class MVO_API HBhvInterpolatorAttSwitch : public HBhvInterpolator
00819 {
00820 public:
00826     HBhvInterpolatorAttSwitch(HBhvAnimation *animation = 0, const char *name = 0);
00827 
00829     const char * GetType();
00830 
00837     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
00838 
00845     void  Insert(const char * t, int l = 0) { HKeyframeString* AttSwitch = new HKeyframeString; 
00846                 AttSwitch->SetTarget(t); m_pArray.InsertAt(AttSwitch, l); }
00847 
00854     void  Replace(const char *spath, int l) { HKeyframeString * c = new HKeyframeString; 
00855                 c->SetTarget(spath); REPLACE_VARRAY(c, l) }
00856 
00860     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
00861 
00865     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
00866 
00872     virtual void Interpolate(int keyframe, float fraction);
00873  
00874 };
00875 
00876 
00877  
00878 
00879 
00880 
00881 
00883 class MVO_API HBhvInterpolatorVertexMorph : public HBhvInterpolator
00884 {
00885 public:
00886 
00892     HBhvInterpolatorVertexMorph(HBhvAnimation *animation = 0, const char *name = 0);
00893     ~HBhvInterpolatorVertexMorph();
00894 
00896     const char * GetType();
00897 
00904     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
00905 
00915     void  Insert(char * mident, int l = 0) { HKeyframeString* VertexMorph = new HKeyframeString; 
00916                 VertexMorph->SetTarget(mident); m_pArray.InsertAt(VertexMorph, l); }
00917     void  InsertDiscrete(char * mident, int l = 0) { HKeyframeString* VertexMorph = new HKeyframeString; 
00918                 VertexMorph->SetTarget(mident); VertexMorph->m_bDiscrete = true; m_pArray.InsertAt(VertexMorph, l); }
00919 
00929     void  Replace(char *t, int l) { HKeyframeString * c = new HKeyframeString; 
00930                 c->SetTarget(t); REPLACE_VARRAY(c, l) }
00931 
00935     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
00936 
00940     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
00941     
00947     virtual void Interpolate(int keyframe, float fraction);
00948 
00958     virtual void AddMorphData(HPoint *md, int pnum, HBaseModel *model, int pos = -1);
00959  
00961     VArray < void *> GetMorphData() { return m_pMorphData; }
00962 
00964     int GetMorphDataLength() { return m_MorphDataLength; }
00965 private:    
00966  
00967     void *GetUserInfo(char *target); 
00968     void * GetMorphData(int i); 
00970     VArray < void *>        m_pMorphData;       
00971     HC_KEY                  m_shelltarget;      
00972     int                     m_MorphDataLength; 
00973 };
00974 
00975 
00976 
00978 class MVO_API HBhvInterpolatorColorMorph : public HBhvInterpolator
00979 {
00980 public:
00981 
00987     HBhvInterpolatorColorMorph(HBhvAnimation *animation = 0, const char *name = 0);
00988     ~HBhvInterpolatorColorMorph();
00989 
00991     const char * GetType();
00992 
00999     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
01000 
01010     void  Insert(char * mident, int l = 0) { HKeyframeString* ColorMorph = new HKeyframeString; 
01011                 ColorMorph->SetTarget(mident); m_pArray.InsertAt(ColorMorph, l); }
01012     void  InsertDiscrete(char * mident, int l = 0) { HKeyframeString* ColorMorph = new HKeyframeString; 
01013                 ColorMorph->SetTarget(mident); ColorMorph->m_bDiscrete = true; m_pArray.InsertAt(ColorMorph, l); }
01023     void  Replace(char *t, int l) { HKeyframeString * c = new HKeyframeString; 
01024                 c->SetTarget(t); REPLACE_VARRAY(c, l) }
01025 
01029     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
01030 
01034     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
01035     
01041     virtual void Interpolate(int keyframe, float fraction);
01042  
01044     VArray < void *> GetMorphData() { return m_pMorphData; }
01045 
01047     int GetMorphDataLength() { return m_MorphDataLength; }
01059     virtual void AddMorphData(HPoint *md, int pnum, HBaseModel *model, int pos = -1);
01060 
01066     virtual void SetUseFIndex(bool tf);
01067 
01068 private:    
01069  
01070     void *GetUserInfo(char *target);
01071     void * GetMorphData(int i);
01072     VArray < void *>        m_pMorphData;       
01073      HC_KEY                 m_shelltarget;      
01074     int                     m_MorphDataLength;
01075     bool                    m_bUseFIndex;
01076 };
01077 
01078  
01079 
01080 
01082 class MVO_API HBhvInterpolatorSegSwitch : public HBhvInterpolator
01083 {
01084 public:
01085 
01091     HBhvInterpolatorSegSwitch(HBhvAnimation *animation = 0, const char *name = 0);
01092     ~HBhvInterpolatorSegSwitch();
01093 
01095     const char * GetType();
01096 
01103     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
01104 
01111     void  Insert(char * t, int l = 0) { HKeyframeString* SegSwitch = new HKeyframeString; 
01112                 SegSwitch->SetTarget(t); m_pArray.InsertAt(SegSwitch, l); }
01113 
01120     void  Replace(char *spath, int l) { HKeyframeString * c = new HKeyframeString; 
01121                 c->SetTarget(spath); REPLACE_VARRAY(c, l) }
01122 
01126     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
01127 
01131     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
01132 
01138     virtual void Interpolate(int keyframe, float fraction);
01139 
01143     virtual void Reset();
01144         
01145 };
01146 
01147 
01148 
01149 
01151 class MVO_API HBhvInterpolatorInstanceCreate : public HBhvInterpolator
01152 {
01153 public:
01154 
01160     HBhvInterpolatorInstanceCreate(HBhvAnimation *animation = 0, const char *name = 0);
01161     ~HBhvInterpolatorInstanceCreate();
01162 
01164     const char * GetType();
01165 
01172     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
01173 
01180     void  Insert(char * t, char *t2, char *t3, int l = 0) { HKeyframe3String* InstanceCreate = new HKeyframe3String; 
01181                 InstanceCreate->SetTarget(t,t2,t3); m_pArray.InsertAt(InstanceCreate, l); }
01182 
01189     void  Replace(char *t, char *t2, char *t3, int l) { HKeyframe3String * c = new HKeyframe3String; 
01190                 c->SetTarget(t,t2,t3); REPLACE_VARRAY(c, l) }
01191 
01195     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
01196 
01200     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
01201 
01207     virtual void Interpolate(int keyframe, float fraction);
01208 
01212     virtual void Reset();
01213 
01214     static void DeciperString(HBhvInterpolatorInstanceCreate *itp, char *text, HBaseModel *model, int &counter);
01215 
01216         
01217 };
01218 
01219 
01220 
01222 class MVO_API HBhvInterpolatorSegMove : public HBhvInterpolator
01223 {
01224 public:
01225 
01231     HBhvInterpolatorSegMove(HBhvAnimation *animation = 0, const char *name = 0);
01232     ~HBhvInterpolatorSegMove();
01233 
01235     const char * GetType();
01236 
01243     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
01244 
01251     void  Insert(char * t, int l = 0) { HKeyframeString* SegMove = new HKeyframeString; 
01252                 SegMove->SetTarget(t); m_pArray.InsertAt(SegMove, l); }
01253 
01260     void  Replace(char *spath, int l) { HKeyframeString * c = new HKeyframeString; 
01261                 c->SetTarget(spath); REPLACE_VARRAY(c, l) }
01262 
01266     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
01267 
01271     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
01272 
01278     virtual void Interpolate(int keyframe, float fraction);
01279 
01283     virtual void Reset();
01284         
01285 };
01286 
01287 
01288 
01289 
01291 class MVO_API HBhvInterpolatorMatrix : public HBhvInterpolator
01292 {
01293 public:
01294 
01300     HBhvInterpolatorMatrix(HBhvAnimation *animation = 0, const char *name = 0);
01301 
01303     const char * GetType();
01304 
01311     virtual HBhvInterpolator * CreateInstance(HBhvAnimation *ainst);
01312 
01319     void  Insert(float *mat, int l = 0) { HKeyframeMatrix * rot = new HKeyframeMatrix; 
01320                 for (int i=0;i<16;i++) rot->m_matrix[i] = mat[i]; m_pArray.InsertAt(rot, l); }
01321     
01322  
01323  
01330     void  Replace(float * q, int l) { HKeyframeMatrix * c = new HKeyframeMatrix; 
01331                     for (int i=0;i<16;i++) c->m_matrix[i] = q[i]; REPLACE_VARRAY(c, l); }
01332 
01333 
01337     virtual void Serialize(HUtilityXMLGenerator *xmlgen);
01338 
01342     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
01343 
01349     virtual void Interpolate(int keyframe, float fraction);
01350 
01351  
01352 protected:
01353 
01354 };
01355 
01356  
01357 
01358 #ifdef H_PACK_8
01359 #pragma pack(pop)
01360 #endif
01361 
01362 #endif
01363 
01364 
01365