field3dAssetAdapter.h
1 //
2 // Copyright 2018 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_USD_IMAGING_USD_VOL_IMAGING_FIELD3D_ASSET_ADAPTER_H
8 #define PXR_USD_IMAGING_USD_VOL_IMAGING_FIELD3D_ASSET_ADAPTER_H
9 
11 
12 #include "pxr/pxr.h"
14 #include "pxr/usdImaging/usdVolImaging/api.h"
15 
16 PXR_NAMESPACE_OPEN_SCOPE
17 
18 
19 class UsdPrim;
20 
26 public:
28 
31  {}
32 
33  USDVOLIMAGING_API
35 
36  // ---------------------------------------------------------------------- //
38  // ---------------------------------------------------------------------- //
39 
40  USDVOLIMAGING_API
41  TfTokenVector GetImagingSubprims(UsdPrim const& prim) override;
42 
43  USDVOLIMAGING_API
44  TfToken GetImagingSubprimType(UsdPrim const& prim, TfToken const& subprim)
45  override;
46 
47  USDVOLIMAGING_API
48  HdContainerDataSourceHandle GetImagingSubprimData(
49  UsdPrim const& prim,
50  TfToken const& subprim,
51  const UsdImagingDataSourceStageGlobals &stageGlobals) override;
52 
53  USDVOLIMAGING_API
54  HdDataSourceLocatorSet InvalidateImagingSubprim(
55  UsdPrim const& prim,
56  TfToken const& subprim,
57  TfTokenVector const& properties,
58  UsdImagingPropertyInvalidationType invalidationType) override;
59 
60  // ---------------------------------------------------------------------- //
62  // ---------------------------------------------------------------------- //
63 
64  USDVOLIMAGING_API
65  VtValue Get(UsdPrim const& prim,
66  SdfPath const& cachePath,
67  TfToken const& key,
68  UsdTimeCode time,
69  VtIntArray *outIndices) const override;
70 
71  USDVOLIMAGING_API
72  TfToken GetPrimTypeToken() const override;
73 };
74 
75 
76 PXR_NAMESPACE_CLOSE_SCOPE
77 
78 #endif // PXR_USD_IMAGING_USD_VOL_IMAGING_FIELD3D_ASSET_ADAPTER_H
Base class for all USD fields.
Definition: fieldAdapter.h:25
USDVOLIMAGING_API VtValue Get(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &key, UsdTimeCode time, VtIntArray *outIndices) const override
Gets the value of the parameter named key for the given prim (which has the given cache path) and giv...
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:80
Adapter class for fields of type Field3DAsset.
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:73
This class is used as a context object with global stage information, that gets passed down to dataso...
Base class for all PrimAdapters.
Definition: primAdapter.h:52
Represents a set of data source locators closed under descendancy.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:489
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:280
USDVOLIMAGING_API TfToken GetPrimTypeToken() const override
Returns the token specifying the Hydra primitive type that is created by this adapter.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:89