AnimationWBImp.h

Go to the documentation of this file.
00001 /*==============================================================================
00002 
00003   file:     AnimationWBImp.h
00004 
00005   author:   Michael Zyracki
00006 
00007   created:  2003
00008 
00009   description:
00010 
00011     Interface definition for the CS Animation Workbench
00012 
00013   modified: 
00014 
00015 
00016 � 2003//2004 Autodesk
00017 ==============================================================================*/
00018 #pragma once
00019 
00020 #include "..\ifnpub.h"
00021 #include "..\interval.h"
00022 #include "..\strbasic.h"
00023 
00026 #define ANALYZER_INTERFACE Interface_ID(0x14bf34cc, 0x519c0633)
00027 
00030 #define FIXER_INTERFACE Interface_ID(0xfcd6b18, 0x6e714e23)
00031 
00034 #define FILTER_INTERFACE Interface_ID(0x36ca302f, 0x23d147a6)
00035 
00038 #define WORKBENCH_INTERFACE Interface_ID(0x78aa2c29, 0x19a55d39)
00039 
00042 #define WORKBENCH_INTERFACE2 Interface_ID(0x5a6c11a8, 0x706b0c70)
00043 
00045 
00054 class IWorkBench : public FPStaticInterface
00055 {
00056 public:
00057     
00058     DECLARE_DESCRIPTOR(IWorkBench);
00060     virtual void Open(); //pops up in viewprt
00062     virtual void ToggleShowX();
00065     virtual BOOL GetShowX();
00067     virtual void ToggleShowY();
00070     virtual BOOL GetShowY();
00072     virtual void ToggleShowZ();
00073 
00076     virtual BOOL GetShowZ();
00077 
00079     virtual void ToggleLayerEdit();
00081     virtual BOOL GetLayerEdit();
00082 
00084     virtual void ToggleDrawDuringMove();
00086     virtual BOOL GetDrawDuringMove();
00087 
00089     virtual void ToggleLimit180();
00091     virtual BOOL GetLimit180();
00092 
00094     virtual void ShowQuatCurve();
00096     virtual void ShowPosCurve();
00098     virtual void ShowAngSpeedCurve();
00100     virtual void ShowAngAccelCurve();
00102     virtual void ShowAngJerkCurve();
00104     virtual void ShowPosSpeedCurve();
00106     virtual void ShowPosAccelCurve();
00108     virtual void ShowPosJerkCurve();
00109 
00111     virtual void PosCurveToWorld();
00113     virtual void PosCurveToBipRoot();
00116     virtual void PosCurveToThisNode(INode *node);
00117 
00118     enum WorkBenchFunctions
00119     {
00120         toggleShowX = 0,getShowX,toggleShowY,getShowY,toggleShowZ,getShowZ,
00121         toggleLayerEdit,getLayerEdit,toggleDrawDuringMove,getDrawDuringMove,
00122         toggleLimit180,getLimit180,
00123         showQuatCurve,showPosCurve,showAngSpeedCurve,showAngAccelCurve,showAngJerkCurve,
00124         showPosSpeedCurve,showPosAccelCurve,showPosJerkCurve,posCurveToWorld, posCurveToBipRoot,
00125         posCurveToThisNode,open
00126     };
00127 
00128     BEGIN_FUNCTION_MAP
00129             VFN_0(toggleShowX,ToggleShowX);
00130             FN_0(getShowX,TYPE_BOOL,GetShowX);
00131             VFN_0(toggleShowY,ToggleShowY);
00132             FN_0(getShowY,TYPE_BOOL,GetShowY);
00133             VFN_0(toggleShowZ,ToggleShowZ);
00134             FN_0(getShowZ,TYPE_BOOL,GetShowZ);
00135             VFN_0(toggleLayerEdit,ToggleLayerEdit);
00136             FN_0(getLayerEdit,TYPE_BOOL,GetLayerEdit);
00137             VFN_0(toggleDrawDuringMove,ToggleDrawDuringMove);
00138             FN_0(getDrawDuringMove,TYPE_BOOL,GetDrawDuringMove);
00139             VFN_0(toggleLimit180,ToggleLimit180);
00140             FN_0(getLimit180,TYPE_BOOL,GetLimit180);
00141             VFN_0(showQuatCurve,ShowQuatCurve);
00142             VFN_0(showPosCurve,ShowPosCurve);
00143             VFN_0(showAngSpeedCurve,ShowAngSpeedCurve);
00144             VFN_0(showAngAccelCurve,ShowAngAccelCurve);
00145             VFN_0(showAngJerkCurve,ShowAngJerkCurve);
00146             VFN_0(showPosSpeedCurve,ShowPosSpeedCurve);
00147             VFN_0(showPosAccelCurve,ShowPosAccelCurve);
00148             VFN_0(showPosJerkCurve,ShowPosJerkCurve);
00149             VFN_0(posCurveToWorld,PosCurveToWorld);
00150             VFN_0(posCurveToBipRoot,PosCurveToBipRoot);
00151             VFN_1(posCurveToThisNode,PosCurveToThisNode,TYPE_INODE);
00152             VFN_0(open,Open);
00153 
00154     END_FUNCTION_MAP
00155 
00156 
00157 };
00158 
00159 
00160 
00162 
00166 class IWorkBench2 : public IWorkBench
00167 {
00168 public:
00169     DECLARE_DESCRIPTOR(IWorkBench2); 
00170 
00172     virtual void ShowQuatXYZ();
00174     virtual void ShowQuatXZY();
00176     virtual void ShowQuatYXZ();
00178     virtual void ShowQuatYZX();
00180     virtual void ShowQuatZXY();
00182     virtual void ShowQuatZYX();
00183 
00184     enum WorkBenchFunctions
00185     {
00186         showQuatXYZ = IWorkBench::open,
00187         showQuatXZY,showQuatYXZ,showQuatYZX,showQuatZXY,showQuatZYX
00188     };
00189 
00190     BEGIN_FUNCTION_MAP_PARENT(IWorkBench)
00191             VFN_0(showQuatXYZ,ShowQuatXYZ);
00192             VFN_0(showQuatXZY,ShowQuatXZY);
00193             VFN_0(showQuatYXZ,ShowQuatYXZ);
00194             VFN_0(showQuatYZX,ShowQuatYZX);
00195             VFN_0(showQuatZXY,ShowQuatZXY);
00196             VFN_0(showQuatZYX,ShowQuatZYX);
00197     END_FUNCTION_MAP
00198 };
00199 
00200 
00202 
00207 class IAnalyzer : public FPStaticInterface
00208 {
00209 public: 
00210     DECLARE_DESCRIPTOR(IAnalyzer); 
00211 
00220     virtual void  DoNoiseDetectorAnalysis(Tab<INode *>&nodesToAnalyze,Interval range,float deviation,BOOL angular,int noiseType,INode *pNode);
00221     
00226     virtual void  DoSpikeDetectorAnalysis(Tab<INode *>&nodesToAnalyze,Interval range,float deviation);
00227     
00234     virtual void  DoKneeWobbleAnalysis(Tab<INode *>&nodesToAnalyze,Interval range,float frameThreshold,float fluctuationThreshold);
00235     
00240     virtual void  DoKneeExtensionAnalysis(Tab<INode *>&nodesToAnalyze,Interval range,float kneeAngle);
00241     
00245     virtual Tab<TimeValue >  GetResults(INode *node);
00246 
00249     virtual void LoadAnalysisFile(char *filename);
00250     
00254     virtual void SaveAnalysisFile(Tab<INode *> &nodes,char *filename);
00255     
00257     virtual void ClearAnalysisResults();
00258 
00259     enum AnalyzeFunctions
00260     {
00261         doNoiseDetectorAnalysis = 0,
00262         doSpikeDetectorAnalysis,
00263         getResults,
00264         loadAnalysisFile,
00265         saveAnalysisFile,
00266         clearAnalysisResults,
00267         doKneeWobbleAnalysis,
00268         doKneeExtensionAnalysis
00269     };
00270     #pragma warning(push)
00271     #pragma warning(disable:4238)
00272     BEGIN_FUNCTION_MAP
00273             VFN_6(doNoiseDetectorAnalysis, DoNoiseDetectorAnalysis,TYPE_INODE_TAB_BR,TYPE_INTERVAL,TYPE_FLOAT,TYPE_BOOL,TYPE_INT,TYPE_INODE);
00274             VFN_3(doSpikeDetectorAnalysis, DoSpikeDetectorAnalysis,TYPE_INODE_TAB_BR,TYPE_INTERVAL,TYPE_FLOAT);
00275             FN_1(getResults,TYPE_TIMEVALUE_TAB_BV,GetResults,TYPE_INODE);
00276             VFN_1(loadAnalysisFile,LoadAnalysisFile,TYPE_FILENAME);
00277             VFN_2(saveAnalysisFile,SaveAnalysisFile,TYPE_INODE_TAB_BR,TYPE_FILENAME);
00278             VFN_0(clearAnalysisResults,ClearAnalysisResults);
00279             VFN_4(doKneeWobbleAnalysis, DoKneeWobbleAnalysis,TYPE_INODE_TAB_BR,TYPE_INTERVAL,TYPE_FLOAT,TYPE_FLOAT);
00280             VFN_3(doKneeExtensionAnalysis, DoKneeExtensionAnalysis,TYPE_INODE_TAB_BR,TYPE_INTERVAL,TYPE_FLOAT);
00281     END_FUNCTION_MAP
00282     #pragma warning(pop)
00283 };
00284 
00286 
00291 class IFixer : public FPStaticInterface
00292 {
00293 public:
00294     DECLARE_DESCRIPTOR(IFixer); 
00295 
00300     virtual void DoAngSmoothing(Tab<INode *>&nodes,int width, float damping);
00301     
00306     virtual void DoAngBlurring(Tab<INode *>&nodes,int width, float damping);
00307     
00312     virtual void DoAdvAngSmoothing(Tab<INode *>&nodes,int width, float damping);
00313     
00318     virtual void DoPosSmoothing(Tab<INode *>&nodes,int width, float damping);
00319 
00324     virtual void DoPosBlurring(Tab<INode *>&nodes,int width, float damping);
00325     
00330     virtual void DoRemoveKeys(Tab<INode *>&nodes,int intervalWidth,BOOL deleteKeys);
00331     
00336     virtual void DoKneeWobbleFix(Tab<INode *>&nodes,float frameThreshold,float fluctuationThreshold);
00337     
00341     virtual void DoKneeExtensionFix(Tab<INode *>&nodes,float kneeAngle);
00342 
00343 
00344     enum FilterFunctions
00345     {
00346         doAngSmoothing = 0,
00347         doAngBlurring,
00348         doAdvAngSmoothing,
00349         doPosSmoothing,
00350         doPosBlurring,
00351         doRemoveKeys,
00352         doKneeWobbleFix,
00353         doKneeExtensionFix
00354     };
00355 
00356     BEGIN_FUNCTION_MAP
00357             VFN_3(doAngSmoothing, DoAngSmoothing,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT);
00358             VFN_3(doAngBlurring, DoAngBlurring,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT);
00359             VFN_3(doAdvAngSmoothing, DoAdvAngSmoothing,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT);
00360 
00361             VFN_3(doPosSmoothing, DoPosSmoothing,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT);
00362             VFN_3(doPosBlurring, DoPosBlurring,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT);
00363             VFN_3(doRemoveKeys, DoRemoveKeys,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_BOOL);
00364             VFN_3(doKneeWobbleFix, DoKneeWobbleFix,TYPE_INODE_TAB_BR,TYPE_FLOAT,TYPE_FLOAT);
00365             VFN_2(doKneeExtensionFix, DoKneeExtensionFix,TYPE_INODE_TAB_BR,TYPE_FLOAT);
00366     END_FUNCTION_MAP
00367 };
00368 
00369 
00375 class IFilter : public FPStaticInterface
00376 {
00377 public: 
00378     DECLARE_DESCRIPTOR(IFilter); 
00379 
00385     
00386     virtual void DoAngSmoothing(Tab<INode *>&nodes,int width, float damping,Interval range);
00387     
00393     virtual void DoAngBlurring(Tab<INode *>&nodes,int width, float damping,Interval range);
00394     
00400     virtual void DoAngBoosting(Tab<INode *>&nodes,int width, float damping,Interval range);
00401     
00407     virtual void DoAdvAngSmoothing(Tab<INode *>&nodes,int width, float damping,Interval range);
00408     
00414     virtual void DoPosSmoothing(Tab<INode *>&nodes,int width, float damping,Interval range);
00415     
00421     virtual void DoPosBlurring(Tab<INode *>&nodes,int width, float damping,Interval range);
00422     
00428     virtual void DoPosBoosting(Tab<INode *>&nodes,int width, float damping,Interval range);
00429     
00437     virtual void DoKeyReduction(Tab<INode *>&nodes,float tolerance,int keySpacing, float COMTolerance,
00438         float COMKeySpacing,Interval range);
00439     
00442     virtual void DoKeyPerFrame(Tab<INode *>&nodes);
00443     
00447     virtual void EnablePosSubAnim(Tab<INode *> &nodes,BOOL enable);
00448     
00452     virtual void EnableRotSubAnim(Tab<INode *> &nodes,BOOL enable);
00453     
00457     virtual void EnableScaleSubAnim(Tab<INode *> &nodes,BOOL enable);
00458     
00463     virtual void CollapsePosSubAnim(Tab<INode *> &nodes,BOOL perFrame, BOOL deleteSubAnim);
00464     
00469     virtual void CollapseRotSubAnim(Tab<INode *> &nodes, BOOL perFrame,BOOL deleteSubAnim);
00470     
00475     virtual void CreatePosSubAnim(Tab<INode *> &nodes,Control *toClone,BOOL checkIfOneExists);
00476     
00481     virtual void CreateRotSubAnim(Tab<INode *> &nodes,Control *toClone,BOOL checkIfOneExists);
00482     
00487     virtual void CreateScaleSubAnim(Tab<INode *> &nodes,Control *toClone,BOOL checkIfOneExists);
00488     
00494     virtual void DoKneeWobbleFilter(Tab<INode *>&nodes,float frameThreshold,float fluctuationThreshold,Interval range);
00495     
00500     virtual void DoKneeExtensionFilter(Tab<INode *>&nodes,float kneeAngle,Interval range);
00501 
00502     enum FilterFunctions
00503     {
00504         doAngSmoothing = 0,
00505         doAngBlurring,doAngBoosting,doAdvAngSmoothing,doPosSmoothing,
00506         doPosBlurring,doPosBoosting,doKeyReduction,doKeyPerFrame,
00507         enablePosSubAnim,enableRotSubAnim,enableScaleSubAnim,
00508         collapsePosSubAnim,collapseRotSubAnim,createPosSubAnim,createRotSubAnim,
00509         createScaleSubAnim,doKneeWobbleFilter,doKneeExtensionFilter
00510     };
00511 
00512     BEGIN_FUNCTION_MAP
00513             VFN_4(doAngSmoothing, DoAngSmoothing,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT,TYPE_INTERVAL);
00514             VFN_4(doAngBlurring, DoAngBlurring,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT,TYPE_INTERVAL);
00515             VFN_4(doAngBoosting, DoAngBoosting,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT,TYPE_INTERVAL);
00516             VFN_4(doAdvAngSmoothing, DoAdvAngSmoothing,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT,TYPE_INTERVAL);
00517 
00518             VFN_4(doPosSmoothing, DoPosSmoothing,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT,TYPE_INTERVAL);
00519             VFN_4(doPosBlurring, DoPosBlurring,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT,TYPE_INTERVAL);
00520             VFN_4(doPosBoosting, DoPosBoosting,TYPE_INODE_TAB_BR,TYPE_INT,TYPE_FLOAT,TYPE_INTERVAL);
00521             VFN_6(doKeyReduction, DoKeyReduction,TYPE_INODE_TAB_BR,TYPE_FLOAT,TYPE_INT,TYPE_FLOAT,TYPE_FLOAT,TYPE_INTERVAL);
00522             VFN_1(doKeyPerFrame, DoKeyPerFrame,TYPE_INODE_TAB_BR);
00523             VFN_2(enablePosSubAnim, EnablePosSubAnim,TYPE_INODE_TAB_BR,TYPE_BOOL);
00524             VFN_2(enableRotSubAnim, EnableRotSubAnim,TYPE_INODE_TAB_BR,TYPE_BOOL);
00525             VFN_2(enableScaleSubAnim, EnableScaleSubAnim,TYPE_INODE_TAB_BR,TYPE_BOOL);
00526             VFN_3(collapsePosSubAnim, CollapsePosSubAnim,TYPE_INODE_TAB_BR,TYPE_BOOL,TYPE_BOOL);
00527             VFN_3(collapseRotSubAnim, CollapseRotSubAnim,TYPE_INODE_TAB_BR,TYPE_BOOL,TYPE_BOOL);
00528             VFN_3(createPosSubAnim, CreatePosSubAnim,TYPE_INODE_TAB_BR,TYPE_CONTROL,TYPE_BOOL);
00529             VFN_3(createRotSubAnim, CreateRotSubAnim,TYPE_INODE_TAB_BR,TYPE_CONTROL,TYPE_BOOL);
00530             VFN_3(createScaleSubAnim, CreateScaleSubAnim,TYPE_INODE_TAB_BR,TYPE_CONTROL,TYPE_BOOL);
00531             VFN_4(doKneeWobbleFilter, DoKneeWobbleFilter,TYPE_INODE_TAB_BR,TYPE_FLOAT,TYPE_FLOAT,TYPE_INTERVAL);
00532             VFN_3(doKneeExtensionFilter, DoKneeExtensionFilter,TYPE_INODE_TAB_BR,TYPE_FLOAT,TYPE_INTERVAL);
00533     END_FUNCTION_MAP
00534 };