Loading...
Searching...
No Matches
dataSourceFieldAsset.h
1//
2// Copyright 2022 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7
8#ifndef PXR_USD_IMAGING_USD_VOL_IMAGING_DATA_SOURCE_FIELD_ASSET_H
9#define PXR_USD_IMAGING_USD_VOL_IMAGING_DATA_SOURCE_FIELD_ASSET_H
10
12
13#include "pxr/pxr.h"
14#include "pxr/usdImaging/usdVolImaging/api.h"
15
16#include "pxr/usdImaging/usdImaging/dataSourcePrim.h"
17#include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h"
18#include "pxr/imaging/hd/dataSource.h"
19
20PXR_NAMESPACE_OPEN_SCOPE
21
22
28{
29public:
30 HD_DECLARE_DATASOURCE(UsdImagingDataSourceFieldAsset);
31
33 HdDataSourceBaseHandle Get(const TfToken &name) override;
34
35 USDVOLIMAGING_API
37
38private:
39
40 // Private constructor, use static New() instead.
42 const SdfPath &sceneIndexPath,
43 UsdPrim usdPrim,
44 const UsdImagingDataSourceStageGlobals &stageGlobals);
45
46private:
47 const SdfPath _sceneIndexPath;
48 UsdPrim _usdPrim;
49 const UsdImagingDataSourceStageGlobals & _stageGlobals;
50};
51
52HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceFieldAsset);
53
59{
60public:
61 HD_DECLARE_DATASOURCE(UsdImagingDataSourceFieldAssetPrim);
62
64 HdDataSourceBaseHandle Get(const TfToken &name) override;
65
66 static
68 Invalidate(
69 UsdPrim const& prim,
70 const TfToken &subprim,
71 const TfTokenVector &properties,
72 UsdImagingPropertyInvalidationType invalidationType);
73
74private:
75
76 // Private constructor, use static New() instead.
78 const SdfPath &sceneIndexPath,
79 UsdPrim usdPrim,
80 const UsdImagingDataSourceStageGlobals &stageGlobals);
81};
82
83HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceFieldAssetPrim);
84
85PXR_NAMESPACE_CLOSE_SCOPE
86
87#endif // PXR_USD_IMAGING_USD_VOL_IMAGING_DATA_SOURCE_FIELD_ASSET_H
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Definition: dataSource.h:99
Represents a set of data source locators closed under descendancy.
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
A container data source representing volumeField info.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
A prim data source representing UsdVolOpenVDBAsset or UsdVolField3DAsset.
TfTokenVector GetNames() override
Returns the names for which this data source can return meaningful results.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the data source representing name, if valid.
Data source representing a basic USD prim.
This class is used as a context object with global stage information, that gets passed down to dataso...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440