All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
field.h
1//
2// Copyright 2016 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_FIELD_H
8#define PXR_IMAGING_HD_ST_FIELD_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/version.h"
12#include "pxr/imaging/hd/field.h"
13#include "pxr/imaging/hdSt/api.h"
14
15#include "pxr/imaging/hdSt/textureIdentifier.h"
16
17PXR_NAMESPACE_OPEN_SCOPE
18
22class HdStField : public HdField {
23public:
25 HDST_API
26 HdStField(SdfPath const & id, TfToken const & fieldType);
27 HDST_API
28 ~HdStField() override;
29
31 HDST_API
32 void Sync(HdSceneDelegate *sceneDelegate,
33 HdRenderParam *renderParam,
34 HdDirtyBits *dirtyBits) override;
35
36 HDST_API
37 HdDirtyBits GetInitialDirtyBitsMask() const override;
38
40 HDST_API
42 return _textureId;
43 }
44
46 size_t GetTextureMemory() const { return _textureMemory; }
47
49 HDST_API
51
53 HDST_API
54 static bool IsSupportedBprimType(const TfToken &bprimType);
55
56private:
57 const TfToken _fieldType;
58
59 HdStTextureIdentifier _textureId;
60 size_t _textureMemory;
61
62 bool _isInitialized : 1;
63};
64
65PXR_NAMESPACE_CLOSE_SCOPE
66
67#endif //PXR_IMAGING_HD_ST_FIELD_H
Hydra schema for a USD field primitive.
Definition: field.h:34
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 Field Buffer Prim.
Definition: field.h:22
HDST_API void Sync(HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
Loads field as 3d texture to generate GetFieldResource.
HDST_API HdStTextureIdentifier const & GetTextureIdentifier() const
Initialized by Sync.
Definition: field.h:41
HDST_API HdDirtyBits GetInitialDirtyBitsMask() const override
Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of thi...
static HDST_API const TfTokenVector & GetSupportedBprimTypes()
Bprim types handled by this class.
size_t GetTextureMemory() const
Get memory request for this field.
Definition: field.h:46
HDST_API HdStField(SdfPath const &id, TfToken const &fieldType)
For now, only fieldType HdStTokens->openvdbAsset is supported.
static HDST_API bool IsSupportedBprimType(const TfToken &bprimType)
Can bprim type be handled by this class.
Class to identify a texture file or a texture within the texture file (e.g., a frame in a movie).
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
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440