Envelope.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 _ENVELOPE_H
00013 #define _ENVELOPE_H
00014 
00015 #include "Template.h"
00016 
00017 
00018 
00020 struct SLVertexWeight
00021 {
00022     SI_Float m_fVertexIndex;
00023     SI_Float m_fWeight;
00024 };
00025 
00026 #ifndef _SL_VERTEX_WEIGHT_ARRAY_PROXY_EXPORT_
00027 #define _SL_VERTEX_WEIGHT_ARRAY_PROXY_EXPORT_
00028 
00029 //XSITEMPLATEEXP template class XSIEXPORT CSLArrayProxy<SLVertexWeight, SI_Float, 2>;
00030 
00031 #endif // _SL_VERTEX_WEIGHT_ARRAY_PROXY_EXPORT_
00032 
00033 
00034 
00038 class XSIEXPORT CSLEnvelope
00039     : public CSLTemplate
00040 {
00041 public:
00045     typedef CSLArrayProxy<SLVertexWeight, SI_Float, 2> CSLVertexWeightArray;
00046 
00053     CSLEnvelope(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00054 
00057     virtual ~CSLEnvelope();
00058 
00062     CSLModel* GetDeformer();
00063 
00068     SI_Void SetDeformer(CSLModel* in_pNewDeformer);
00069 
00073     CSLModel* GetEnvelope();
00074 
00079     SI_Void SetEnvelope(CSLModel* in_pNewEnvelope);
00080 
00084     SI_Int GetVertexWeightCount();
00085 
00089     CSLVertexWeightArray* GetVertexWeightList();
00090 
00094     SLVertexWeight* GetVertexWeightListPtr();
00095 
00100     virtual SI_Error Synchronize();
00101 
00105     virtual ETemplateType Type() { return SI_ENVELOPE; }
00106 
00107 private:
00108     CSLModel* m_pEnvelope;
00109     CSLModel* m_pDeformer;
00110     CSLVertexWeightArray m_VertexWeights;
00111 
00112     void *m_pReserved;  // reserved for future extension
00113 };
00114 
00115 #endif
00116