dataSourceBasisCurves.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 #ifndef PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_BASISCURVES_H
8 #define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_BASISCURVES_H
9 
10 #include "pxr/usdImaging/usdImaging/dataSourceGprim.h"
11 #include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h"
12 
14 
15 #include "pxr/imaging/hd/dataSource.h"
16 
17 PXR_NAMESPACE_OPEN_SCOPE
18 
19 
25 {
26 public:
27  HD_DECLARE_DATASOURCE(UsdImagingDataSourceBasisCurvesTopology);
28 
29  TfTokenVector GetNames() override;
30  HdDataSourceBaseHandle Get(const TfToken & name) override;
31 
32 private:
34  const SdfPath &sceneIndexPath,
35  UsdGeomBasisCurves usdBasisCurves,
36  const UsdImagingDataSourceStageGlobals &stageGlobals);
37 
38 private:
39  const SdfPath _sceneIndexPath;
40  UsdGeomBasisCurves _usdBasisCurves;
41  const UsdImagingDataSourceStageGlobals &_stageGlobals;
42 };
43 
44 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceBasisCurvesTopology);
45 
46 // ----------------------------------------------------------------------------
47 
53 {
54 public:
55  HD_DECLARE_DATASOURCE(UsdImagingDataSourceBasisCurves);
56 
57  TfTokenVector GetNames() override;
58  HdDataSourceBaseHandle Get(const TfToken &name) override;
59 
60 private:
62  const SdfPath &sceneIndexPath,
63  UsdGeomBasisCurves usdBasisCurves,
64  const UsdImagingDataSourceStageGlobals &stageGlobals);
65 
66 private:
67  const SdfPath _sceneIndexPath;
68  UsdGeomBasisCurves _usdBasisCurves;
69  const UsdImagingDataSourceStageGlobals & _stageGlobals;
70 };
71 
72 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceBasisCurves);
73 
74 // ----------------------------------------------------------------------------
75 
81 {
82 public:
83  HD_DECLARE_DATASOURCE(UsdImagingDataSourceBasisCurvesPrim);
84 
85  TfTokenVector GetNames() override;
86  HdDataSourceBaseHandle Get(const TfToken &name) override;
87 
88  USDIMAGING_API
89  static HdDataSourceLocatorSet Invalidate(
90  UsdPrim const& prim,
91  const TfToken &subprim,
92  const TfTokenVector &properties,
93  UsdImagingPropertyInvalidationType invalidationType);
94 
95 private:
97  const SdfPath &sceneIndexPath,
98  UsdPrim usdPrim,
99  const UsdImagingDataSourceStageGlobals &stageGlobals);
100 };
101 
102 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceBasisCurvesPrim);
103 
104 PXR_NAMESPACE_CLOSE_SCOPE
105 
106 #endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_BASISCURVES_H
Data source representing a USD gprim.
A container data source representing basis curves topology information.
A container data source representing data unique to basis curves.
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Definition: dataSource.h:147
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:80
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
This class is used as a context object with global stage information, that gets passed down to dataso...
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
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
BasisCurves are a batched curve representation analogous to the classic RIB definition via Basis and ...
Definition: basisCurves.h:246
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
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
A prim data source representing a UsdGeomBasisCurves prim.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.