# XSIImage.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 _XSIIMAGE_H
    00013 #define _XSIIMAGE_H
    00014
    00015 #include "Template.h"
    00016
    00017 class CSLImageData;
    00018 class CSLImageFX;
    00019 class CSLImageFX2;
    00020 class CSLImageLibrary;
    00021 class CSLTimeControl;
    00022
    00026 class XSIEXPORT CSLImage
    00027     : public CSLTemplate
    00028 {
    00029 public:
    00031     enum EChannels
    00032     {
    00033         SI_RGB = 3,
    00034         SI_RGBA = 4
    00035     };
    00036
    00038     enum EColorDepth
    00039     {
    00040         SI_24BITS = 24,
    00041         SI_32BITS = 32
    00042     };
    00043
    00049     CSLImage(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
    00050
    00052     virtual ~CSLImage();
    00053
    00057     SI_Error Synchronize();
    00058
    00062     ETemplateType Type(){ return XSI_IMAGE; }
    00063
    00064     virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
    00065
    00066     virtual CSLAnimatableType* ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName);
    00067
    00071     SI_Char* GetSourceFile();
    00072
    00076     SI_Void SetSourceFile( SI_Char* in_szFilename );
    00077
    00082     SI_Int GetWidth();
    00083
    00087     SI_Void SetWidth( SI_Int in_nSize );
    00088
    00092     SI_Int GetHeight();
    00093
    00097     SI_Void SetHeight( SI_Int in_nSize );
    00098
    00102     EChannels GetChannels();
    00103
    00107     SI_Void SetChannels( EChannels in_Channel );
    00108
    00112     EColorDepth GetColorDepth();
    00113
    00117     SI_Void SetColorDepth( EColorDepth in_Depth );
    00118
    00122     SI_Float GetCropMinX();
    00123
    00127     SI_Void SetCropMinX( SI_Float in_fCrop );
    00128
    00132     SI_Float GetCropMaxX();
    00133
    00137     SI_Void SetCropMaxX( SI_Float in_fCrop );
    00138
    00142     SI_Float GetCropMinY();
    00143
    00147     SI_Void SetCropMinY( SI_Float in_fCrop );
    00148
    00152     SI_Float GetCropMaxY();
    00153
    00157     SI_Void SetCropMaxY( SI_Float in_fCrop );
    00158
    00163     SI_Float GetFrameRate();
    00164
    00169     SI_Void SetFrameRate( SI_Float in_nRate = 0.0 );
    00170
    00174     SI_Int GetFirstFrame();
    00175
    00179     SI_Void SetFirstFrame( SI_Int in_nFrame );
    00180
    00184     SI_Int GetLastFrame();
    00185
    00189     SI_Void SetLastFrame( SI_Int in_nFrame );
    00190
    00192     // Image data functionality ///////////////////////////////////////////////
    00194
    00198     CSLImageData* CreateImageData();
    00199
    00209     SI_Error DestroyImageData();
    00210
    00215     CSLImageData* ConnectImageData( CSLImageData* in_pImageData );
    00216
    00221     CSLImageData* ImageData();
    00222
    00223     CSLTimeControl* TimeControl();
    00224     CSLTimeControl* AddTimeControl();
    00225     CSLTimeControl* ConnectTimeControl(CSLTimeControl* in_pNewTimeControl);
    00226
    00228     // Image FX Functionality /////////////////////////////////////////////////
    00230
    00234     CSLImageFX* CreateImageFX();
    00235
    00239     SI_Error DestroyImageFX();
    00240
    00245     CSLImageFX* ConnectImageFX( CSLImageFX* in_pToConnect );
    00246
    00250     CSLImageFX* ImageFX();
    00251
    00252     CSLStringProxy* SourceFile() { return &m_SourceFile;};
    00253
    00254     CSLIntProxy * SizeX() { return &m_SizeX;};
    00255     CSLIntProxy * SizeY() { return &m_SizeY;};
    00256     CSLIntProxy * Channels() { return &m_Channels;};
    00257     CSLFloatProxy * CropMinX() { return &m_CropMinX;};
    00258     CSLFloatProxy * CropMaxX() { return &m_CropMaxX;};
    00259     CSLFloatProxy * CropMinY() { return &m_CropMinY;};
    00260     CSLFloatProxy * CropMaxY() { return &m_CropMaxY;};
    00261     CSLFloatProxy * FrameRate() { return &m_FrameRate;};
    00262     CSLIntProxy * FrameCount() { return &m_FrameCount;};
    00263     CSLIntProxy * FirstFrame() { return &m_FirstFrame;};
    00264     CSLIntProxy * LastFrame() { return &m_LastFrame;};
    00265     CSLIntProxy * BitsPerPixel() { return &m_BitsPerPixel;};
    00266
    00268     // Image FX 2 Functionality /////////////////////////////////////////////////
    00270
    00274     CSLImageFX2* CreateImageFX2();
    00275
    00279     SI_Error DestroyImageFX2();
    00280
    00285     CSLImageFX2* ConnectImageFX2( CSLImageFX2* in_pToConnect );
    00286
    00290     CSLImageFX2* ImageFX2();
    00291
    00292 private:
    00293     CSLStringProxy m_SourceFile;
    00294     CSLIntProxy m_SizeX;
    00295     CSLIntProxy m_SizeY;
    00296     CSLIntProxy m_Channels;
    00297     CSLIntProxy m_BitsPerPixel;
    00298     CSLFloatProxy m_CropMinX;
    00299     CSLFloatProxy m_CropMaxX;
    00300     CSLFloatProxy m_CropMinY;
    00301     CSLFloatProxy m_CropMaxY;
    00302     CSLFloatProxy m_FrameRate;
    00303     CSLIntProxy m_FrameCount;
    00304     CSLIntProxy m_FirstFrame;
    00305     CSLIntProxy m_LastFrame;
    00306     CSLImageData *m_pImageData;
    00307     CSLImageFX *m_pImageFX;
    00308     CSLImageFX2 *m_pImageFX2;
    00309     CSLTimeControl* m_pTimeControl;
    00310
    00311     SI_Void *m_pReserved;
    00312 };
    00313
    00314 #endif