00001
00002
00012
00013
00014 #ifndef _ACTION_H
00015 #define _ACTION_H
00016
00017 #include "Template.h"
00018
00019 class CSLActionFCurve;
00020 class CSLStaticValue;
00021 class CSLXSIShapeReference;
00022
00038 class XSIEXPORT CSLAction
00039 : public CSLTemplate
00040 {
00041 public:
00047 CSLAction(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00048
00051 virtual ~CSLAction();
00052
00054 enum EActionType
00055 {
00056 SI_AT_FCURVE,
00057 SI_AT_STATICVALUE,
00058 SI_AT_EXPRESSION,
00059 SI_AT_CLUSTERKEY,
00060 SI_AT_CONSTRAINT,
00061 SI_AT_COMPOUND,
00062 SI_AT_SHAPECOMPOUND,
00063 SI_AT_NONE,
00064 };
00065
00069 virtual SI_Error Synchronize();
00070
00074 CSLTemplate::ETemplateType Type(){ return CSLTemplate::XSI_ACTION; }
00075
00079 EActionType GetActionType();
00080
00084 SI_Void SetActionType( EActionType in_Type );
00085
00089 virtual SI_Float GetEndTime();
00090
00094 virtual SI_Void SetEndTime( SI_Float in_fTime );
00095
00099 virtual SI_Float GetStartTime();
00100
00104 virtual SI_Void SetStartTime( SI_Float in_fTime );
00105
00106
00107
00113 SI_Error RemoveAnimation( SI_Int in_nIndex );
00114
00120 SI_Error RemoveAnimation( CSLActionFCurve *io_pToRemove );
00121
00125 CSLActionFCurve** GetAnimationList();
00126
00130 SI_Int GetAnimationCount();
00131
00135 virtual CSLActionFCurve* AddAnimation();
00136
00141 virtual CSLActionFCurve* AddAnimation( EFCurveInterpolationType in_InterpolationType );
00142
00146 SI_Error ClearAnimations();
00147
00152 CSLActionFCurve* ConnectAnimation(CSLActionFCurve* in_pNewAnimation);
00153
00154
00155
00161 SI_Error RemoveStaticValue( SI_Int in_nIndex );
00162
00168 SI_Error RemoveStaticValue( CSLStaticValue *io_pToRemove );
00169
00173 CSLStaticValue** GetStaticValueList();
00174
00178 SI_Int GetStaticValueCount();
00179
00183 CSLStaticValue* AddStaticValue();
00184
00188 SI_Error ClearStaticValues();
00189
00194 CSLStaticValue* ConnectStaticValue(CSLStaticValue* in_pNewStaticValue);
00195
00196 CSLFloatProxy* GetStartTimeProxy() {return &m_StartTime;};
00197 CSLFloatProxy* GetEndTimeProxy() {return &m_EndTime;};
00198 CSLEnumProxy<EActionType, SI_AT_NONE>* GetActionTypeProxy() { return &m_ActionType;};
00199
00203 CSLXSIShapeReference* AddXSIShapeReference();
00204
00208 CSLXSIShapeReference* GetXSIShapeReference();
00209
00213 SI_Error ClearXSIShapeReference();
00214
00219 CSLXSIShapeReference* ConnectXSIShapeReference(CSLXSIShapeReference* in_pNewXSIShape);
00220
00221 private:
00222 CSLFloatProxy m_StartTime;
00223 CSLFloatProxy m_EndTime;
00224 CSLEnumProxy<EActionType, SI_AT_NONE> m_ActionType;
00225 CSIBCArray<CSLActionFCurve*> m_Animations;
00226 CSIBCArray<CSLStaticValue*> m_StaticValues;
00227 CSLXSIShapeReference *m_pXSIShapeReference;
00228 };
00229 #endif