Loading...
Searching...
No Matches
piPrototypePropagatingSceneIndex.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_PI_PROTOTYPE_PROPAGATING_SCENE_INDEX_H
8#define PXR_USD_IMAGING_USD_IMAGING_PI_PROTOTYPE_PROPAGATING_SCENE_INDEX_H
9
10#include "pxr/usdImaging/usdImaging/api.h"
11
12#include "pxr/imaging/hd/filteringSceneIndex.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
17
18namespace UsdImagingPiPrototypePropagatingSceneIndex_Impl
19{
20using _ContextSharedPtr = std::shared_ptr<class _Context>;
21using _InstancerObserverUniquePtr = std::unique_ptr<class _InstancerObserver>;
22}
23
352{
353public:
354 USDIMAGING_API
355 static UsdImagingPiPrototypePropagatingSceneIndexRefPtr New(
356 HdSceneIndexBaseRefPtr const &inputSceneIndex);
357
358 USDIMAGING_API
360
361 USDIMAGING_API
362 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
363
364 USDIMAGING_API
365 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
366
367 USDIMAGING_API
368 std::vector<HdSceneIndexBaseRefPtr> GetInputScenes() const override;
369
370 USDIMAGING_API
371 std::vector<HdSceneIndexBaseRefPtr> GetEncapsulatedScenes() const override;
372
373private:
375 const HdSceneIndexBaseRefPtr &inputSceneIndex);
376
377 friend class _MergingSceneIndexObserver;
378 class _MergingSceneIndexObserver : public HdSceneIndexObserver
379 {
380 public:
381 _MergingSceneIndexObserver(
383
384 void PrimsAdded(
385 const HdSceneIndexBase &sender,
386 const AddedPrimEntries &entries) override;
387 void PrimsDirtied(
388 const HdSceneIndexBase &sender,
389 const DirtiedPrimEntries &entries) override;
390 void PrimsRemoved(
391 const HdSceneIndexBase &sender,
392 const RemovedPrimEntries &entries) override;
393 void PrimsRenamed(
394 const HdSceneIndexBase &sender,
395 const RenamedPrimEntries &entries) override;
396
397 private:
399 };
400
401 UsdImagingPiPrototypePropagatingSceneIndex_Impl::
402 _ContextSharedPtr const _context;
403
404 _MergingSceneIndexObserver _mergingSceneIndexObserver;
405
406 UsdImagingPiPrototypePropagatingSceneIndex_Impl::
407 _InstancerObserverUniquePtr _instancerObserver;
408};
409
410PXR_NAMESPACE_CLOSE_SCOPE
411
412#endif
413
A mix-in class for scene indices that implement their behaviour by creating other scene indices (inte...
An abstract base class for scene indexes that have one or more input scene indexes which serve as a b...
Abstract interface to scene data.
Definition sceneIndex.h:55
Observer of scene data.
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
A scene index translating USD point instancers into Hydra instancers.
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
Small struct representing a 'prim' in the Hydra scene index.
Definition sceneIndex.h:36