Blender V4.3
volume.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include <pxr/imaging/hd/sceneDelegate.h>
8
9#include "object.hh"
10
11namespace blender::io::hydra {
12
13class VolumeData : public ObjectData {
14 protected:
15 std::string filepath_;
16 pxr::HdVolumeFieldDescriptorVector field_descriptors_;
18
19 public:
20 VolumeData(HydraSceneDelegate *scene_delegate,
21 const Object *object,
22 pxr::SdfPath const &prim_id);
23
24 void init() override;
25 void insert() override;
26 void remove() override;
27 void update() override;
28
29 pxr::VtValue get_data(pxr::TfToken const &key) const override;
30 pxr::VtValue get_data(pxr::SdfPath const &id, pxr::TfToken const &key) const override;
31 pxr::SdfPath material_id() const override;
32 void available_materials(Set<pxr::SdfPath> &paths) const override;
33
34 pxr::HdVolumeFieldDescriptorVector field_descriptors() const;
35
36 protected:
37 void write_materials() override;
38};
39
40} // namespace blender::io::hydra
pxr::SdfPath prim_id
Definition id.hh:36
pxr::SdfPath material_id() const override
pxr::HdVolumeFieldDescriptorVector field_descriptors_
Definition volume.hh:16
void available_materials(Set< pxr::SdfPath > &paths) const override
pxr::HdVolumeFieldDescriptorVector field_descriptors() const
pxr::VtValue get_data(pxr::TfToken const &key) const override
VolumeData(HydraSceneDelegate *scene_delegate, const Object *object, pxr::SdfPath const &prim_id)