TimeControl.h

00001 //***************************************************************************************
00002 //
00003 // File supervisor: Crosswalk team
00004 //
00005 // Copyright 2008 Autodesk, Inc.  All rights reserved.
00006 // Use of this software is subject to the terms of the Autodesk license agreement
00007 // provided at the time of installation or download, or which otherwise accompanies
00008 // this software in either electronic or hard copy form.
00009 //
00010 //***************************************************************************************
00011 
00012 #ifndef _TIMECONTROL_H
00013 #define _TIMECONTROL_H
00014 
00015 #include "Template.h"
00016 #include "Extrapolation.h"
00017 #include "XSIClipToParent.h"
00018 
00028 class XSIEXPORT CSLTimeControl
00029     : public CSLTemplate
00030 {
00031 public:
00032 
00034     enum EExtrapolationPos
00035     {
00036         SI_BEFORE,  
00037         SI_AFTER    
00038     };
00039 
00045     CSLTimeControl(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00046     virtual ~CSLTimeControl();
00047 
00051     CSLTemplate::ETemplateType Type(){ return CSLTemplate::XSI_TIMECONTROL; }
00052     SI_Error Synchronize();
00053 
00057     SI_Float GetIn();
00058 
00062     SI_Void SetIn( SI_Float in_fNew );
00063 
00067     SI_Float GetOut();
00068 
00072     SI_Void SetOut( SI_Float in_fNew );
00073 
00077     SI_Float GetScale();
00078 
00083     SI_Void SetScale( SI_Float in_fNew );
00084 
00088     SI_Float GetStartOffset();
00089 
00093     SI_Void SetStartOffset( SI_Float in_fNew );
00094 
00095     // extrapolation functionality ////////////////////////////////////////////
00096 
00103     CSLExtrapolation* CreateExtrapolation( EExtrapolationPos in_Pos, CSLExtrapolation::EExtrapolationType in_Type = CSLExtrapolation::SI_NO_CONTRIBUTION );
00104 
00110     CSLExtrapolation* GetExtrapolation( EExtrapolationPos in_Pos );
00111 
00120     SI_Void SetExtrapolation( EExtrapolationPos in_Pos, CSLExtrapolation *in_pExtrapolation );
00121 
00127     CSLExtrapolation* ConnectExtrapolation( EExtrapolationPos in_Pos, CSLExtrapolation* in_pExtrapolation );
00128 
00129     // ClipToParent functionality ////////////////////////////////////////////
00130 
00135     CSLXSIClipToParent* CreateClipToParent();
00136 
00141     CSLXSIClipToParent* GetClipToParent();
00142 
00150     SI_Void SetClipToParent( CSLXSIClipToParent *in_pXSIClipToParent );
00151 
00156     CSLXSIClipToParent* ConnectClipToParent( CSLXSIClipToParent* in_pClipToParent );
00157 
00158 private:
00159     CSLFloatProxy m_In;
00160     CSLFloatProxy m_Out;
00161     CSLFloatProxy m_StartOffset;
00162     CSLFloatProxy m_Scale;
00163     CSLExtrapolation* m_pExtrapolationBefore;
00164     CSLExtrapolation* m_pExtrapolationAfter;
00165     CSLXSIClipToParent* m_pClipToParent;
00166 };
00167 
00168 #endif