All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sceneDelegate.h
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_IMAGING_HD_SCENE_DELEGATE_H
25 #define PXR_IMAGING_HD_SCENE_DELEGATE_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/version.h"
30 
31 #include "pxr/imaging/hd/aov.h"
32 #include "pxr/imaging/hd/basisCurvesTopology.h"
33 #include "pxr/imaging/hd/enums.h"
34 #include "pxr/imaging/hd/meshTopology.h"
35 #include "pxr/imaging/hd/renderIndex.h"
36 #include "pxr/imaging/hd/repr.h"
37 #include "pxr/imaging/hd/textureResource.h"
38 #include "pxr/imaging/hd/timeSampleArray.h"
39 
40 #include "pxr/imaging/pxOsd/subdivTags.h"
41 
42 #include "pxr/base/vt/array.h"
43 #include "pxr/base/vt/dictionary.h"
44 #include "pxr/base/vt/value.h"
45 #include "pxr/usd/sdf/path.h"
46 
47 #include "pxr/base/gf/vec2i.h"
48 #include "pxr/base/tf/hash.h"
49 
50 #include <memory>
51 #include <vector>
52 
53 PXR_NAMESPACE_OPEN_SCOPE
54 
56 
58 typedef std::shared_ptr<SdfPathVector> HdIdVectorSharedPtr;
59 
61 typedef std::vector<std::pair<SdfPath, int>> HdInstancerContext;
62 
70  // The Prims to synchronize in this request.
71  SdfPathVector IDs;
72 
73  // The HdChangeTracker::DirtyBits that are set for each Prim.
74  std::vector<HdDirtyBits> dirtyBits;
75 };
76 
84 
87 
90 
96  : refineLevel(0)
97  , flatShadingEnabled(false)
98  , displacementEnabled(true)
99  { }
100 
106  HdDisplayStyle(int refineLevel_,
107  bool flatShading = false,
108  bool displacement = true)
109  : refineLevel(std::max(0, refineLevel_))
110  , flatShadingEnabled(flatShading)
111  , displacementEnabled(displacement)
112  {
113  if (refineLevel_ < 0) {
114  TF_CODING_ERROR("negative refine level is not supported");
115  } else if (refineLevel_ > 8) {
116  TF_CODING_ERROR("refine level > 8 is not supported");
117  }
118  }
119 
120  HdDisplayStyle(HdDisplayStyle const& rhs) = default;
121  ~HdDisplayStyle() = default;
122 
123  bool operator==(HdDisplayStyle const& rhs) const {
124  return refineLevel == rhs.refineLevel
127  }
128  bool operator!=(HdDisplayStyle const& rhs) const {
129  return !(*this == rhs);
130  }
131 };
132 
140  HdInterpolation interpolation;
145 
147  HdPrimvarDescriptor(TfToken const& name_,
148  HdInterpolation interp_,
149  TfToken const& role_=HdPrimvarRoleTokens->none)
150  : name(name_), interpolation(interp_), role(role_)
151  { }
152  bool operator==(HdPrimvarDescriptor const& rhs) const {
153  return name == rhs.name && role == rhs.role
154  && interpolation == rhs.interpolation;
155  }
156  bool operator!=(HdPrimvarDescriptor const& rhs) const {
157  return !(*this == rhs);
158  }
159 };
160 
161 typedef std::vector<HdPrimvarDescriptor> HdPrimvarDescriptorVector;
162 
173  SdfPath sourceComputationId;
174  TfToken sourceComputationOutputName;
175  HdTupleType valueType;
176 
179  TfToken const& name_,
180  HdInterpolation interp_,
181  TfToken const & role_,
182  SdfPath const & sourceComputationId_,
183  TfToken const & sourceComputationOutputName_,
184  HdTupleType const & valueType_)
185  : HdPrimvarDescriptor(name_, interp_, role_)
186  , sourceComputationId(sourceComputationId_)
187  , sourceComputationOutputName(sourceComputationOutputName_)
188  , valueType(valueType_)
189  { }
190  bool operator==(HdExtComputationPrimvarDescriptor const& rhs) const {
191  return HdPrimvarDescriptor::operator==(rhs) &&
192  sourceComputationId == rhs.sourceComputationId &&
193  sourceComputationOutputName == rhs.sourceComputationOutputName &&
194  valueType == rhs.valueType;
195  }
196  bool operator!=(HdExtComputationPrimvarDescriptor const& rhs) const {
197  return !(*this == rhs);
198  }
199 };
200 
201 typedef std::vector<HdExtComputationPrimvarDescriptor>
202  HdExtComputationPrimvarDescriptorVector;
203 
213  TfToken name;
214  SdfPath sourceComputationId;
215  TfToken sourceComputationOutputName;
216 
219  TfToken const & name_,
220  SdfPath const & sourceComputationId_,
221  TfToken const & sourceComputationOutputName_)
222  : name(name_), sourceComputationId(sourceComputationId_)
223  , sourceComputationOutputName(sourceComputationOutputName_)
224  { }
225 
226  bool operator==(HdExtComputationInputDescriptor const& rhs) const {
227  return name == rhs.name &&
228  sourceComputationId == rhs.sourceComputationId &&
229  sourceComputationOutputName == rhs.sourceComputationOutputName;
230  }
231  bool operator!=(HdExtComputationInputDescriptor const& rhs) const {
232  return !(*this == rhs);
233  }
234 };
235 
236 typedef std::vector<HdExtComputationInputDescriptor>
237  HdExtComputationInputDescriptorVector;
238 
246  TfToken name;
247  HdTupleType valueType;
248 
251  TfToken const & name_,
252  HdTupleType const & valueType_)
253  : name(name_), valueType(valueType_)
254  { }
255 
256  bool operator==(HdExtComputationOutputDescriptor const& rhs) const {
257  return name == rhs.name &&
258  valueType == rhs.valueType;
259  }
260  bool operator!=(HdExtComputationOutputDescriptor const& rhs) const {
261  return !(*this == rhs);
262  }
263 };
264 
265 typedef std::vector<HdExtComputationOutputDescriptor>
266  HdExtComputationOutputDescriptorVector;
267 
273  TfToken fieldName;
274  TfToken fieldPrimType;
275  SdfPath fieldId;
276 
279  TfToken const & fieldName_,
280  TfToken const & fieldPrimType_,
281  SdfPath const & fieldId_)
282  : fieldName(fieldName_), fieldPrimType(fieldPrimType_), fieldId(fieldId_)
283  { }
284 };
285 
286 typedef std::vector<HdVolumeFieldDescriptor>
287  HdVolumeFieldDescriptorVector;
288 
294 public:
296  HD_API
297  HdSceneDelegate(HdRenderIndex *parentIndex,
298  SdfPath const& delegateID);
299 
300  HD_API
301  virtual ~HdSceneDelegate();
302 
304  HdRenderIndex& GetRenderIndex() { return *_index; }
305 
310  SdfPath const& GetDelegateID() const { return _delegateID; }
311 
313  HD_API
314  virtual void Sync(HdSyncRequestVector* request);
315 
318  HD_API
319  virtual void PostSyncCleanup();
320 
321  // -----------------------------------------------------------------------//
323  // -----------------------------------------------------------------------//
324 
326  HD_API
327  virtual bool IsEnabled(TfToken const& option) const;
328 
329 
330  // -----------------------------------------------------------------------//
332  // -----------------------------------------------------------------------//
333 
335  HD_API
336  virtual HdMeshTopology GetMeshTopology(SdfPath const& id);
337 
339  HD_API
341 
343  HD_API
344  virtual PxOsdSubdivTags GetSubdivTags(SdfPath const& id);
345 
346 
354  HD_API
355  virtual GfRange3d GetExtent(SdfPath const & id);
356 
358  HD_API
359  virtual GfMatrix4d GetTransform(SdfPath const & id);
360 
362  HD_API
363  virtual bool GetVisible(SdfPath const & id);
364 
366  HD_API
367  virtual bool GetDoubleSided(SdfPath const & id);
368 
370  HD_API
371  virtual HdCullStyle GetCullStyle(SdfPath const &id);
372 
374  HD_API
375  virtual VtValue GetShadingStyle(SdfPath const &id);
376 
381  HD_API
382  virtual HdDisplayStyle GetDisplayStyle(SdfPath const& id);
383 
385  HD_API
386  virtual VtValue Get(SdfPath const& id, TfToken const& key);
387 
389  HD_API
390  virtual HdReprSelector GetReprSelector(SdfPath const &id);
391 
394  HD_API
395  virtual TfToken GetRenderTag(SdfPath const& id);
396 
398  HD_API
399  virtual VtArray<TfToken> GetCategories(SdfPath const& id);
400 
402  HD_API
403  virtual std::vector<VtArray<TfToken>>
404  GetInstanceCategories(SdfPath const &instancerId);
405 
407  HD_API
408  virtual HdIdVectorSharedPtr GetCoordSysBindings(SdfPath const& id);
409 
410  // -----------------------------------------------------------------------//
412  // -----------------------------------------------------------------------//
413 
421  HD_API
422  virtual size_t
423  SampleTransform(SdfPath const & id,
424  size_t maxSampleCount,
425  float *sampleTimes,
426  GfMatrix4d *sampleValues);
427 
431  template <unsigned int CAPACITY>
432  void
435  size_t authoredSamples =
436  SampleTransform(id, CAPACITY, sa->times.data(), sa->values.data());
437  if (authoredSamples > CAPACITY) {
438  sa->Resize(authoredSamples);
439  size_t authoredSamplesSecondAttempt =
441  id,
442  authoredSamples,
443  sa->times.data(),
444  sa->values.data());
445  // Number of samples should be consisntent through multiple
446  // invokations of the sampling function.
447  TF_VERIFY(authoredSamples == authoredSamplesSecondAttempt);
448  }
449  sa->count = authoredSamples;
450  }
451 
459  HD_API
460  virtual size_t
461  SampleInstancerTransform(SdfPath const &instancerId,
462  size_t maxSampleCount,
463  float *sampleTimes,
464  GfMatrix4d *sampleValues);
465 
470  template <unsigned int CAPACITY>
471  void
472  SampleInstancerTransform(SdfPath const &instancerId,
474  size_t authoredSamples =
476  instancerId,
477  CAPACITY,
478  sa->times.data(),
479  sa->values.data());
480  if (authoredSamples > CAPACITY) {
481  sa->Resize(authoredSamples);
482  size_t authoredSamplesSecondAttempt =
484  instancerId,
485  authoredSamples,
486  sa->times.data(),
487  sa->values.data());
488  // Number of samples should be consisntent through multiple
489  // invokations of the sampling function.
490  TF_VERIFY(authoredSamples == authoredSamplesSecondAttempt);
491  }
492  sa->count = authoredSamples;
493  }
494 
512  HD_API
513  virtual size_t
514  SamplePrimvar(SdfPath const& id,
515  TfToken const& key,
516  size_t maxSampleCount,
517  float *sampleTimes,
518  VtValue *sampleValues);
519 
523  template <unsigned int CAPACITY>
524  void
525  SamplePrimvar(SdfPath const &id,
526  TfToken const& key,
528  size_t authoredSamples =
530  id,
531  key,
532  CAPACITY,
533  sa->times.data(),
534  sa->values.data());
535  if (authoredSamples > CAPACITY) {
536  sa->Resize(authoredSamples);
537  size_t authoredSamplesSecondAttempt =
539  id,
540  key,
541  authoredSamples,
542  sa->times.data(),
543  sa->values.data());
544  // Number of samples should be consisntent through multiple
545  // invokations of the sampling function.
546  TF_VERIFY(authoredSamples == authoredSamplesSecondAttempt);
547  }
548  sa->count = authoredSamples;
549  }
550 
551  // -----------------------------------------------------------------------//
553  // -----------------------------------------------------------------------//
554 
567  HD_API
568  virtual VtIntArray GetInstanceIndices(SdfPath const &instancerId,
569  SdfPath const &prototypeId);
570 
572  HD_API
573  virtual GfMatrix4d GetInstancerTransform(SdfPath const &instancerId);
574 
575  // -----------------------------------------------------------------------//
577  // -----------------------------------------------------------------------//
578 
582  HD_API
583  virtual SdfPath GetScenePrimPath(SdfPath const& rprimId,
584  int instanceIndex,
585  HdInstancerContext *instancerContext = nullptr);
586 
587  // -----------------------------------------------------------------------//
589  // -----------------------------------------------------------------------//
590 
592  HD_API
593  virtual SdfPath GetMaterialId(SdfPath const &rprimId);
594 
595  // Returns a material resource which contains the information
596  // needed to create a material.
597  HD_API
598  virtual VtValue GetMaterialResource(SdfPath const &materialId);
599 
600  // -----------------------------------------------------------------------//
602  // -----------------------------------------------------------------------//
603 
605  HD_API
606  virtual HdTextureResource::ID GetTextureResourceID(SdfPath const& textureId);
607 
609  HD_API
610  virtual HdTextureResourceSharedPtr GetTextureResource(SdfPath const& textureId);
611 
612  // -----------------------------------------------------------------------//
614  // -----------------------------------------------------------------------//
615 
617  HD_API
619 
620  // -----------------------------------------------------------------------//
622  // -----------------------------------------------------------------------//
623 
624  // Returns a single value for a given light and parameter.
625  HD_API
626  virtual VtValue GetLightParamValue(SdfPath const &id,
627  TfToken const &paramName);
628 
629  // -----------------------------------------------------------------------//
631  // -----------------------------------------------------------------------//
632 
635  HD_API
636  virtual VtValue GetCameraParamValue(SdfPath const& cameraId,
637  TfToken const& paramName);
638 
639  // -----------------------------------------------------------------------//
641  // -----------------------------------------------------------------------//
642 
643  HD_API
644  virtual HdVolumeFieldDescriptorVector
645  GetVolumeFieldDescriptors(SdfPath const &volumeId);
646 
647  // -----------------------------------------------------------------------//
649  // -----------------------------------------------------------------------//
650 
658  HD_API
659  virtual TfTokenVector
660  GetExtComputationSceneInputNames(SdfPath const& computationId);
661 
667  HD_API
668  virtual HdExtComputationInputDescriptorVector
669  GetExtComputationInputDescriptors(SdfPath const& computationId);
670 
675  HD_API
676  virtual HdExtComputationOutputDescriptorVector
677  GetExtComputationOutputDescriptors(SdfPath const& computationId);
678 
679 
687  HD_API
688  virtual HdExtComputationPrimvarDescriptorVector
690  HdInterpolation interpolationMode);
691 
694  HD_API
695  virtual VtValue GetExtComputationInput(SdfPath const& computationId,
696  TfToken const& input);
697 
701  HD_API
702  virtual std::string GetExtComputationKernel(SdfPath const& computationId);
703 
714  HD_API
715  virtual void InvokeExtComputation(SdfPath const& computationId,
716  HdExtComputationContext *context);
717 
718  // -----------------------------------------------------------------------//
720  // -----------------------------------------------------------------------//
721 
723  HD_API
724  virtual HdPrimvarDescriptorVector
725  GetPrimvarDescriptors(SdfPath const& id, HdInterpolation interpolation);
726 
727  // -----------------------------------------------------------------------//
729  // -----------------------------------------------------------------------//
730  HD_API
731  virtual TfTokenVector GetTaskRenderTags(SdfPath const& taskId);
732 
733 private:
734  HdRenderIndex *_index;
735  SdfPath _delegateID;
736 
737  HdSceneDelegate() = delete;
738  HdSceneDelegate(HdSceneDelegate &) = delete;
739  HdSceneDelegate &operator=(HdSceneDelegate &) = delete;
740 };
741 
742 
743 PXR_NAMESPACE_CLOSE_SCOPE
744 
745 #endif //PXR_IMAGING_HD_SCENE_DELEGATE_H
virtual HD_API bool IsEnabled(TfToken const &option) const
Returns true if the named option is enabled by the delegate.
Interface class that defines the execution environment for the client to run a computation.
Tags for non-hierarchial subdiv surfaces.
Definition: subdivTags.h:41
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:117
Basic type: 3-dimensional floating point range.
Definition: range3d.h:64
virtual HD_API void InvokeExtComputation(SdfPath const &computationId, HdExtComputationContext *context)
Requests the scene delegate run the ExtComputation with the given id.
virtual HD_API HdBasisCurvesTopology GetBasisCurvesTopology(SdfPath const &id)
Gets the topological curve data for a given prim.
Describes how the geometry of a prim should be displayed.
Definition: sceneDelegate.h:81
value_type * data()
Direct access to the underlying array.
Definition: smallVector.h:768
virtual HD_API VtValue GetShadingStyle(SdfPath const &id)
Returns the shading style for the given prim.
Describes an input to an ExtComputation that takes data from the output of another ExtComputation...
virtual HD_API VtValue Get(SdfPath const &id, TfToken const &key)
Returns a named value.
virtual HD_API TfTokenVector GetExtComputationSceneInputNames(SdfPath const &computationId)
For the given computation id, returns a list of inputs which will be requested from the scene delegat...
HdTupleType represents zero, one, or more values of the same HdType.
Definition: types.h:325
virtual HD_API SdfPath GetMaterialId(SdfPath const &rprimId)
Returns the material ID bound to the rprim rprimId.
virtual HD_API std::vector< VtArray< TfToken > > GetInstanceCategories(SdfPath const &instancerId)
Returns the categories for all instances in the instancer.
#define TF_CODING_ERROR(fmt, args)
Issue an internal programming error, but continue execution.
Definition: diagnostic.h:85
Describes the allocation structure of a render buffer bprim.
Definition: aov.h:84
bool flatShadingEnabled
Is the prim flat shaded.
Definition: sceneDelegate.h:86
Describes a primvar.
virtual HD_API GfMatrix4d GetInstancerTransform(SdfPath const &instancerId)
Returns the instancer transform.
TfToken name
Name of the primvar.
virtual HD_API bool GetDoubleSided(SdfPath const &id)
Returns the doubleSided state for the given prim.
virtual HD_API void PostSyncCleanup()
Opportunity for the delegate to clean itself up after performing parrellel work during sync phase...
virtual HD_API VtValue GetCameraParamValue(SdfPath const &cameraId, TfToken const &paramName)
Returns a single value for a given camera and parameter.
virtual HD_API GfMatrix4d GetTransform(SdfPath const &id)
Returns the object space transform, including all parent transforms.
virtual HD_API HdExtComputationOutputDescriptorVector GetExtComputationOutputDescriptors(SdfPath const &computationId)
For the given computation id, returns a list of computation output descriptors.
virtual HD_API HdIdVectorSharedPtr GetCoordSysBindings(SdfPath const &id)
Returns the coordinate system bindings, or a nullptr if none are bound.
virtual HD_API HdRenderBufferDescriptor GetRenderBufferDescriptor(SdfPath const &id)
Returns the allocation descriptor for a given render buffer prim.
void SampleInstancerTransform(SdfPath const &instancerId, HdTimeSampleArray< GfMatrix4d, CAPACITY > *sa)
Convenience form of SampleInstancerTransform() that takes an HdTimeSampleArray.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
virtual HD_API HdExtComputationPrimvarDescriptorVector GetExtComputationPrimvarDescriptors(SdfPath const &id, HdInterpolation interpolationMode)
Returns a list of primvar names that should be bound to a generated output from an ExtComputation for...
void Resize(unsigned int newSize)
Resize the internal buffers.
Describes an output of an ExtComputation.
HdDisplayStyle(int refineLevel_, bool flatShading=false, bool displacement=true)
Creates a DisplayStyle.
HdInterpolation interpolation
Interpolation (data-sampling rate) of the primvar.
Description of a single field related to a volume primitive.
virtual HD_API size_t SampleTransform(SdfPath const &id, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues)
Store up to maxSampleCount transform samples in *sampleValues.
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:88
#define TF_VERIFY(cond, format,...)
Checks a condition and reports an error if it evaluates false.
Definition: diagnostic.h:283
virtual HD_API size_t SamplePrimvar(SdfPath const &id, TfToken const &key, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues)
Store up to maxSampleCount primvar samples in *samplesValues.
virtual HD_API HdCullStyle GetCullStyle(SdfPath const &id)
Returns the cullstyle for the given prim.
void SamplePrimvar(SdfPath const &id, TfToken const &key, HdTimeSampleArray< VtValue, CAPACITY > *sa)
Convenience form of SamplePrimvar() that takes an HdTimeSampleArray.
Adapter class providing data exchange with the client scene graph.
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:446
void SampleTransform(SdfPath const &id, HdTimeSampleArray< GfMatrix4d, CAPACITY > *sa)
Convenience form of SampleTransform() that takes an HdTimeSampleArray.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:288
virtual HD_API VtValue GetExtComputationInput(SdfPath const &computationId, TfToken const &input)
Returns a single value for a given computation id and input token.
Topology data for basisCurves.
virtual HD_API void Sync(HdSyncRequestVector *request)
Synchronizes the delegate state for the given request vector.
virtual HD_API bool GetVisible(SdfPath const &id)
Returns the authored visible state of the prim.
int refineLevel
The prim refine level, in the range [0, 8].
Definition: sceneDelegate.h:83
HdDisplayStyle()
Creates a default DisplayStyle.
Definition: sceneDelegate.h:95
virtual HD_API HdExtComputationInputDescriptorVector GetExtComputationInputDescriptors(SdfPath const &computationId)
For the given computation id, returns a list of computation input descriptors.
virtual HD_API HdPrimvarDescriptorVector GetPrimvarDescriptors(SdfPath const &id, HdInterpolation interpolation)
Returns descriptors for all primvars of the given interpolation type.
virtual HD_API HdMeshTopology GetMeshTopology(SdfPath const &id)
Gets the topological mesh data for a given prim.
virtual HD_API GfRange3d GetExtent(SdfPath const &id)
Gets the axis aligned bounds of a prim.
virtual HD_API HdReprSelector GetReprSelector(SdfPath const &id)
Returns the authored repr (if any) for the given prim.
virtual HD_API HdTextureResource::ID GetTextureResourceID(SdfPath const &textureId)
Returns the texture resource ID for a given texture ID.
virtual HD_API HdTextureResourceSharedPtr GetTextureResource(SdfPath const &textureId)
Returns the texture resource for a given texture ID.
The SceneDelegate is requested to synchronize prims as the result of executing a specific render pass...
Definition: sceneDelegate.h:69
virtual HD_API PxOsdSubdivTags GetSubdivTags(SdfPath const &id)
Gets the subdivision surface tags (sharpness, holes, etc).
virtual HD_API TfToken GetRenderTag(SdfPath const &id)
Returns the render tag that will be used to bucket prims during render pass bucketing.
Describes one or more authored display representations for an rprim.
Definition: repr.h:48
virtual HD_API VtIntArray GetInstanceIndices(SdfPath const &instancerId, SdfPath const &prototypeId)
Gets the extracted indices array of the prototype id used in the instancer.
virtual HD_API size_t SampleInstancerTransform(SdfPath const &instancerId, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues)
Store up to maxSampleCount transform samples in *sampleValues.
An array of a value sampled over time, in struct-of-arrays layout.
Extends HdPrimvarDescriptor to describe a primvar that takes data from the output of an ExtComputatio...
virtual HD_API HdDisplayStyle GetDisplayStyle(SdfPath const &id)
Returns the refinement level for the given prim in the range [0,8].
bool displacementEnabled
Is the prim displacement shaded.
Definition: sceneDelegate.h:89
virtual HD_API std::string GetExtComputationKernel(SdfPath const &computationId)
Returns the kernel source assigned to the computation at the path id.
TfToken role
Optional &quot;role&quot; indicating a desired interpretation – for example, to distinguish color/vector/point/...
Topology data for meshes.
Definition: meshTopology.h:55
SdfPath const & GetDelegateID() const
Returns the ID of this delegate, which is used as a prefix for all objects it creates in the RenderIn...
HdRenderIndex & GetRenderIndex()
Returns the RenderIndex owned by this delegate.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:174
virtual HD_API SdfPath GetScenePrimPath(SdfPath const &rprimId, int instanceIndex, HdInstancerContext *instancerContext=nullptr)
Returns the scene address of the prim corresponding to the given rprim/instance index.
virtual HD_API VtArray< TfToken > GetCategories(SdfPath const &id)
Returns the prim categories.