SceneInfo.h

00001 /****************************************************************************************
00002 THIS CODE IS PUBLISHED AS A SAMPLE ONLY AND IS PROVIDED "AS IS".
00003 IN NO EVENT SHALL SOFTIMAGE, AVID TECHNOLOGY, INC. AND/OR THEIR RESPECTIVE 
00004 SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
00005 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00006 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
00007 CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE . 
00008  
00009 COPYRIGHT NOTICE. Copyright  1999-2002 Avid Technology Inc. . All rights reserved. 
00010 
00011 SOFTIMAGE is a registered trademark of Avid Technology Inc. or its subsidiaries 
00012 or divisions. Windows NT is a registered trademark of Microsoft Corp. All other
00013 trademarks contained herein are the property of their respective owners. 
00014 ****************************************************************************************/
00015 /******************************************************************************\
00016 *
00017 * File:          SceneInfo.h
00018 * Creation date: January 28, 2002 18:16
00019 * Author:        Frederic O'Reilly
00020 * Purpose:       Declaration of class 'SceneInfo'
00021 *
00022 * Copyright 2002, Softimage
00023 * All rights are reserved. Reproduction in whole or part is prohibited
00024 * without the written consent of the copyright owner.
00025 *
00026 \******************************************************************************/
00027 #ifndef _SCENEINFO_H
00028 #define _SCENEINFO_H
00029 
00030 #include "Template.h"
00031 
00037 class XSIEXPORT CSLSceneInfo
00038     : public CSLTemplate
00039 {
00040 // Methods
00041 public:
00042 
00044     typedef enum ETimingType
00045     {
00046         SI_SECONDS, //*< Timing is in seconds */
00047         SI_FRAMES   //*< Timing is in frames */
00048     };
00049     
00051 
00057     CSLSceneInfo
00058     ( 
00059         CSLScene* in_pScene,
00060         CSLModel* in_pModel,
00061         CdotXSITemplate *in_pTemplate,
00062         ETimingType in_DefaultETimingType = SI_FRAMES
00063     );
00064 
00066     virtual ~CSLSceneInfo();
00067 
00069 
00072     void SetEnd( SI_Float in_nEnd );
00073     
00075 
00078     SI_Float GetEnd();
00079 
00081 
00084     void SetFrameRate( SI_Float in_fFrameRate );
00085 
00087 
00090     SI_Float GetFrameRate();
00091 
00093 
00096     void SetStart( SI_Float in_nStart );
00097 
00099 
00102     SI_Float GetStart();
00103 
00105 
00108     void SetTimingType( ETimingType in_Type ) ;
00109     
00110 
00112 
00115     ETimingType GetTimingType();
00116 
00117     virtual CSLTemplate::ETemplateType Type();
00118     virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00119 
00120     CSLFloatProxy*                              GetStartProxy() { return &m_nStart;};
00121     CSLFloatProxy*                              GetEndProxy() { return &m_nEnd;};
00122     CSLFloatProxy*                              GetFrameRateProxy() { return &m_fFrameRate;};
00123     CSLStrEnumProxy<ETimingType, SI_FRAMES>*    GetTimingTypeProxy() { return &m_TimingType;};
00124 
00125 // Members
00126 private:
00127     CSLStrEnumProxy<ETimingType, SI_FRAMES> m_TimingType;
00128     CSLFloatProxy m_nStart;
00129     CSLFloatProxy m_nEnd;
00130     CSLFloatProxy m_fFrameRate;
00131 
00132     // This member is here to allow future improvement of the class.
00133     SI_Void *m_pReserved;
00134 };
00135 
00136 #endif
00137