XSIShape.h

Go to the documentation of this file.
00001 //***************************************************************************************
00002 // File supervisor: Crosswalk team
00012 //***************************************************************************************
00013 
00014 #ifndef _XSISHAPE_H
00015 #define _XSISHAPE_H
00016 
00017 #include "Template.h"
00018 #include "Scene.h"
00019 #include "Model.h"
00020 #include "XSISubComponentAttributeList.h"
00021 
00022 
00023 
00031 class XSIEXPORT CSLXSIShape
00032     : public CSLTemplate
00033 {
00034 public:
00037     enum EXSIShapeType
00038     {
00039         XSI_ORDERED,    
00040         XSI_INDEXED,    
00041     };
00042 
00050     CSLXSIShape(CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate, EXSIShapeType in_Type);
00051 
00054     virtual ~CSLXSIShape();
00055 
00060     virtual CSLXSISubComponentAttributeList*    AddAttributeList(CSLXSISubComponentAttributeList::EAttributeType in_AttributeType);
00061 
00065     SI_Int                              GetAttributeListCount();
00066 
00071     SI_Int                              GetAttributeListCountBySemantic(SI_Char* in_pSemantic);
00072 
00076     CSIBCArray<CSLXSISubComponentAttributeList*>*   AttributeLists();
00077 
00081     SI_Error                            RemoveAttributeList();
00082 
00087     SI_Error    RemoveAttributeList( CSLXSISubComponentAttributeList* in_pAttributeList );
00088 
00093     SI_Error    RemoveAttributeList( SI_Int in_iIndex );
00094 
00098     SI_Error                            ClearAttributeLists();
00099 
00104     SI_Error                            ClearAttributeListsBySemantic(SI_Char *in_pSemantic);
00105 
00110     CSLXSISubComponentAttributeList*    ConnectAttributeList( CSLXSISubComponentAttributeList* in_pNewXSISubComponentAttributeList );
00111 
00116     CSLXSISubComponentAttributeList* GetFirstAttributeListBySemantic( SI_Char* in_pSemantic );
00117 
00122     CSLXSISubComponentAttributeList* GetNextAttributeListBySemantic( SI_Char* in_pSemantic );
00123 
00124     //**********************************************************************************
00125     // Vertex position attribute helper (always only one vertex position attibute list)
00126     //**********************************************************************************
00127 
00131     CSLXSISubComponentAttributeList*    AddVertexPositionList();
00132 
00136     CSLXSISubComponentAttributeList*    GetVertexPositionList();
00137 
00141     SI_Error                            RemoveVertexPositionList();
00142 
00143     //**********************************************************************************
00144     // Normal attribute helper
00145     //**********************************************************************************
00146 
00150     CSLXSISubComponentAttributeList*    AddNormalList();
00151 
00155     CSLXSISubComponentAttributeList*    GetFirstNormalList();
00156 
00160     CSLXSISubComponentAttributeList*    GetNextNormalList();
00161 
00165     SI_Int                              GetNormalListCount();
00166 
00170     SI_Error                            RemoveNormalList();
00171 
00175     SI_Error                            ClearNormalLists();
00176 
00177     //**********************************************************************************
00178     // Color attribute helper
00179     //**********************************************************************************
00180 
00184     CSLXSISubComponentAttributeList*    AddColorList();
00185 
00189     CSLXSISubComponentAttributeList*    GetFirstColorList();
00190 
00194     CSLXSISubComponentAttributeList*    GetNextColorList();
00195 
00199     SI_Int                              GetColorListCount();
00200 
00204     SI_Error                            RemoveColorList();
00205 
00209     SI_Error                            ClearColorLists();
00210 
00211     //**********************************************************************************
00212     // TexCoord attribute helper
00213     //**********************************************************************************
00214 
00218     CSLXSISubComponentAttributeList*    AddTexCoordList();
00219 
00223     CSLXSISubComponentAttributeList*    GetFirstTexCoordList();
00224 
00228     CSLXSISubComponentAttributeList*    GetNextTexCoordList();
00229 
00233     SI_Int                              GetTexCoordListCount();
00234 
00238     SI_Error                            RemoveTexCoordList();
00239 
00243     SI_Error                            ClearTexCoordLists();
00244 
00245     //**********************************************************************************
00246     // WeightMap attribute helper
00247     //**********************************************************************************
00248 
00252     CSLXSISubComponentAttributeList*    AddWeightMapList();
00253 
00257     CSLXSISubComponentAttributeList*    GetFirstWeightMapList();
00258 
00262     CSLXSISubComponentAttributeList*    GetNextWeightMapList();
00263 
00267     SI_Int                              GetWeightMapListCount();
00268 
00272     SI_Error                            RemoveWeightMapList();
00273 
00277     SI_Error                            ClearWeightMapLists();
00278 
00279     //**********************************************************************************
00280     // Tangent attribute helper
00281     //**********************************************************************************
00282 
00286     CSLXSISubComponentAttributeList*    AddTangentList();
00287 
00291     CSLXSISubComponentAttributeList*    GetFirstTangentList();
00292 
00296     CSLXSISubComponentAttributeList*    GetNextTangentList();
00297 
00301     SI_Int                              GetTangentListCount();
00302 
00306     SI_Error                            RemoveTangentList();
00307 
00311     SI_Error                            ClearTangentLists();
00312 
00313     //**********************************************************************************
00314     // Binormal attribute helper
00315     //**********************************************************************************
00316 
00320     CSLXSISubComponentAttributeList*    AddBinormalList();
00321 
00325     CSLXSISubComponentAttributeList*    GetFirstBinormalList();
00326 
00330     CSLXSISubComponentAttributeList*    GetNextBinormalList();
00331 
00335     SI_Int                              GetBinormalListCount();
00336 
00340     SI_Error                            RemoveBinormalList();
00341 
00345     SI_Error                            ClearBinormalLists();
00346 
00350     virtual ETemplateType               Type() { return XSI_SHAPE; };
00351 
00355     EXSIShapeType                       GetShapeType() { return m_eShapeType; }
00356 
00360     void                                SetShapeType(EXSIShapeType in_eShapeType) { m_eShapeType = in_eShapeType; }
00361 
00365     virtual SI_Error Synchronize();
00366 
00367 protected:
00368     CSIBCArray<CSLXSISubComponentAttributeList *>   m_AttributeLists;
00369     SI_Int                                          m_iCurrentAttributeListIndex;
00370 
00371     EXSIShapeType                                   m_eShapeType;
00372 
00373     void *m_pReserved;  // reserved for future extension
00374 };
00375 
00376 #endif