ActionClip.h

00001 //***************************************************************************************
00002 //
00003 // File supervisor: Softimage 3D Games & 3D Bridge team
00004 //
00005 // (c) Copyright 2001-2002 Avid Technology, Inc. . All rights reserved.
00006 //
00007 //***************************************************************************************
00008 
00009 /****************************************************************************************
00010 THIS CODE IS PUBLISHED AS A SAMPLE ONLY AND IS PROVIDED "AS IS".
00011 IN NO EVENT SHALL SOFTIMAGE, AVID TECHNOLOGY, INC. AND/OR THEIR RESPECTIVE
00012 SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
00013 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00014 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
00015 CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE .
00016 
00017 COPYRIGHT NOTICE. Copyright © 1999-2002 Avid Technology Inc. . All rights reserved. 
00018 
00019 SOFTIMAGE is a registered trademark of Avid Technology Inc. or its subsidiaries 
00020 or divisions. Windows NT is a registered trademark of Microsoft Corp. All other
00021 trademarks contained herein are the property of their respective owners. 
00022 ****************************************************************************************/
00023 
00024 
00025 #ifndef _ACTIONCLIP_H
00026 #define _ACTIONCLIP_H
00027 
00028 #include "Template.h"
00029 
00030 // Forward declaration
00031 class CSLTimeControl;
00032 class CSLAction;
00033 
00045 class XSIEXPORT CSLActionClip
00046     : public CSLTemplate
00047 {
00048 public:
00049 
00055     CSLActionClip(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00056 
00059     virtual ~CSLActionClip();
00060 
00061     SI_Error Synchronize();
00062 
00066     CSLTemplate::ETemplateType Type(){ return CSLTemplate::XSI_ACTIONCLIP; }
00067 
00072     SI_Bool GetActive();
00073 
00077     SI_Void SetActive( SI_Bool in_bNew );
00078 
00082     SI_Float GetDuration();
00083 
00087     SI_Void SetDuration( SI_Float in_fNew );
00088 
00097     SI_Bool GetFillAction();
00098 
00106     SI_Void SetFillAction( SI_Bool in_bNew );
00107 
00113     SI_Int GetFillPriority();
00114 
00120     SI_Void SetFillPriority( SI_Int in_nNew );
00121 
00125     SI_Float GetStartTime();
00126 
00130     SI_Void SetStartTime( SI_Float in_fNew );
00131 
00135     SI_Float GetWeight();
00136 
00140     SI_Void SetWeight( SI_Float in_fNew );
00141 
00142     // action functionality ///////////////////////////////////////////////////
00143     
00149     CSLAction* GetReference();
00150 
00157     SI_Void SetReference( CSLAction* in_pAction );
00158 
00159     SI_Char* GetReferenceXSIPath();
00160     SI_Void SetReferenceXSIPath( SI_Char* in_szPath );
00161 
00162     // time control functionality /////////////////////////////////////////////
00163     
00167     CSLTimeControl* AddTimeControl();
00168 
00173     CSLTimeControl* ConnectTimeControl( CSLTimeControl *in_pTimeControl );
00174 
00180     SI_Error RemoveTimeControl( SI_Int in_nIndex );
00181 
00187     SI_Error RemoveTimeControl( CSLTimeControl *in_pTimeControl );
00188 
00192     CSLTimeControl** GetTimeControlList();
00193 
00197     SI_Int GetTimeControlCount();
00198 
00202     SI_Error ClearTimeControls();
00203 
00204 
00205     CSLFloatProxy*      GetStartTimeProxy(){return &m_StartTime;};
00206     CSLFloatProxy*      GetDurationProxy(){return &m_Duration;};
00207     CSLBoolProxy*       GetActiveProxy(){return &m_Active;};
00208     CSLFloatProxy*      GetWeightProxy(){return &m_Weight;};
00209     CSLBoolProxy*       GetFillActionProxy(){return &m_FillAction;};
00210     CSLIntProxy*        GetFillPriorityProxy(){return &m_FillPriority;};
00211     CSLStringProxy*     GetReferencePathProxy(){return &m_ReferencePath;};
00212 
00213     virtual CSLAnimatableType*  ParameterFromName(SI_Char *in_szName);
00214     virtual CSLAnimatableType*  ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName);
00215 
00216 private:
00217     CSLFloatProxy m_StartTime;
00218     CSLFloatProxy m_Duration;
00219     CSLBoolProxy m_Active;
00220     CSLFloatProxy m_Weight;
00221     CSLBoolProxy m_FillAction;
00222     CSLIntProxy m_FillPriority;
00223     CSLStringProxy m_ReferencePath;
00224     CSLAction* m_pReference;
00225     CSIBCArray<CSLTimeControl *> m_TimeControls;
00226     SI_Void *m_pReserved;
00227 };
00228 
00229 #endif