38 const auto& path = modelParams.
getPath();
42 if (!registry.isSupportedFile(path))
47 functor.setProgressFunc([&
progress =
progress](
const auto& msg,
auto,
auto amount)
51 _task = async::spawn(std::move(functor))
53 [&engine](async::task<ModelDescriptorPtr>
result)
async::cancellation_token _cancelToken
AddModelTask(const ModelParams &model, Engine &engine)
Provides an abstract implementation of a ray-tracing engine.
PLATFORM_API std::function< void()> triggerRender
Callback when a new frame shall be triggered. Currently called by event plugins Deflect and Rockets.
PLATFORM_API Scene & getScene()
Returns the scene.
The ModelParams class represents the parameters needed for initializing a model instance.
PLATFORM_API const std::string & getPath() const
getPath gets the path of the model
void update(const std::string &operation, const float amount)
PLATFORM_API LoaderRegistry & getLoaderRegistry()
Get the registry for all supported loaders of this scene.
ModelDescriptorPtr result()
const TaskRuntimeError MISSING_PARAMS
const TaskRuntimeError UNSUPPORTED_TYPE