HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hermiteCurvesAdapter.h
Go to the documentation of this file.
1 //
2 // Copyright 2020 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_HERMITE_CURVES_ADAPTER_H
8 #define PXR_USD_IMAGING_USD_IMAGING_HERMITE_CURVES_ADAPTER_H
9 
10 /// \file usdImaging/hermiteCurvesAdapter.h
11 
12 #include "pxr/pxr.h"
16 
18 
19 
20 /// \class UsdImagingHermiteCurvesAdapter
21 ///
22 /// Delegate support for UsdGeomHermiteCurves.
23 ///
24 /// As Hydra doesn't support imaging of Hermite curves, we render
25 /// the points as linearly interpolated BasisCurves, ignoring tangents,
26 /// widths, and normals.
27 ///
29 public:
31 
34  {}
37 
40  UsdPrim const& prim,
42  UsdImagingInstancerContext const* instancerContext = nullptr) override;
43 
45  bool IsSupported(UsdImagingIndexProxy const* index) const override;
46 
47  // ---------------------------------------------------------------------- //
48  /// \name Parallel Setup and Resolve
49  // ---------------------------------------------------------------------- //
50 
51  /// Thread Safe.
53  void TrackVariability(
54  UsdPrim const& prim,
55  SdfPath const& cachePath,
56  HdDirtyBits* timeVaryingBits,
57  UsdImagingInstancerContext const* instancerContext = nullptr)
58  const override;
59 
60  // ---------------------------------------------------------------------- //
61  /// \name Change Processing
62  // ---------------------------------------------------------------------- //
63 
66  SdfPath const& cachePath,
67  TfToken const& propertyName) override;
68 
69  // ---------------------------------------------------------------------- //
70  /// \name Data access
71  // ---------------------------------------------------------------------- //
72 
74  VtValue GetTopology(UsdPrim const& prim,
75  SdfPath const& cachePath,
76  UsdTimeCode time) const override;
77 
78 protected:
80  bool _IsBuiltinPrimvar(TfToken const& primvarName) const override;
81 };
82 
83 
85 
86 #endif // PXR_USD_IMAGING_USD_IMAGING_HERMITE_CURVES_ADAPTER_H
virtual USDIMAGING_API ~UsdImagingHermiteCurvesAdapter()
#define USDIMAGING_API
Definition: api.h:23
GT_API const UT_StringHolder time
USDIMAGING_API SdfPath Populate(UsdPrim const &prim, UsdImagingIndexProxy *index, UsdImagingInstancerContext const *instancerContext=nullptr) override
uint32_t HdDirtyBits
Definition: types.h:143
USDIMAGING_API HdDirtyBits ProcessPropertyChange(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &propertyName) override
UsdImagingGprimAdapter BaseAdapter
Definition: token.h:70
Definition: prim.h:116
Definition: path.h:273
USDIMAGING_API bool IsSupported(UsdImagingIndexProxy const *index) const override
Returns true if the adapter can be populated into the target index.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
GLuint index
Definition: glcorearb.h:786
USDIMAGING_API bool _IsBuiltinPrimvar(TfToken const &primvarName) const override
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
USDIMAGING_API VtValue GetTopology(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const override
USDIMAGING_API void TrackVariability(UsdPrim const &prim, SdfPath const &cachePath, HdDirtyBits *timeVaryingBits, UsdImagingInstancerContext const *instancerContext=nullptr) const override
Thread Safe.
Definition: value.h:146