Loading...
Searching...
No Matches
stageSceneIndexInterface.h
Go to the documentation of this file.
1//
2// Copyright 2026 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_STAGE_SCENE_INDEX_INTERFACE_H
8#define PXR_USD_IMAGING_USD_IMAGING_STAGE_SCENE_INDEX_INTERFACE_H
9
11
12#include "pxr/pxr.h"
13
14#include "pxr/usdImaging/usdImaging/api.h"
15
17#include "pxr/base/tf/type.h"
18#include "pxr/imaging/hd/sceneIndex.h"
19#include "pxr/usd/usd/timeCode.h"
20
21#include <type_traits>
22
23PXR_NAMESPACE_OPEN_SCOPE
24
27
32{
33public:
34 USDIMAGING_API
36
40 virtual void SetStage(UsdStageRefPtr stage) = 0;
41
46 virtual void SetTime(UsdTimeCode time) = 0;
47
49 virtual UsdTimeCode GetTime() const = 0;
50
58 virtual void ApplyPendingUpdates() = 0;
59};
60
67{
68public:
69 virtual UsdImagingStageSceneIndexInterfaceRefPtr New() const = 0;
70};
71
75template <class T>
78{
79 static_assert(std::is_base_of_v<UsdImagingStageSceneIndexInterface, T>);
80public:
81 UsdImagingStageSceneIndexInterfaceRefPtr New() const final {
82 return TfCreateRefPtr(new T);
83 }
84};
85
86PXR_NAMESPACE_CLOSE_SCOPE
87
88#endif
Abstract interface to scene data.
Definition sceneIndex.h:55
Base class of all factory types.
Definition type.h:56
A factory interface that constructs instances of UsdImagingStageSceneIndexInterface.
A trivial implementation of UsdImagingStageSceneIndexInterfaceFactoryBase that manufactures instances...
An interface for initial scene indices that populate the Hydra scene with prims and data sources from...
virtual void ApplyPendingUpdates()=0
Apply queued stage edits to imaging scene.
virtual void SetTime(UsdTimeCode time)=0
Set the time, and call PrimsDirtied for any time-varying attributes.
virtual UsdTimeCode GetTime() const =0
Return the current time.
virtual void SetStage(UsdStageRefPtr stage)=0
Set the USD stage to pull data from.
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition stage.h:135
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition timeCode.h:73
Standard pointer typedefs.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition declarePtrs.h:58