XSIPolygonList.h

00001 //***************************************************************************************
00002 //
00003 // File supervisor: Softimage 3D Games & 3D Bridge team
00004 //
00005 // (c) Copyright 2001-2005 Avid Technology, Inc. . All rights reserved.
00006 //
00007 //***************************************************************************************
00008 
00009 /****************************************************************************************
00010 THIS CODE IS PUBLISHED AS A SAMPLE ONLY AND IS PROVIDED "AS IS".
00011 IN NO EVENT SHALL SOFTIMAGE, AVID TECHNOLOGY, INC. AND/OR THEIR RESPECTIVE
00012 SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
00013 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00014 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
00015 CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE .
00016 
00017 COPYRIGHT NOTICE. Copyright © 1999-2002 Avid Technology Inc. . All rights reserved. 
00018 
00019 SOFTIMAGE is a registered trademark of Avid Technology Inc. or its subsidiaries 
00020 or divisions. Windows NT is a registered trademark of Microsoft Corp. All other
00021 trademarks contained herein are the property of their respective owners. 
00022 ****************************************************************************************/
00023 
00024 #ifndef _XSIPOLYGONLIST_H
00025 #define _XSIPOLYGONLIST_H
00026 
00027 #include "XSISubComponentList.h"
00028 #include "Material.h"
00029 #include "Scene.h"
00030 #include "Model.h"
00031 #include "XSIIndexList.h"
00032 
00034 
00046 class XSIEXPORT CSLXSIPolygonList
00047     : public CSLXSISubComponentList
00048 {
00049 public:
00053     typedef CSLArrayProxy<SI_Int, SI_Int, 1> CSLIntArray;
00054 
00061     CSLXSIPolygonList(CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate);
00062 
00065     virtual ~CSLXSIPolygonList();
00066 
00070     virtual ETemplateType           Type() { return XSI_POLYGON_LIST; }
00071 
00075     CSLBaseMaterial*                GetMaterial() { return m_pMaterial; }
00076 
00080     CSIBCString                     GetMaterialName();
00081 
00086     SI_Void                         SetMaterial(CSLBaseMaterial *in_pNewMaterial);
00087 
00092     SI_Void                         SetMaterialName(const CSIBCString& in_szNewMaterialName);
00093 
00097     SI_Int                          GetPolygonCount();
00098 
00102     CSLIntArray*                    GetPolygonNodeCountArray();
00103 
00107     CSLIntArray*                    GetVertexIndices();
00108 
00112     SI_Error Synchronize();
00113 
00117     virtual SI_Error                    SetCount(SI_Int);
00118 
00119     //**********************************************************************************
00120     // Index position helper (always only one index position list)
00121     //**********************************************************************************
00122 
00126     CSLXSIIndexList*    ConnectIndexList( CSLXSIIndexList* in_pNewXSIIndexList );
00127 
00131     virtual CSLXSIIndexList*    AddIndexList();
00132 
00136     CSLXSIIndexList*    GetIndexList();
00137 
00141     SI_Error                            RemoveIndexList();
00142 
00143 private:
00144     CSLIntArray                     m_PolygonNodeCountArray;
00145 
00146     CSLIntArray                     m_VertexIndices;
00147 
00148     CSLBaseMaterial*                m_pMaterial;
00149 
00150     CSIBCString                     m_szMaterialName;
00151 
00152     CSLXSIIndexList *               m_IndexList;
00153 
00154     void *m_pReserved;  // reserved for future extension
00155 };
00156 
00157 #endif