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

Method addProcessedCurve

Source/Falcor/Scene/SceneBuilder.cpp:868–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866 }
867
868 CurveID SceneBuilder::addProcessedCurve(const ProcessedCurve& curve)
869 {
870 CurveSpec spec;
871
872 // Add the curve to the scene.
873 spec.name = curve.name;
874 spec.topology = curve.topology;
875 spec.materialId = addMaterial(curve.pMaterial);
876
877 spec.vertexCount = (uint32_t)curve.staticData.size();
878 spec.staticVertexCount = (uint32_t)curve.staticData.size();
879
880 spec.indexData = std::move(curve.indexData);
881 spec.staticData = std::move(curve.staticData);
882
883 spec.indexCount = (uint32_t)curve.indexData.size();
884
885 mCurves.push_back(spec);
886
887 if (mCurves.size() > std::numeric_limits<uint32_t>::max())
888 {
889 FALCOR_THROW("Trying to build a scene that exceeds supported number of curves.");
890 }
891
892 return CurveID(mCurves.size() - 1);
893 }
894
895 void SceneBuilder::addCachedCurves(std::vector<CachedCurve>&& cachedCurves)
896 {

Callers 1

addCurvesToSceneBuilderFunction · 0.80

Calls 4

addMaterialFunction · 0.85
maxFunction · 0.50
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected