HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extentResolvingSceneIndex.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 #ifndef PXR_USD_IMAGING_USD_IMAGING_EXTENT_RESOLVING_SCENE_INDEX_H
7 #define PXR_USD_IMAGING_USD_IMAGING_EXTENT_RESOLVING_SCENE_INDEX_H
8 
9 #include "pxr/pxr.h"
12 
14 
15 namespace UsdImagingExtentResolvingSceneIndex_Impl
16 {
17 using _InfoSharedPtr = std::shared_ptr<struct _Info>;
18 }
19 
20 #define USDIMAGINGEXTENTRESOLVINGSCENEINDEX_TOKENS \
21  (purposes)
22 
23 TF_DECLARE_PUBLIC_TOKENS(UsdImagingExtentResolvingSceneIndexTokens,
26 
28 
29 /// \class UsdImagingExtentResolvingSceneIndex
30 ///
31 /// A scene index that uses UsdGeomModelAPI's extentsHint if
32 /// UsdGeomBoundable's extent has not been authored.
33 ///
34 /// TODO: The UsdStageSceneIndex should consult the
35 /// UsdGeomComputeExtentFunction and this scene index should use it.
36 ///
39 {
40 public:
41 
42  // Datasource purposes at inputArgs is supposed to be a vector data source
43  // of token data sources. These tokens are hydra purposes (in particular,
44  // use HdTokens->geometry rather than the corresponding
45  // UsdGeomTokens->default_).
47  static UsdImagingExtentResolvingSceneIndexRefPtr
48  New(HdSceneIndexBaseRefPtr const &inputSceneIndex,
49  HdContainerDataSourceHandle const &inputArgs);
50 
53 
55  HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
57  SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
58 
59 protected:
61  HdSceneIndexBaseRefPtr const &inputSceneIndex,
62  HdContainerDataSourceHandle const &inputArgs);
63 
64  void _PrimsAdded(
65  const HdSceneIndexBase &sender,
66  const HdSceneIndexObserver::AddedPrimEntries &entries) override;
67 
68  void _PrimsRemoved(
69  const HdSceneIndexBase &sender,
70  const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
71 
72  void _PrimsDirtied(
73  const HdSceneIndexBase &sender,
74  const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
75 
76 private:
78 };
79 
81 
82 #endif // PXR_USD_IMAGING_USD_IMAGING_EXTENT_RESOLVING_SCENE_INDEX_H
static USDIMAGING_API UsdImagingExtentResolvingSceneIndexRefPtr New(HdSceneIndexBaseRefPtr const &inputSceneIndex, HdContainerDataSourceHandle const &inputArgs)
#define USDIMAGING_API
Definition: api.h:23
void _PrimsAdded(const HdSceneIndexBase &sender, const HdSceneIndexObserver::AddedPrimEntries &entries) override
USDIMAGING_API ~UsdImagingExtentResolvingSceneIndex() override
USDIMAGING_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
TF_DECLARE_REF_PTRS(UsdImagingExtentResolvingSceneIndex)
std::shared_ptr< struct _Info > _InfoSharedPtr
void _PrimsDirtied(const HdSceneIndexBase &sender, const HdSceneIndexObserver::DirtiedPrimEntries &entries) override
UsdImagingExtentResolvingSceneIndex(HdSceneIndexBaseRefPtr const &inputSceneIndex, HdContainerDataSourceHandle const &inputArgs)
USDIMAGING_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
std::vector< class SdfPath > SdfPathVector
void _PrimsRemoved(const HdSceneIndexBase &sender, const HdSceneIndexObserver::RemovedPrimEntries &entries) override
TF_DECLARE_PUBLIC_TOKENS(UsdImagingExtentResolvingSceneIndexTokens, USDIMAGING_API, USDIMAGINGEXTENTRESOLVINGSCENEINDEX_TOKENS)
Definition: path.h:273
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define USDIMAGINGEXTENTRESOLVINGSCENEINDEX_TOKENS
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74