TriangleStrip.h

Go to the documentation of this file.
00001 //***************************************************************************************
00002 // File supervisor: Crosswalk team
00012 //***************************************************************************************
00013 
00014 #ifndef _TRIANGLESTRIP_H
00015 #define _TRIANGLESTRIP_H
00016 
00017 #include "Template.h"
00018 
00019 class CSLTriangleStripList;
00020 
00021 #ifndef _SL_INT_ARRAY_PROXY_EXPORT_
00022 #define _SL_INT_ARRAY_PROXY_EXPORT_
00023 #endif
00024 
00037 class XSIEXPORT CSLTriangleStrip
00038     : public CSLTemplate
00039 {
00040 public:
00043     typedef CSLArrayProxy<SI_Int, SI_Int, 1> CSLIntArray;
00044 
00045     CSLTriangleStrip(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate, CSLTriangleStripList* in_pTriStripList);
00046     virtual ~CSLTriangleStrip();
00047 
00051     SI_Int                  GetVertexCount () { return m_VertexIndices.GetUsed(); }
00052 
00056     CSLIntArray*            GetVertexIndices() { return &m_VertexIndices; }
00057 
00061     SI_Int*                 GetVertexIndicesPtr() { return m_VertexIndices.ArrayPtr(); }
00062 
00066     CSLIntArray*            CreateNormalIndices();
00067 
00071     CSLIntArray*            GetNormalIndices() { return m_NormalIndices; }
00072 
00076     SI_Int*                 GetNormalIndicesPtr();
00077 
00081     SI_Error                DestroyNormalIndices();
00082 
00086     CSLIntArray*            CreateColorIndices();
00087 
00091     CSLIntArray*            GetColorIndices() { return m_ColorIndices; }
00092 
00096     SI_Int*                 GetColorIndicesPtr();
00097 
00101     SI_Error                DestroyColorIndices();
00102 
00106     CSLIntArray*            AddUVArray();
00107 
00112     CSLIntArray*            GetUVIndices(SI_Int in_nId);
00113 
00118     SI_Int*                 GetUVIndicesPtr(SI_Int in_nId);
00119 
00123     SI_Error                RemoveUVArray();
00124 
00128     SI_Error                ClearUVArrays();
00129 
00133     SI_Int                  GetUVArrayCount();
00134 
00138     virtual ETemplateType   Type() { return SI_TRIANGLE_STRIP; }
00139     virtual SI_Error        Synchronize();
00140 
00141 private:
00142     CSLIntArray             m_VertexIndices;
00143 
00144     CSLIntArray*            m_NormalIndices;
00145     CSIBCArray<CSLIntArray* >   m_UVIndices;
00146     CSLIntArray*            m_ColorIndices;
00147 
00148     SI_Bool                 m_bSingleUV;
00149     SI_Int                  m_iArrayCount;
00150 
00151     void *m_pReserved;  // reserved for future extension
00152 };
00153 
00154 #endif