coordSysAdapter.h
Go to the documentation of this file.
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_IMAGING_COORD_SYS_ADAPTER_H
8 #define PXR_USD_IMAGING_USD_IMAGING_COORD_SYS_ADAPTER_H
9 
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usdImaging/usdImaging/api.h"
15 
16 PXR_NAMESPACE_OPEN_SCOPE
17 
18 
19 class UsdPrim;
20 
23 class UsdImagingCoordSysAdapter : public UsdImagingPrimAdapter {
24 public:
25  typedef UsdImagingPrimAdapter BaseAdapter;
26 
27  UsdImagingCoordSysAdapter()
29  {}
30 
31  USDIMAGING_API
32  virtual ~UsdImagingCoordSysAdapter();
33 
34  USDIMAGING_API
35  virtual SdfPath Populate(UsdPrim const& prim,
36  UsdImagingIndexProxy* index,
37  UsdImagingInstancerContext const* instancerContext = NULL);
38 
39  USDIMAGING_API
40  virtual bool IsSupported(UsdImagingIndexProxy const* index) const;
41 
42  // ---------------------------------------------------------------------- //
44  // ---------------------------------------------------------------------- //
45 
47  USDIMAGING_API
48  virtual void TrackVariability(UsdPrim const& prim,
49  SdfPath const& cachePath,
50  HdDirtyBits* timeVaryingBits,
52  instancerContext = NULL) const;
53 
54  USDIMAGING_API
55  virtual void ProcessPrimResync(SdfPath const& primPath,
56  UsdImagingIndexProxy* index);
57 
59  USDIMAGING_API
60  virtual void UpdateForTime(UsdPrim const& prim,
61  SdfPath const& cachePath,
62  UsdTimeCode time,
63  HdDirtyBits requestedBits,
65  instancerContext = NULL) const;
66 
67  // ---------------------------------------------------------------------- //
69  // ---------------------------------------------------------------------- //
70 
73  USDIMAGING_API
74  virtual HdDirtyBits ProcessPropertyChange(UsdPrim const& prim,
75  SdfPath const& cachePath,
76  TfToken const& propertyName);
77 
78  USDIMAGING_API
79  virtual void MarkDirty(UsdPrim const& prim,
80  SdfPath const& cachePath,
81  HdDirtyBits dirty,
82  UsdImagingIndexProxy* index);
83 
84  USDIMAGING_API
85  virtual void MarkTransformDirty(UsdPrim const& prim,
86  SdfPath const& cachePath,
87  UsdImagingIndexProxy* index);
88 
89 protected:
90  USDIMAGING_API
91  virtual void _RemovePrim(SdfPath const& cachePath,
92  UsdImagingIndexProxy* index);
93 };
94 
95 
96 PXR_NAMESPACE_CLOSE_SCOPE
97 
98 #endif // PXR_USD_IMAGING_USD_IMAGING_COORD_SYS_ADAPTER_H
This proxy class exposes a subset of the private Delegate API to PrimAdapters.
Definition: indexProxy.h:30
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.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:80
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:73
Base class for all PrimAdapters.
Definition: primAdapter.h:52
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.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:116
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:280
Object used by instancer prim adapters to pass along context about the instancer and instance prim to...
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 USDIMAGING_API void ProcessPrimResync(SdfPath const &cachePath, UsdImagingIndexProxy *index)
When a PrimResync event occurs, the prim may have been deleted entirely, adapter plug-ins should over...
virtual bool IsSupported(UsdImagingIndexProxy const *index) const
Returns true if the adapter can be populated into the target index.
Definition: primAdapter.h:680