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 _XSISHAPE_H 00013 #define _XSISHAPE_H 00014 00015 #include "Template.h" 00016 #include "Scene.h" 00017 #include "Model.h" 00018 #include "XSISubComponentAttributeList.h" 00019 00020 00021 00029 class XSIEXPORT CSLXSIShape 00030 : public CSLTemplate 00031 { 00032 public: 00033 enum EXSIShapeType 00034 { 00035 XSI_ORDERED, 00036 XSI_INDEXED, 00037 }; 00038 00046 CSLXSIShape(CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate, EXSIShapeType in_Type); 00047 00050 virtual ~CSLXSIShape(); 00051 00055 virtual CSLXSISubComponentAttributeList* AddAttributeList(CSLXSISubComponentAttributeList::EAttributeType in_AttributeType); 00056 00060 SI_Int GetAttributeListCount(); 00061 00065 SI_Int GetAttributeListCountBySemantic(SI_Char* in_pSemantic); 00066 00070 CSIBCArray<CSLXSISubComponentAttributeList*>* AttributeLists(); 00071 00075 SI_Error RemoveAttributeList(); 00076 00080 SI_Error RemoveAttributeList( CSLXSISubComponentAttributeList* in_pAttributeList ); 00081 00085 SI_Error RemoveAttributeList( SI_Int in_iIndex ); 00086 00090 SI_Error ClearAttributeLists(); 00091 00095 SI_Error ClearAttributeListsBySemantic(SI_Char *in_pSemantic); 00096 00100 CSLXSISubComponentAttributeList* ConnectAttributeList( CSLXSISubComponentAttributeList* in_pNewXSISubComponentAttributeList ); 00101 00105 CSLXSISubComponentAttributeList* GetFirstAttributeListBySemantic( SI_Char* in_pSemantic ); 00106 00110 CSLXSISubComponentAttributeList* GetNextAttributeListBySemantic( SI_Char* in_pSemantic ); 00111 00112 //********************************************************************************** 00113 // Vertex position attribute helper (always only one vertex position attibute list) 00114 //********************************************************************************** 00115 00119 CSLXSISubComponentAttributeList* AddVertexPositionList(); 00120 00124 CSLXSISubComponentAttributeList* GetVertexPositionList(); 00125 00129 SI_Error RemoveVertexPositionList(); 00130 00131 //********************************************************************************** 00132 // Normal attribute helper 00133 //********************************************************************************** 00134 00138 CSLXSISubComponentAttributeList* AddNormalList(); 00139 00143 CSLXSISubComponentAttributeList* GetFirstNormalList(); 00144 00148 CSLXSISubComponentAttributeList* GetNextNormalList(); 00149 00153 SI_Int GetNormalListCount(); 00154 00158 SI_Error RemoveNormalList(); 00159 00163 SI_Error ClearNormalLists(); 00164 00165 //********************************************************************************** 00166 // Color attribute helper 00167 //********************************************************************************** 00168 00172 CSLXSISubComponentAttributeList* AddColorList(); 00173 00177 CSLXSISubComponentAttributeList* GetFirstColorList(); 00178 00182 CSLXSISubComponentAttributeList* GetNextColorList(); 00183 00187 SI_Int GetColorListCount(); 00188 00192 SI_Error RemoveColorList(); 00193 00197 SI_Error ClearColorLists(); 00198 00199 //********************************************************************************** 00200 // TexCoord attribute helper 00201 //********************************************************************************** 00202 00206 CSLXSISubComponentAttributeList* AddTexCoordList(); 00207 00211 CSLXSISubComponentAttributeList* GetFirstTexCoordList(); 00212 00216 CSLXSISubComponentAttributeList* GetNextTexCoordList(); 00217 00221 SI_Int GetTexCoordListCount(); 00222 00226 SI_Error RemoveTexCoordList(); 00227 00231 SI_Error ClearTexCoordLists(); 00232 00233 //********************************************************************************** 00234 // WeightMap attribute helper 00235 //********************************************************************************** 00236 00240 CSLXSISubComponentAttributeList* AddWeightMapList(); 00241 00245 CSLXSISubComponentAttributeList* GetFirstWeightMapList(); 00246 00250 CSLXSISubComponentAttributeList* GetNextWeightMapList(); 00251 00255 SI_Int GetWeightMapListCount(); 00256 00260 SI_Error RemoveWeightMapList(); 00261 00265 SI_Error ClearWeightMapLists(); 00266 00267 //********************************************************************************** 00268 // Tangent attribute helper 00269 //********************************************************************************** 00270 00274 CSLXSISubComponentAttributeList* AddTangentList(); 00275 00279 CSLXSISubComponentAttributeList* GetFirstTangentList(); 00280 00284 CSLXSISubComponentAttributeList* GetNextTangentList(); 00285 00289 SI_Int GetTangentListCount(); 00290 00294 SI_Error RemoveTangentList(); 00295 00299 SI_Error ClearTangentLists(); 00300 00301 //********************************************************************************** 00302 // Binormal attribute helper 00303 //********************************************************************************** 00304 00308 CSLXSISubComponentAttributeList* AddBinormalList(); 00309 00313 CSLXSISubComponentAttributeList* GetFirstBinormalList(); 00314 00318 CSLXSISubComponentAttributeList* GetNextBinormalList(); 00319 00323 SI_Int GetBinormalListCount(); 00324 00328 SI_Error RemoveBinormalList(); 00329 00333 SI_Error ClearBinormalLists(); 00334 00338 virtual ETemplateType Type() { return XSI_SHAPE; }; 00339 00343 EXSIShapeType GetShapeType() { return m_eShapeType; } 00344 00348 void SetShapeType(EXSIShapeType in_eShapeType) { m_eShapeType = in_eShapeType; } 00349 00353 virtual SI_Error Synchronize(); 00354 00355 protected: 00356 CSIBCArray<CSLXSISubComponentAttributeList *> m_AttributeLists; 00357 SI_Int m_iCurrentAttributeListIndex; 00358 00359 EXSIShapeType m_eShapeType; 00360 00361 void *m_pReserved; // reserved for future extension 00362 }; 00363 00364 #endif