Loading...
Searching...
No Matches
skelRootAdapter.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_USD_IMAGING_USD_SKEL_IMAGING_SKEL_ROOT_ADAPTER_H
8#define PXR_USD_IMAGING_USD_SKEL_IMAGING_SKEL_ROOT_ADAPTER_H
9
10#include "pxr/pxr.h"
12#include "pxr/usdImaging/usdSkelImaging/api.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
27class UsdSkelImagingSkelRootAdapter : public UsdImagingPrimAdapter {
28public:
29 using BaseAdapter = UsdImagingPrimAdapter;
30
31 UsdSkelImagingSkelRootAdapter()
32 : BaseAdapter()
33 {}
34
35 USDSKELIMAGING_API
36 virtual ~UsdSkelImagingSkelRootAdapter();
37
38 // ---------------------------------------------------------------------- //
40 // ---------------------------------------------------------------------- //
41 USDSKELIMAGING_API
43 Populate(const UsdPrim& prim,
46 instancerContext=nullptr) override;
47
48 USDSKELIMAGING_API
49 bool CanPopulateUsdInstance() const override { return true; }
50
51 bool ShouldIgnoreNativeInstanceSubtrees() const override;
52
53 // ---------------------------------------------------------------------- //
55 // ---------------------------------------------------------------------- //
56
58 USDSKELIMAGING_API
59 void TrackVariability(const UsdPrim& prim,
60 const SdfPath& cachePath,
61 HdDirtyBits* timeVaryingBits,
63 instancerContext = nullptr) const override;
64
66 USDSKELIMAGING_API
67 void UpdateForTime(const UsdPrim& prim,
68 const SdfPath& cachePath,
69 UsdTimeCode time,
70 HdDirtyBits requestedBits,
72 instancerContext=nullptr) const override;
73
74 // ---------------------------------------------------------------------- //
76 // ---------------------------------------------------------------------- //
77
78 USDSKELIMAGING_API
79 HdDirtyBits ProcessPropertyChange(const UsdPrim& prim,
80 const SdfPath& cachePath,
81 const TfToken& propertyName) override;
82
83 USDSKELIMAGING_API
84 void MarkDirty(const UsdPrim& prim,
85 const SdfPath& cachePath,
86 HdDirtyBits dirty,
87 UsdImagingIndexProxy* index) override;
88
89 // ---------------------------------------------------------------------- //
91 // ---------------------------------------------------------------------- //
92
93 USDSKELIMAGING_API
94 TfTokenVector GetImagingSubprims(UsdPrim const &prim) override;
95
96 USDSKELIMAGING_API
97 TfToken GetImagingSubprimType(
98 UsdPrim const &prim,
99 TfToken const &subprim) override;
100
101 USDSKELIMAGING_API
102 HdContainerDataSourceHandle GetImagingSubprimData(
103 UsdPrim const& prim,
104 TfToken const& subprim,
105 const UsdImagingDataSourceStageGlobals &stageGlobals) override;
106
107 USDSKELIMAGING_API
108 HdDataSourceLocatorSet InvalidateImagingSubprim(
109 UsdPrim const& prim,
110 TfToken const& subprim,
111 TfTokenVector const& properties,
112 UsdImagingPropertyInvalidationType invalidationType) override;
113
114
115protected:
116 USDSKELIMAGING_API
117 void _RemovePrim(const SdfPath& cachePath,
118 UsdImagingIndexProxy* index) override;
119};
120
121
122PXR_NAMESPACE_CLOSE_SCOPE
123
124#endif // PXR_USD_IMAGING_USD_SKEL_IMAGING_SKEL_ROOT_ADAPTER_H
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
This class is used as a context object with global stage information, that gets passed down to dataso...
This proxy class exposes a subset of the private Delegate API to PrimAdapters.
Definition: indexProxy.h:30
Base class for all PrimAdapters.
Definition: primAdapter.h:54
virtual HdDirtyBits ProcessPropertyChange(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &propertyName)=0
Returns a bit mask of attributes to be updated, or HdChangeTracker::AllDirty if the entire prim must ...
virtual SdfPath Populate(UsdPrim const &prim, UsdImagingIndexProxy *index, UsdImagingInstancerContext const *instancerContext=nullptr)=0
Called to populate the RenderIndex for this UsdPrim.
virtual void TrackVariability(UsdPrim const &prim, SdfPath const &cachePath, HdDirtyBits *timeVaryingBits, UsdImagingInstancerContext const *instancerContext=nullptr) const =0
For the given prim, variability is detected and stored in timeVaryingBits.
virtual void UpdateForTime(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time, HdDirtyBits requestedBits, UsdImagingInstancerContext const *instancerContext=nullptr) const =0
Populates the cache for the given prim, time and requestedBits.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:72
Object used by instancer prim adapters to pass along context about the instancer and instance prim to...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440