MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / DeleteObj

Method DeleteObj

src/luxrays/core/namedobjectvector.cpp:141–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void NamedObjectVector::DeleteObj(const std::string &name) {
142 const u_int index = GetIndex(name);
143 objs.erase(objs.begin() + index);
144
145 // I have to rebuild the indices from scratch
146 name2index.clear();
147 index2obj.clear();
148
149 for (u_int i = 0; i < objs.size(); ++i) {
150 NamedObject *obj = objs[i];
151
152 name2index.insert(Name2IndexType::value_type(obj->GetName(), i));
153 index2obj.insert(Index2ObjType::value_type(i, obj));
154 }
155}
156
157template<class MapType> void PrintMap(const MapType &map, std::ostream &os) {
158 typedef typename MapType::const_iterator const_iterator;

Callers 4

DeleteExtMeshMethod · 0.80
DeleteSceneObjectMethod · 0.80
DeleteMaterialMethod · 0.80
DeleteTextureMethod · 0.80

Calls 5

eraseMethod · 0.45
beginMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected