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 #ifndef _XSIIMAGE_H 00017 #define _XSIIMAGE_H 00018 00019 #include "Template.h" 00020 00021 class CSLImageData; 00022 class CSLImageFX; 00023 class CSLImageFX2; 00024 class CSLImageLibrary; 00025 class CSLTimeControl; 00026 00034 class XSIEXPORT CSLImage 00035 : public CSLTemplate 00036 { 00037 public: 00039 enum EChannels 00040 { 00041 SI_RGB = 3, 00042 SI_RGBA = 4 00043 }; 00044 00046 enum EColorDepth 00047 { 00048 SI_24BITS = 24, 00049 SI_32BITS = 32 00050 }; 00051 00057 CSLImage(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate); 00058 00060 virtual ~CSLImage(); 00061 00065 SI_Error Synchronize(); 00066 00070 ETemplateType Type(){ return XSI_IMAGE; } 00071 00072 virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName); 00073 00074 virtual CSLAnimatableType* ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName); 00075 00079 SI_Char* GetSourceFile(); 00080 00084 SI_Void SetSourceFile( SI_Char* in_szFilename ); 00085 00090 SI_Int GetWidth(); 00091 00095 SI_Void SetWidth( SI_Int in_nSize ); 00096 00100 SI_Int GetHeight(); 00101 00105 SI_Void SetHeight( SI_Int in_nSize ); 00106 00110 EChannels GetChannels(); 00111 00115 SI_Void SetChannels( EChannels in_Channel ); 00116 00120 EColorDepth GetColorDepth(); 00121 00125 SI_Void SetColorDepth( EColorDepth in_Depth ); 00126 00130 SI_Float GetCropMinX(); 00131 00135 SI_Void SetCropMinX( SI_Float in_fCrop ); 00136 00140 SI_Float GetCropMaxX(); 00141 00145 SI_Void SetCropMaxX( SI_Float in_fCrop ); 00146 00150 SI_Float GetCropMinY(); 00151 00155 SI_Void SetCropMinY( SI_Float in_fCrop ); 00156 00160 SI_Float GetCropMaxY(); 00161 00165 SI_Void SetCropMaxY( SI_Float in_fCrop ); 00166 00171 SI_Float GetFrameRate(); 00172 00177 SI_Void SetFrameRate( SI_Float in_nRate = 0.0 ); 00178 00182 SI_Int GetFirstFrame(); 00183 00187 SI_Void SetFirstFrame( SI_Int in_nFrame ); 00188 00192 SI_Int GetLastFrame(); 00193 00197 SI_Void SetLastFrame( SI_Int in_nFrame ); 00198 00200 // Image data functionality /////////////////////////////////////////////// 00202 00206 CSLImageData* CreateImageData(); 00207 00217 SI_Error DestroyImageData(); 00218 00223 CSLImageData* ConnectImageData( CSLImageData* in_pImageData ); 00224 00229 CSLImageData* ImageData(); 00230 00231 CSLTimeControl* TimeControl(); 00232 CSLTimeControl* AddTimeControl(); 00233 CSLTimeControl* ConnectTimeControl(CSLTimeControl* in_pNewTimeControl); 00234 00236 // Image FX Functionality ///////////////////////////////////////////////// 00238 00242 CSLImageFX* CreateImageFX(); 00243 00247 SI_Error DestroyImageFX(); 00248 00253 CSLImageFX* ConnectImageFX( CSLImageFX* in_pToConnect ); 00254 00258 CSLImageFX* ImageFX(); 00259 00260 CSLStringProxy* SourceFile() { return &m_SourceFile;}; 00261 00262 CSLIntProxy * SizeX() { return &m_SizeX;}; 00263 CSLIntProxy * SizeY() { return &m_SizeY;}; 00264 CSLIntProxy * Channels() { return &m_Channels;}; 00265 CSLFloatProxy * CropMinX() { return &m_CropMinX;}; 00266 CSLFloatProxy * CropMaxX() { return &m_CropMaxX;}; 00267 CSLFloatProxy * CropMinY() { return &m_CropMinY;}; 00268 CSLFloatProxy * CropMaxY() { return &m_CropMaxY;}; 00269 CSLFloatProxy * FrameRate() { return &m_FrameRate;}; 00270 CSLIntProxy * FrameCount() { return &m_FrameCount;}; 00271 CSLIntProxy * FirstFrame() { return &m_FirstFrame;}; 00272 CSLIntProxy * LastFrame() { return &m_LastFrame;}; 00273 CSLIntProxy * BitsPerPixel() { return &m_BitsPerPixel;}; 00274 00276 // Image FX 2 Functionality ///////////////////////////////////////////////// 00278 00282 CSLImageFX2* CreateImageFX2(); 00283 00287 SI_Error DestroyImageFX2(); 00288 00293 CSLImageFX2* ConnectImageFX2( CSLImageFX2* in_pToConnect ); 00294 00298 CSLImageFX2* ImageFX2(); 00299 00300 private: 00301 CSLStringProxy m_SourceFile; 00302 CSLIntProxy m_SizeX; 00303 CSLIntProxy m_SizeY; 00304 CSLIntProxy m_Channels; 00305 CSLIntProxy m_BitsPerPixel; 00306 CSLFloatProxy m_CropMinX; 00307 CSLFloatProxy m_CropMaxX; 00308 CSLFloatProxy m_CropMinY; 00309 CSLFloatProxy m_CropMaxY; 00310 CSLFloatProxy m_FrameRate; 00311 CSLIntProxy m_FrameCount; 00312 CSLIntProxy m_FirstFrame; 00313 CSLIntProxy m_LastFrame; 00314 CSLImageData *m_pImageData; 00315 CSLImageFX *m_pImageFX; 00316 CSLImageFX2 *m_pImageFX2; 00317 CSLTimeControl* m_pTimeControl; 00318 00319 SI_Void *m_pReserved; 00320 }; 00321 00322 #endif