| 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 | { |
no test coverage detected