PolygonList.h

Go to the documentation of this file.
00001 //***************************************************************************************
00002 // File supervisor: Crosswalk team
00012 //***************************************************************************************
00013 
00014 #ifndef _POLYGONLIST_H
00015 #define _POLYGONLIST_H
00016 
00017 #include "Template.h"
00018 
00019 #ifndef _SL_INT_ARRAY_PROXY_EXPORT_
00020 #define _SL_INT_ARRAY_PROXY_EXPORT_
00021 
00022 //XSITEMPLATEEXP template class XSIEXPORT CSLArrayProxy<SI_Int, SI_Int, 1>;
00023 
00024 #endif // _SL_INT_ARRAY_PROXY_EXPORT_
00025 
00026 class CSLBaseMaterial;
00027 
00042 class XSIEXPORT CSLPolygonList
00043     : public CSLTemplate
00044 {
00045 public:
00048     typedef CSLArrayProxy<SI_Int, SI_Int, 1> CSLIntArray;
00049 
00056     CSLPolygonList(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00057 
00060     virtual ~CSLPolygonList();
00061 
00065     SI_Int          GetPolygonCount () { return m_PolygonVertexCount.GetUsed(); }
00066 
00070     CSLIntArray*    GetPolygonVertexCountList() { return &m_PolygonVertexCount; };
00071 
00075     SI_Int*         GetPolygonVertexCountListPtr() { return m_PolygonVertexCount.ArrayPtr(); }
00076 
00080     SI_Int          GetVertexCount () { return m_VertexIndices.GetUsed(); }
00081 
00085     CSLIntArray*    GetVertexIndices() { return &m_VertexIndices; };
00086 
00090     SI_Int*         GetVertexIndicesPtr() { return m_VertexIndices.ArrayPtr(); }
00091 
00095     CSLIntArray*    CreateNormalIndices();
00096 
00100     CSLIntArray*    GetNormalIndices() { return m_NormalIndices; }
00101 
00105     SI_Int*         GetNormalIndicesPtr();
00106 
00110     SI_Error        DestroyNormalIndices();
00111 
00115     CSLIntArray*    CreateColorIndices();
00116 
00120     CSLIntArray*    GetColorIndices() { return m_ColorIndices; }
00121 
00125     SI_Int*         GetColorIndicesPtr();
00126 
00130     SI_Error        DestroyColorIndices();
00131 
00135     CSLIntArray*    AddUVArray();
00136 
00140     SI_Int          GetUVArrayCount();
00141 
00146     CSLIntArray*    GetUVIndices(SI_Int in_nId);
00147 
00152     SI_Int*         GetUVIndicesPtr(SI_Int in_nId);
00153 
00157     SI_Error        RemoveUVArray();
00158 
00162     SI_Error        ClearUVArrays();
00163 
00167     CSLBaseMaterial*    GetMaterial() { return m_pMaterial; }
00168 
00172     SI_Void             SetMaterial(CSLBaseMaterial *in_pNewMaterial) { m_pMaterial = in_pNewMaterial; }
00173 
00177     virtual SI_Error Synchronize();
00178 
00182     virtual ETemplateType Type() { return SI_POLYGON_LIST; };
00183 
00188     virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00189 
00190 private:
00191     CSLBaseMaterial*        m_pMaterial;
00192     CSLIntArray             m_PolygonVertexCount;
00193     CSLIntArray             m_VertexIndices;
00194 
00195     CSLIntArray*            m_NormalIndices;
00196     CSLIntArray*            m_ColorIndices;
00197     CSIBCArray<CSLIntArray* >   m_UVIndices;
00198 
00199     SI_Bool                 m_bSingleUV;
00200     SI_Int                  m_iArrayCount;
00201 
00202     void *m_pReserved;  // reserved for future extension
00203 };
00204 
00205 #endif