61 void _checkValidity(
Engine& engine);
62 void _cancel()
final { _chunkEvent.set_exception(std::make_exception_ptr(async::task_canceled())); }
63 float _progressBytes()
const {
return CHUNK_PROGRESS_WEIGHT * ((float)_receivedBytes / _param.
size); }
65 async::event_task<Blob> _chunkEvent;
66 async::event_task<ModelDescriptorPtr> _errorEvent;
67 std::vector<async::task<ModelDescriptorPtr>> _finishTasks;
70 size_t _receivedBytes{0};
71 const float CHUNK_PROGRESS_WEIGHT{0.5f};
#define SERIALIZATION_FRIEND(type)
#define SERIALIZATION_ACCESS(type)
AddModelFromBlobTask(const BinaryParam ¶m, Engine &engine)
void appendBlob(const std::string &blob)
Provides an abstract implementation of a ray-tracing engine.
The ModelParams class represents the parameters needed for initializing a model instance.
std::string type
file extension or type (MESH, POINTS, CIRCUIT)
size_t size
size in bytes of file