This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
volume.h
1//
2// Copyright 2019 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_ST_VOLUME_H
8#define PXR_IMAGING_HD_ST_VOLUME_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdSt/api.h"
12#include "pxr/imaging/hd/version.h"
13#include "pxr/imaging/hd/volume.h"
14
15PXR_NAMESPACE_OPEN_SCOPE
16
17class HdStDrawItem;
18
21class HdStVolume final : public HdVolume {
22public:
23 HDST_API
24 HdStVolume(SdfPath const& id);
25 HDST_API
26 ~HdStVolume() override;
27
28 HDST_API
29 HdDirtyBits GetInitialDirtyBitsMask() const override;
30
31 HDST_API
32 void UpdateRenderTag(HdSceneDelegate *delegate,
33 HdRenderParam *renderParam) override;
34
35 HDST_API
36 void Sync(HdSceneDelegate* delegate,
37 HdRenderParam* renderParam,
38 HdDirtyBits* dirtyBits,
39 TfToken const &reprToken) override;
40
41 HDST_API
42 void Finalize(HdRenderParam *renderParam) override;
43
45 HDST_API
46 static const float defaultStepSize;
47
49 HDST_API
50 static const float defaultStepSizeLighting;
51
54 HDST_API
56
57protected:
58 void _InitRepr(TfToken const &reprToken,
59 HdDirtyBits* dirtyBits) override;
60
61 HdDirtyBits _PropagateDirtyBits(HdDirtyBits bits) const override;
62
63 void _UpdateRepr(HdSceneDelegate *sceneDelegate,
64 HdRenderParam *renderParam,
65 TfToken const &reprToken,
66 HdDirtyBits *dirtyBitsState);
67
68private:
69 void _UpdateDrawItem(HdSceneDelegate *sceneDelegate,
70 HdRenderParam *renderParam,
71 HdStDrawItem *drawItem,
72 HdDirtyBits *dirtyBits);
73
74 enum DrawingCoord {
75 InstancePrimvar = HdDrawingCoord::CustomSlotsBegin
76 };
77
78 HdReprSharedPtr _volumeRepr;
79};
80
81PXR_NAMESPACE_CLOSE_SCOPE
82
83#endif //PXR_IMAGING_HD_ST_VOLUME_H
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
Adapter class providing data exchange with the client scene graph.
Represents a Volume Prim.
Definition: volume.h:21
HdDirtyBits _PropagateDirtyBits(HdDirtyBits bits) const override
This callback from Rprim gives the prim an opportunity to set additional dirty bits based on those al...
HDST_API void Sync(HdSceneDelegate *delegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits, TfToken const &reprToken) override
Pull invalidated scene data and prepare/update the renderable representation.
static HDST_API const float defaultStepSizeLighting
Default step size used for raymarching for lighting computation.
Definition: volume.h:50
HDST_API HdDirtyBits GetInitialDirtyBitsMask() const override
Returns the set of dirty bits that should be added to the change tracker for this prim,...
void _InitRepr(TfToken const &reprToken, HdDirtyBits *dirtyBits) override
Initialize the given representation of this Rprim.
static HDST_API const float defaultMaxTextureMemoryPerField
Default memory limit for a field texture (in Mb) if not overridden by field prim with textureMemory.
Definition: volume.h:55
static HDST_API const float defaultStepSize
Default step size used for raymarching.
Definition: volume.h:46
HDST_API void Finalize(HdRenderParam *renderParam) override
Finalizes object resources.
Hd schema for a renderable volume primitive.
Definition: volume.h:26
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71