ISubObjType *EditPatchMod::GetSubObjType(int i) { static bool initialized = false; if (!initialized) { initialized = true; SOT_Vertex.SetName(GetString(IDS_TH_VERTEX)); SOT_Edge.SetName(GetString(IDS_TH_EDGE)); SOT_Patch.SetName(GetString(IDS_TH_PATCH)); SOT_Tile.SetName("Tile"); // SOT_Element.SetName(GetString(IDS_TH_ELEMENT)); // SOT_Handle.SetName(GetString(IDS_TH_HANDLE)); } switch(i) { case -1: if (GetSubObjectLevel() > 0) return GetSubObjType(GetSubObjectLevel() - 1); break; case 0: return &SOT_Vertex; case 1: return &SOT_Edge; case 2: return &SOT_Patch; case 3: return &SOT_Tile; // case 4: return &SOT_Element; // case 5: return &SOT_Handle; } return NULL; }
ISubObjType *EditFaceDataMod::GetSubObjType(int i) { static bool initialized = false; if(!initialized) { initialized = true; SOT_Face.SetName(GetString(IDS_FACE)); } switch(i) { case -1: if(GetSubObjectLevel() > 0) return &SOT_Face; break; case 0: return &SOT_Face; } return NULL; }