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 _MESH_H 00013 #define _MESH_H 00014 00015 #include "Geometry.h" 00016 00017 class CSLPolygonList; 00018 class CSLTriangleList; 00019 class CSLTriangleStripList; 00020 class CSLBaseShape; 00021 00022 00027 class XSIEXPORT CSLMesh 00028 : public CSLGeometry 00029 { 00030 public: 00031 CSLMesh(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate); 00032 virtual ~CSLMesh(); 00033 00037 SI_Error ClearPolygonLists(); 00038 00042 SI_Error ClearTriangleLists(); 00043 00047 SI_Error ClearTriangleStripLists(); 00048 00052 SI_Int GetPolygonListCount(); 00053 00057 SI_Int GetTriangleListCount(); 00058 00062 SI_Int GetTriangleStripListCount(); 00063 00069 CSLPolygonList** PolygonLists(); 00070 00074 CSLTriangleList** TriangleLists(); 00075 00079 CSLTriangleStripList** TriangleStripLists(); 00080 00084 CSLPolygonList* AddPolygonList(); 00085 00089 CSLTriangleList* AddTriangleList(); 00090 00094 CSLTriangleStripList* AddTriangleStripList(); 00095 00100 SI_Error RemovePolygonList(SI_Int l_nIndex); 00101 00106 SI_Error RemoveTriangleList(SI_Int l_nIndex); 00107 00112 SI_Error RemoveTriangleStripList(SI_Int l_nIndex); 00113 00118 SI_Error RemovePolygonList(CSLPolygonList* in_pObject); 00119 00124 SI_Error RemoveTriangleList(CSLTriangleList* in_pObject); 00125 00130 SI_Error RemoveTriangleStripList(CSLTriangleStripList* in_pObject); 00131 00135 CSLBaseShape* Shape() { return m_pShape; }; 00136 00137 // Connection functions 00138 CSLBaseShape* ConnectShape(CSLBaseShape*); 00139 CSLPolygonList* ConnectPolygonList(CSLPolygonList*); 00140 CSLTriangleList* ConnectTriangleList(CSLTriangleList*); 00141 CSLTriangleStripList* ConnectTriangleStripList(CSLTriangleStripList*); 00142 00143 virtual SI_Error Synchronize(); 00144 virtual SI_Error Fix(); 00145 virtual ETemplateType Type() { return SI_MESH; }; 00146 virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName); 00147 00148 private: 00149 CSLBaseShape* m_pShape; 00150 CSIBCArray<CSLPolygonList *> m_PolygonLists; 00151 CSIBCArray<CSLTriangleList *> m_TriangleLists; 00152 CSIBCArray<CSLTriangleStripList *> m_TriangleStripLists; 00153 00154 void *m_pReserved; // reserved for future extension 00155 }; 00156 00157 #endif