HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
instanceablePrimAdapter.h
Go to the documentation of this file.
1 //
2 // Copyright 2024 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_INSTANCEABLE_PRIM_ADAPTER_H
8 #define PXR_USD_IMAGING_USD_IMAGING_INSTANCEABLE_PRIM_ADAPTER_H
9 
12 
13 #include "pxr/usd/sdf/path.h"
14 
15 #include "pxr/pxr.h"
16 
18 
19 /// An abstract adapter class for prims that are instanceable. Adapters for
20 /// instanceable prims should derive from this class instead of
21 /// UsdImaginggPrimAdapter.
23 {
24 public:
26 
27 protected:
30  // ---------------------------------------------------------------------- //
31  /// \name Utility
32  // ---------------------------------------------------------------------- //
33 
34  // Given the USD path for a prim of this adapter's type, returns
35  // the prim's Hydra cache path.
37  SdfPath
39  const SdfPath& usdPath,
41  instancerContext = nullptr) const override;
42 
43  // Given the cachePath and instancerContext, resolve the proxy prim path
45  SdfPath
47  const SdfPath& cachePath,
49  instancerContext = nullptr) const;
50 };
51 
53 
54 #endif // PXR_USD_IMAGING_USD_IMAGING_INSTANCEABLE_PRIM_ADAPTER_H
#define USDIMAGING_API
Definition: api.h:23
USDIMAGING_API SdfPath ResolveProxyPrimPath(const SdfPath &cachePath, const UsdImagingInstancerContext *instancerContext=nullptr) const
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
USDIMAGING_API SdfPath ResolveCachePath(const SdfPath &usdPath, const UsdImagingInstancerContext *instancerContext=nullptr) const override
Returns whether custom shading of prims is enabled.