Changeset 1543 for GTP/trunk/Lib/Geom/shared/GeoTool/include
- Timestamp:
- 09/29/06 14:26:17 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GeoTool/include/GeoMeshViewUI.h
r1526 r1543 86 86 87 87 using namespace Geometry; 88 using namespace std; 88 89 89 90 class GeoToolIndexData : public Geometry::IndexData 90 91 { 91 public: 92 GeoToolIndexData(unsigned int submeshes):Geometry::IndexData(){ 93 submeshcount = submeshes; 94 indices=new unsigned int*[submeshcount]; 95 indexCount=new unsigned int[submeshcount]; 96 for (int i=0; i<submeshcount; i++) 97 { 98 indices[i]=NULL; 99 indexCount[i]=0; 92 public: 93 GeoToolIndexData(unsigned int submeshes):Geometry::IndexData(){ 94 submeshcount = submeshes; 95 indices=new unsigned int*[submeshcount]; 96 indexCount=new unsigned int[submeshcount]; 97 for (int i=0; i<submeshcount; i++) 98 { 99 indices[i]=NULL; 100 indexCount[i]=0; 101 } 100 102 } 101 } 102 virtual ~GeoToolIndexData(void){ 103 for (int i=0; i<submeshcount; i++) 104 if (indices[i]) 105 delete[] indices[i]; 106 delete[] indices; 107 delete[] indexCount; 108 } 109 110 virtual void Begin(unsigned int submesh, unsigned int numinds){ 111 if (indices[submesh]) 112 delete[] indices[submesh]; 113 indices[submesh] = new unsigned int[numinds]; 114 indexCount[submesh] = numinds; 115 modifySubmesh=submesh; 116 } 117 118 virtual void SetIndex(unsigned int i, unsigned int index){ 119 indices[modifySubmesh][i] = index; 120 } 121 122 virtual void End(void){} 123 virtual void BorrowIndexData(const IndexData *){} 124 125 unsigned int submeshcount; 126 unsigned int **indices; 127 unsigned int *indexCount; 128 unsigned int modifySubmesh; 103 virtual ~GeoToolIndexData(void){ 104 for (int i=0; i<submeshcount; i++) 105 if (indices[i]) 106 delete[] indices[i]; 107 delete[] indices; 108 delete[] indexCount; 109 } 110 111 virtual void Begin(unsigned int submesh, unsigned int numinds){ 112 if (indices[submesh]) 113 delete[] indices[submesh]; 114 indices[submesh] = new unsigned int[numinds]; 115 indexCount[submesh] = numinds; 116 modifySubmesh=submesh; 117 } 118 119 virtual void SetIndex(unsigned int i, unsigned int index){ 120 indices[modifySubmesh][i] = index; 121 } 122 123 virtual void End(void){} 124 virtual void BorrowIndexData(const IndexData *){} 125 126 unsigned int submeshcount; 127 unsigned int **indices; 128 unsigned int *indexCount; 129 unsigned int modifySubmesh; 129 130 }; 130 131
Note: See TracChangeset
for help on using the changeset viewer.