cameraAdapter.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_CAMERA_ADAPTER_H
8 #define PXR_USD_IMAGING_USD_IMAGING_CAMERA_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 
26 {
27 public:
29 
32  {}
33 
34  USDIMAGING_API
35  ~UsdImagingCameraAdapter() override;
36 
37  // ---------------------------------------------------------------------- //
39  // ---------------------------------------------------------------------- //
40 
41  USDIMAGING_API
42  TfTokenVector GetImagingSubprims(UsdPrim const& prim) override;
43 
44  USDIMAGING_API
45  TfToken GetImagingSubprimType(
46  UsdPrim const& prim,
47  TfToken const& subprim) override;
48 
49  USDIMAGING_API
50  HdContainerDataSourceHandle GetImagingSubprimData(
51  UsdPrim const& prim,
52  TfToken const& subprim,
53  const UsdImagingDataSourceStageGlobals &stageGlobals) override;
54 
55  USDIMAGING_API
56  HdDataSourceLocatorSet InvalidateImagingSubprim(
57  UsdPrim const& prim,
58  TfToken const& subprim,
59  TfTokenVector const& properties,
60  UsdImagingPropertyInvalidationType invalidationType) override;
61 
62  // ---------------------------------------------------------------------- //
64  // ---------------------------------------------------------------------- //
65 
66  USDIMAGING_API
67  SdfPath Populate(UsdPrim const& prim,
68  UsdImagingIndexProxy* index,
70  instancerContext = NULL) override;
71 
72  USDIMAGING_API
73  bool IsSupported(UsdImagingIndexProxy const* index) const override;
74 
75  // ---------------------------------------------------------------------- //
77  // ---------------------------------------------------------------------- //
78 
80  USDIMAGING_API
81  void TrackVariability(UsdPrim const& prim,
82  SdfPath const& cachePath,
83  HdDirtyBits* timeVaryingBits,
85  instancerContext = NULL) const override;
86 
87 
89  USDIMAGING_API
90  void UpdateForTime(UsdPrim const& prim,
91  SdfPath const& cachePath,
92  UsdTimeCode time,
93  HdDirtyBits requestedBits,
95  instancerContext = NULL) const override;
96 
97  // ---------------------------------------------------------------------- //
99  // ---------------------------------------------------------------------- //
100 
101  USDIMAGING_API
102  HdDirtyBits ProcessPropertyChange(UsdPrim const& prim,
103  SdfPath const& cachePath,
104  TfToken const& propertyName) override;
105 
106  USDIMAGING_API
107  void MarkDirty(UsdPrim const& prim,
108  SdfPath const& cachePath,
109  HdDirtyBits dirty,
110  UsdImagingIndexProxy* index) override;
111 
112  USDIMAGING_API
113  void MarkTransformDirty(UsdPrim const& prim,
114  SdfPath const& cachePath,
115  UsdImagingIndexProxy* index) override;
116 
117  USDIMAGING_API
118  void MarkWindowPolicyDirty(UsdPrim const& prim,
119  SdfPath const& cachePath,
120  UsdImagingIndexProxy* index) override;
121 
122  // ---------------------------------------------------------------------- //
124  // ---------------------------------------------------------------------- //
125 
126  USDIMAGING_API
127  VtValue Get(UsdPrim const& prim,
128  SdfPath const& cachePath,
129  TfToken const& key,
130  UsdTimeCode time,
131  VtIntArray *outIndices) const override;
132 
133 protected:
134  void _RemovePrim(SdfPath const& cachePath,
135  UsdImagingIndexProxy* index) override;
136 
137 };
138 
139 
140 PXR_NAMESPACE_CLOSE_SCOPE
141 
142 #endif // PXR_USD_IMAGING_USD_IMAGING_CAMERA_ADAPTER_H
This proxy class exposes a subset of the private Delegate API to PrimAdapters.
Definition: indexProxy.h:30
USDIMAGING_API void UpdateForTime(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time, HdDirtyBits requestedBits, UsdImagingInstancerContext const *instancerContext=NULL) const override
Thread Safe.
Delegate support for UsdGeomCamera.
Definition: cameraAdapter.h:25
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
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
USDIMAGING_API void TrackVariability(UsdPrim const &prim, SdfPath const &cachePath, HdDirtyBits *timeVaryingBits, UsdImagingInstancerContext const *instancerContext=NULL) const override
Thread Safe.
Represents a set of data source locators closed under descendancy.
USDIMAGING_API HdDirtyBits ProcessPropertyChange(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &propertyName) override
Returns a bit mask of attributes to be updated, or HdChangeTracker::AllDirty if the entire prim must ...
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
USDIMAGING_API SdfPath Populate(UsdPrim const &prim, UsdImagingIndexProxy *index, UsdImagingInstancerContext const *instancerContext=NULL) override
Called to populate the RenderIndex for this UsdPrim.
Object used by instancer prim adapters to pass along context about the instancer and instance prim to...
USDIMAGING_API bool IsSupported(UsdImagingIndexProxy const *index) const override
Returns true if the adapter can be populated into the target index.
USDIMAGING_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...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:89