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 _ENVELOPE_H 00025 #define _ENVELOPE_H 00026 00027 #include "Template.h" 00028 00029 00030 00032 struct SLVertexWeight 00033 { 00034 SI_Float m_fVertexIndex; 00035 SI_Float m_fWeight; 00036 }; 00037 00038 #ifndef _SL_VERTEX_WEIGHT_ARRAY_PROXY_EXPORT_ 00039 #define _SL_VERTEX_WEIGHT_ARRAY_PROXY_EXPORT_ 00040 00041 //XSITEMPLATEEXP template class XSIEXPORT CSLArrayProxy<SLVertexWeight, SI_Float, 2>; 00042 00043 #endif // _SL_VERTEX_WEIGHT_ARRAY_PROXY_EXPORT_ 00044 00045 00046 00048 class XSIEXPORT CSLEnvelope 00049 : public CSLTemplate 00050 { 00051 public: 00055 typedef CSLArrayProxy<SLVertexWeight, SI_Float, 2> CSLVertexWeightArray; 00056 00063 CSLEnvelope(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate); 00064 00067 virtual ~CSLEnvelope(); 00068 00072 CSLModel* GetDeformer(); 00073 00078 SI_Void SetDeformer(CSLModel* in_pNewDeformer); 00079 00083 CSLModel* GetEnvelope(); 00084 00089 SI_Void SetEnvelope(CSLModel* in_pNewEnvelope); 00090 00094 SI_Int GetVertexWeightCount(); 00095 00099 CSLVertexWeightArray* GetVertexWeightList(); 00100 00104 SLVertexWeight* GetVertexWeightListPtr(); 00105 00110 virtual SI_Error Synchronize(); 00111 00115 virtual ETemplateType Type() { return SI_ENVELOPE; } 00116 00117 private: 00118 CSLModel* m_pEnvelope; 00119 CSLModel* m_pDeformer; 00120 CSLVertexWeightArray m_VertexWeights; 00121 00122 void *m_pReserved; // reserved for future extension 00123 }; 00124 00125 #endif 00126