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

Method readGridVolume

Source/Falcor/Scene/SceneCache.cpp:862–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860 }
861
862 ref<GridVolume> SceneCache::readGridVolume(InputStream& stream, const std::vector<ref<Grid>>& grids, ref<Device> pDevice)
863 {
864 ref<GridVolume> pGridVolume = GridVolume::create(pDevice, "");
865
866 stream.read(pGridVolume->mHasAnimation);
867 stream.read(pGridVolume->mIsAnimated);
868 stream.read(pGridVolume->mNodeID);
869
870 stream.read(pGridVolume->mName);
871 for (auto& gridSequence : pGridVolume->mGrids)
872 {
873 gridSequence.resize(stream.read<uint32_t>());
874 for (auto& pGrid : gridSequence)
875 {
876 auto id = stream.read<uint32_t>();
877 pGrid = id == uint32_t(-1) ? nullptr : grids[id];
878 }
879 }
880 stream.read(pGridVolume->mGridFrame);
881 stream.read(pGridVolume->mGridFrameCount);
882 stream.read(pGridVolume->mBounds);
883 stream.read(pGridVolume->mData);
884
885 return pGridVolume;
886 }
887
888 // Grid
889

Callers

nothing calls this directly

Calls 3

createFunction · 0.50
readMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected