1 // Copyright 2009-2021 Intel Corporation 2 // SPDX-License-Identifier: Apache-2.0 3 4 #pragma once 5 6 #include "Volume.h" 7 #include "common/Data.h" 8 9 #include "openvkl/openvkl.h" 10 11 namespace ospray { 12 13 struct OSPRAY_SDK_INTERFACE VolumetricModel : public ManagedObject 14 { 15 VolumetricModel(Volume *geometry); 16 ~VolumetricModel() override; 17 std::string toString() const override; 18 19 void commit() override; 20 21 RTCGeometry embreeGeometryHandle() const; 22 23 box3f bounds() const; 24 25 Ref<Volume> getVolume() const; 26 27 void setGeomID(int geomID); 28 29 private: 30 box3f volumeBounds; 31 Ref<Volume> volume; 32 Ref<Volume> volumeAPI; 33 VKLIntervalIteratorContext vklIntervalContext{nullptr}; 34 }; 35 36 OSPTYPEFOR_SPECIALIZATION(VolumetricModel *, OSP_VOLUMETRIC_MODEL); 37 38 } // namespace ospray 39