| 2576 | } |
| 2577 | |
| 2578 | uint32_t Scene::getCustomPrimitiveIndex(GlobalGeometryID geometryID) const |
| 2579 | { |
| 2580 | if (getGeometryType(geometryID) != GeometryType::Custom) |
| 2581 | { |
| 2582 | FALCOR_THROW("'geometryID' ({}) does not refer to a custom primitive.", geometryID); |
| 2583 | } |
| 2584 | |
| 2585 | size_t customPrimitiveOffset = mMeshDesc.size() + mCurveDesc.size() + mSDFGridDesc.size(); |
| 2586 | FALCOR_ASSERT(geometryID.get() >= (uint32_t)customPrimitiveOffset && geometryID.get() < getGeometryCount()); |
| 2587 | return geometryID.get() - (uint32_t)customPrimitiveOffset; |
| 2588 | } |
| 2589 | |
| 2590 | const CustomPrimitiveDesc& Scene::getCustomPrimitive(uint32_t index) const |
| 2591 | { |