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

Method writeGridVolume

Source/Falcor/Scene/SceneCache.cpp:840–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

838 // GridVolume
839
840 void SceneCache::writeGridVolume(OutputStream& stream, const ref<GridVolume>& pGridVolume, const std::vector<ref<Grid>>& grids)
841 {
842 stream.write(pGridVolume->mHasAnimation);
843 stream.write(pGridVolume->mIsAnimated);
844 stream.write(pGridVolume->mNodeID);
845
846 stream.write(pGridVolume->mName);
847 for (const auto& gridSequence : pGridVolume->mGrids)
848 {
849 stream.write((uint32_t)gridSequence.size());
850 for (const auto& pGrid : gridSequence)
851 {
852 uint32_t id = pGrid ? (uint32_t)std::distance(grids.begin(), std::find(grids.begin(), grids.end(), pGrid)) : uint32_t(-1);
853 stream.write(id);
854 }
855 }
856 stream.write(pGridVolume->mGridFrame);
857 stream.write(pGridVolume->mGridFrameCount);
858 stream.write(pGridVolume->mBounds);
859 stream.write(pGridVolume->mData);
860 }
861
862 ref<GridVolume> SceneCache::readGridVolume(InputStream& stream, const std::vector<ref<Grid>>& grids, ref<Device> pDevice)
863 {

Callers

nothing calls this directly

Calls 5

findFunction · 0.85
writeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected