Loading...
Searching...
No Matches
extentResolvingSceneIndex.h
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"
10#include "pxr/usdImaging/usdImaging/api.h"
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12
13PXR_NAMESPACE_OPEN_SCOPE
14
15namespace UsdImagingExtentResolvingSceneIndex_Impl
16{
17using _InfoSharedPtr = std::shared_ptr<struct _Info>;
18}
19
20#define USDIMAGINGEXTENTRESOLVINGSCENEINDEX_TOKENS \
21 (purposes)
22
23TF_DECLARE_PUBLIC_TOKENS(UsdImagingExtentResolvingSceneIndexTokens,
24 USDIMAGING_API,
25 USDIMAGINGEXTENTRESOLVINGSCENEINDEX_TOKENS);
26
28
39{
40public:
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 HdRenderTagTokens->geometry rather than the corresponding
45 // UsdGeomTokens->default_).
46 USDIMAGING_API
47 static UsdImagingExtentResolvingSceneIndexRefPtr
48 New(HdSceneIndexBaseRefPtr const &inputSceneIndex,
49 HdContainerDataSourceHandle const &inputArgs);
50
51 USDIMAGING_API
53
54 USDIMAGING_API
55 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
56 USDIMAGING_API
57 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
58
59protected:
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
76private:
77 UsdImagingExtentResolvingSceneIndex_Impl::_InfoSharedPtr _info;
78};
79
80PXR_NAMESPACE_CLOSE_SCOPE
81
82#endif // PXR_USD_IMAGING_USD_IMAGING_EXTENT_RESOLVING_SCENE_INDEX_H
Abstract interface to scene data.
Definition: sceneIndex.h:54
An abstract base class for a filtering scene index that observes a single input scene index.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
A scene index that uses UsdGeomModelAPI's extentsHint if UsdGeomBoundable's extent has not been autho...
USDIMAGING_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
USDIMAGING_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35