HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dataSourceStageGlobals.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_DATA_SOURCE_STAGE_GLOBALS_H
8 #define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_STAGE_GLOBALS_H
9 
11 
12 #include "pxr/usd/usd/prim.h"
13 #include "pxr/usd/usd/timeCode.h"
14 
16 
17 #include "pxr/usd/sdf/path.h"
18 
20 
21 /// \class UsdImagingDataSourceStageGlobals
22 ///
23 /// This class is used as a context object with global stage information,
24 /// that gets passed down to datasources to help them answer scene queries.
25 ///
26 /// It's a pure virtual interface to allow for different use cases to override
27 /// certain behaviors (like getting the time coordinate, or whether we support
28 /// time-varying tracking).
29 ///
31 {
32 public:
35 
36  // Datasource API
37 
38  /// Returns the current time represented in this instance.
39  virtual UsdTimeCode GetTime() const = 0;
40 
41  /// Flags the given \p hydraPath as time varying at the given locator.
42  virtual void FlagAsTimeVarying(
43  const SdfPath &hydraPath,
44  const HdDataSourceLocator &locator) const = 0;
45 
46  /// Flags the object at \p usdPath as dependent on an asset path.
47  /// \p usdPath may point to a prim (e.g., if the prim has asset path
48  /// metadata) or an attribute (e.g., if the attribute has an
49  /// asset path value).
50  virtual void FlagAsAssetPathDependent(
51  const SdfPath &usdPath) const = 0;
52 };
53 
54 
56 
57 #endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_STAGE_GLOBALS_H
#define USDIMAGING_API
Definition: api.h:23
virtual UsdTimeCode GetTime() const =0
Returns the current time represented in this instance.
virtual USDIMAGING_API ~UsdImagingDataSourceStageGlobals()
Definition: path.h:273
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
virtual void FlagAsAssetPathDependent(const SdfPath &usdPath) const =0
virtual void FlagAsTimeVarying(const SdfPath &hydraPath, const HdDataSourceLocator &locator) const =0
Flags the given hydraPath as time varying at the given locator.