COLLADAFCurve.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 #ifndef _COLLADAFCURVE_H
00025 #define _COLLADAFCURVE_H
00026 
00027 #include "FCurve.h"
00028 #include "SL_Enum.h"
00029 
00030 #define ELEM_TIME       0
00031 #define ELEM_VALUE      1
00032 #define ELEM_IN_TAN     2
00033 #define ELEM_OUT_TAN    3
00034 #define ELEM_INTERP     4
00035 
00036 
00038 class XSIEXPORT CSLCOLLADAFCurve
00039     : public CSLFCurve
00040 {
00041 public:
00051     CSLCOLLADAFCurve
00052     (
00053         CSLScene* in_pScene,
00054         CSLModel *in_pModel,
00055         CdotXSITemplate* in_pTemplate, 
00056         EFCurveType in_Type,
00057         EFCurveInterpolationType in_InterpolationType,
00058         CSLAnimatableType *in_pParamReference
00059     );
00060 
00063     virtual ~CSLCOLLADAFCurve();
00064 
00069     virtual SI_Error Synchronize();
00070 
00075     virtual SI_Error ConnectCOLLADAAnimation( CCOLLADATemplate* in_pChannel, const int in_offset = 0);
00076 
00081     virtual CSLAnimatableType* ParameterReference();
00082 private:
00083 
00084     SI_Void     GetFloatArrayFromCurve ( CSIBCArray<float>& inout_Array, int in_iElement );
00085     SI_Void     AddSource ( CCOLLADATemplate* in_pAnimation, 
00086                             int in_iElement, 
00087                             SI_Char* in_szPrefix, 
00088                             SI_Char* in_szID, 
00089                             SI_Char* in_szOutput,
00090                             CCOLLADATemplate* in_pSampler);
00091     
00092     CSLAnimatableType *m_pParamReference;
00093 };
00094 
00095 #endif