MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / updatePrimitives

Method updatePrimitives

Source/Falcor/Scene/SDFs/SDFGrid.cpp:233–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 }
232
233 void SDFGrid::updatePrimitives(const std::vector<std::pair<uint32_t, SDF3DPrimitive>>& primitives)
234 {
235 for (auto it = primitives.begin(); it != primitives.end(); it++)
236 {
237 uint32_t primitiveID = it->first;
238 const SDF3DPrimitive& primitive = it->second;
239
240 auto idxIt = mPrimitiveIDToIndex.find(primitiveID);
241 if (idxIt == mPrimitiveIDToIndex.end())
242 {
243 logWarning("Primitive with ID {} does not exist!", primitiveID);
244 continue;
245 }
246
247 // Mark as dirty.
248 mPrimitivesDirty = true;
249
250 // Update the primitive.
251 mPrimitives[idxIt->second] = primitive;
252 }
253
254 updatePrimitivesBuffer();
255 }
256
257 void SDFGrid::setValues(const std::vector<float>& cornerValues, uint32_t gridWidth)
258 {

Callers 1

updateEditPrimitivesMethod · 0.80

Calls 3

logWarningFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected