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 HD_SCENE_DELEGATE_H
25 #define 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/materialParam.h"
35 #include "pxr/imaging/hd/meshTopology.h"
36 #include "pxr/imaging/hd/renderIndex.h"
37 #include "pxr/imaging/hd/repr.h"
38 #include "pxr/imaging/hd/textureResource.h"
39 #include "pxr/imaging/hd/timeSampleArray.h"
40 
41 #include "pxr/imaging/pxOsd/subdivTags.h"
42 
43 #include "pxr/base/vt/array.h"
44 #include "pxr/base/vt/dictionary.h"
45 #include "pxr/base/vt/value.h"
46 #include "pxr/usd/sdf/path.h"
47 
48 #include "pxr/base/gf/vec2i.h"
49 #include "pxr/base/tf/hash.h"
50 
51 #include <boost/shared_ptr.hpp>
52 #include <vector>
53 
54 PXR_NAMESPACE_OPEN_SCOPE
55 
57 
59 typedef std::shared_ptr<SdfPathVector> HdIdVectorSharedPtr;
60 
68  // The Prims to synchronize in this request.
69  SdfPathVector IDs;
70 
71  // The HdChangeTracker::DirtyBits that are set for each Prim.
72  std::vector<HdDirtyBits> dirtyBits;
73 };
74 
82 
85 
88 
94  : refineLevel(0)
95  , flatShadingEnabled(false)
96  , displacementEnabled(true)
97  { }
98 
104  HdDisplayStyle(int refineLevel_,
105  bool flatShading = false,
106  bool displacement = true)
107  : refineLevel(std::max(0, refineLevel_))
108  , flatShadingEnabled(flatShading)
109  , displacementEnabled(displacement)
110  {
111  if (refineLevel_ < 0) {
112  TF_CODING_ERROR("negative refine level is not supported");
113  } else if (refineLevel_ > 8) {
114  TF_CODING_ERROR("refine level > 8 is not supported");
115  }
116  }
117 
118  HdDisplayStyle(HdDisplayStyle const& rhs) = default;
119  ~HdDisplayStyle() = default;
120 
121  bool operator==(HdDisplayStyle const& rhs) const {
122  return refineLevel == rhs.refineLevel
125  }
126  bool operator!=(HdDisplayStyle const& rhs) const {
127  return !(*this == rhs);
128  }
129 };
130 
138  HdInterpolation interpolation;
143 
145  HdPrimvarDescriptor(TfToken const& name_,
146  HdInterpolation interp_,
147  TfToken const& role_=HdPrimvarRoleTokens->none)
148  : name(name_), interpolation(interp_), role(role_)
149  { }
150  bool operator==(HdPrimvarDescriptor const& rhs) const {
151  return name == rhs.name && role == rhs.role
152  && interpolation == rhs.interpolation;
153  }
154  bool operator!=(HdPrimvarDescriptor const& rhs) const {
155  return !(*this == rhs);
156  }
157 };
158 
159 typedef std::vector<HdPrimvarDescriptor> HdPrimvarDescriptorVector;
160 
171  SdfPath sourceComputationId;
172  TfToken sourceComputationOutputName;
173  HdTupleType valueType;
174 
177  TfToken const& name_,
178  HdInterpolation interp_,
179  TfToken const & role_,
180  SdfPath const & sourceComputationId_,
181  TfToken const & sourceComputationOutputName_,
182  HdTupleType const & valueType_)
183  : HdPrimvarDescriptor(name_, interp_, role_)
184  , sourceComputationId(sourceComputationId_)
185  , sourceComputationOutputName(sourceComputationOutputName_)
186  , valueType(valueType_)
187  { }
188  bool operator==(HdExtComputationPrimvarDescriptor const& rhs) const {
189  return HdPrimvarDescriptor::operator==(rhs) &&
190  sourceComputationId == rhs.sourceComputationId &&
191  sourceComputationOutputName == rhs.sourceComputationOutputName &&
192  valueType == rhs.valueType;
193  }
194  bool operator!=(HdExtComputationPrimvarDescriptor const& rhs) const {
195  return !(*this == rhs);
196  }
197 };
198 
199 typedef std::vector<HdExtComputationPrimvarDescriptor>
200  HdExtComputationPrimvarDescriptorVector;
201 
211  TfToken name;
212  SdfPath sourceComputationId;
213  TfToken sourceComputationOutputName;
214 
217  TfToken const & name_,
218  SdfPath const & sourceComputationId_,
219  TfToken const & sourceComputationOutputName_)
220  : name(name_), sourceComputationId(sourceComputationId_)
221  , sourceComputationOutputName(sourceComputationOutputName_)
222  { }
223 
224  bool operator==(HdExtComputationInputDescriptor const& rhs) const {
225  return name == rhs.name &&
226  sourceComputationId == rhs.sourceComputationId &&
227  sourceComputationOutputName == rhs.sourceComputationOutputName;
228  }
229  bool operator!=(HdExtComputationInputDescriptor const& rhs) const {
230  return !(*this == rhs);
231  }
232 };
233 
234 typedef std::vector<HdExtComputationInputDescriptor>
235  HdExtComputationInputDescriptorVector;
236 
244  TfToken name;
245  HdTupleType valueType;
246 
249  TfToken const & name_,
250  HdTupleType const & valueType_)
251  : name(name_), valueType(valueType_)
252  { }
253 
254  bool operator==(HdExtComputationOutputDescriptor const& rhs) const {
255  return name == rhs.name &&
256  valueType == rhs.valueType;
257  }
258  bool operator!=(HdExtComputationOutputDescriptor const& rhs) const {
259  return !(*this == rhs);
260  }
261 };
262 
263 typedef std::vector<HdExtComputationOutputDescriptor>
264  HdExtComputationOutputDescriptorVector;
265 
271  TfToken fieldName;
272  TfToken fieldPrimType;
273  SdfPath fieldId;
274 
277  TfToken const & fieldName_,
278  TfToken const & fieldPrimType_,
279  SdfPath const & fieldId_)
280  : fieldName(fieldName_), fieldPrimType(fieldPrimType_), fieldId(fieldId_)
281  { }
282 };
283 
284 typedef std::vector<HdVolumeFieldDescriptor>
285  HdVolumeFieldDescriptorVector;
286 
292 public:
294  HD_API
295  HdSceneDelegate(HdRenderIndex *parentIndex,
296  SdfPath const& delegateID);
297 
298  HD_API
299  virtual ~HdSceneDelegate();
300 
302  HdRenderIndex& GetRenderIndex() { return *_index; }
303 
308  SdfPath const& GetDelegateID() const { return _delegateID; }
309 
311  HD_API
312  virtual void Sync(HdSyncRequestVector* request);
313 
316  HD_API
317  virtual void PostSyncCleanup();
318 
319  // -----------------------------------------------------------------------//
321  // -----------------------------------------------------------------------//
322 
324  HD_API
325  virtual bool IsEnabled(TfToken const& option) const;
326 
327 
328  // -----------------------------------------------------------------------//
330  // -----------------------------------------------------------------------//
331 
333  HD_API
334  virtual HdMeshTopology GetMeshTopology(SdfPath const& id);
335 
337  HD_API
339 
341  HD_API
342  virtual PxOsdSubdivTags GetSubdivTags(SdfPath const& id);
343 
344 
352  HD_API
353  virtual GfRange3d GetExtent(SdfPath const & id);
354 
356  HD_API
357  virtual GfMatrix4d GetTransform(SdfPath const & id);
358 
360  HD_API
361  virtual bool GetVisible(SdfPath const & id);
362 
364  HD_API
365  virtual bool GetDoubleSided(SdfPath const & id);
366 
368  HD_API
369  virtual HdCullStyle GetCullStyle(SdfPath const &id);
370 
372  HD_API
373  virtual VtValue GetShadingStyle(SdfPath const &id);
374 
379  HD_API
380  virtual HdDisplayStyle GetDisplayStyle(SdfPath const& id);
381 
383  HD_API
384  virtual VtValue Get(SdfPath const& id, TfToken const& key);
385 
387  HD_API
388  virtual HdReprSelector GetReprSelector(SdfPath const &id);
389 
392  HD_API
393  virtual TfToken GetRenderTag(SdfPath const& id);
394 
396  HD_API
397  virtual VtArray<TfToken> GetCategories(SdfPath const& id);
398 
400  HD_API
401  virtual std::vector<VtArray<TfToken>>
402  GetInstanceCategories(SdfPath const &instancerId);
403 
405  HD_API
406  virtual HdIdVectorSharedPtr GetCoordSysBindings(SdfPath const& id);
407 
408  // -----------------------------------------------------------------------//
410  // -----------------------------------------------------------------------//
411 
419  HD_API
420  virtual size_t
421  SampleTransform(SdfPath const & id,
422  size_t maxSampleCount,
423  float *sampleTimes,
424  GfMatrix4d *sampleValues);
425 
429  template <unsigned int CAPACITY>
430  void
433  size_t authoredSamples =
434  SampleTransform(id, CAPACITY, sa->times.data(), sa->values.data());
435  if (authoredSamples > CAPACITY) {
436  sa->Resize(authoredSamples);
437  size_t authoredSamplesSecondAttempt =
439  id,
440  authoredSamples,
441  sa->times.data(),
442  sa->values.data());
443  // Number of samples should be consisntent through multiple
444  // invokations of the sampling function.
445  TF_VERIFY(authoredSamples == authoredSamplesSecondAttempt);
446  }
447  sa->count = authoredSamples;
448  }
449 
457  HD_API
458  virtual size_t
459  SampleInstancerTransform(SdfPath const &instancerId,
460  size_t maxSampleCount,
461  float *sampleTimes,
462  GfMatrix4d *sampleValues);
463 
468  template <unsigned int CAPACITY>
469  void
470  SampleInstancerTransform(SdfPath const &instancerId,
472  size_t authoredSamples =
474  instancerId,
475  CAPACITY,
476  sa->times.data(),
477  sa->values.data());
478  if (authoredSamples > CAPACITY) {
479  sa->Resize(authoredSamples);
480  size_t authoredSamplesSecondAttempt =
482  instancerId,
483  authoredSamples,
484  sa->times.data(),
485  sa->values.data());
486  // Number of samples should be consisntent through multiple
487  // invokations of the sampling function.
488  TF_VERIFY(authoredSamples == authoredSamplesSecondAttempt);
489  }
490  sa->count = authoredSamples;
491  }
492 
510  HD_API
511  virtual size_t
512  SamplePrimvar(SdfPath const& id,
513  TfToken const& key,
514  size_t maxSampleCount,
515  float *sampleTimes,
516  VtValue *sampleValues);
517 
521  template <unsigned int CAPACITY>
522  void
523  SamplePrimvar(SdfPath const &id,
524  TfToken const& key,
526  size_t authoredSamples =
528  id,
529  key,
530  CAPACITY,
531  sa->times.data(),
532  sa->values.data());
533  if (authoredSamples > CAPACITY) {
534  sa->Resize(authoredSamples);
535  size_t authoredSamplesSecondAttempt =
537  id,
538  key,
539  authoredSamples,
540  sa->times.data(),
541  sa->values.data());
542  // Number of samples should be consisntent through multiple
543  // invokations of the sampling function.
544  TF_VERIFY(authoredSamples == authoredSamplesSecondAttempt);
545  }
546  sa->count = authoredSamples;
547  }
548 
549  // -----------------------------------------------------------------------//
551  // -----------------------------------------------------------------------//
552 
565  HD_API
566  virtual VtIntArray GetInstanceIndices(SdfPath const &instancerId,
567  SdfPath const &prototypeId);
568 
570  HD_API
571  virtual GfMatrix4d GetInstancerTransform(SdfPath const &instancerId);
572 
573 
632  HD_API
633  virtual SdfPath GetPathForInstanceIndex(const SdfPath &protoRprimId,
634  int protoIndex,
635  int *instancerIndex,
636  SdfPath *masterCachePath=NULL,
637  SdfPathVector *instanceContext=NULL);
638 
639  // -----------------------------------------------------------------------//
641  // -----------------------------------------------------------------------//
642 
644  HD_API
645  virtual SdfPath GetMaterialId(SdfPath const &rprimId);
646 
648  HD_API
649  virtual std::string GetSurfaceShaderSource(SdfPath const &materialId);
650 
652  HD_API
653  virtual std::string GetDisplacementShaderSource(SdfPath const &materialId);
654 
656  HD_API
657  virtual VtValue GetMaterialParamValue(SdfPath const &materialId,
658  TfToken const &paramName);
659 
661  HD_API
662  virtual HdMaterialParamVector GetMaterialParams(SdfPath const& materialId);
663 
664  // Returns a material resource which contains the information
665  // needed to create a material.
666  HD_API
667  virtual VtValue GetMaterialResource(SdfPath const &materialId);
668 
669  // Returns the metadata dictionary for the given material ID.
670  HD_API
671  virtual VtDictionary GetMaterialMetadata(SdfPath const &materialId);
672 
673  // -----------------------------------------------------------------------//
675  // -----------------------------------------------------------------------//
676 
678  HD_API
679  virtual HdTextureResource::ID GetTextureResourceID(SdfPath const& textureId);
680 
682  HD_API
683  virtual HdTextureResourceSharedPtr GetTextureResource(SdfPath const& textureId);
684 
685  // -----------------------------------------------------------------------//
687  // -----------------------------------------------------------------------//
688 
690  HD_API
692 
693  // -----------------------------------------------------------------------//
695  // -----------------------------------------------------------------------//
696 
697  // Returns a single value for a given light and parameter.
698  HD_API
699  virtual VtValue GetLightParamValue(SdfPath const &id,
700  TfToken const &paramName);
701 
702  // -----------------------------------------------------------------------//
704  // -----------------------------------------------------------------------//
705 
708  HD_API
709  virtual VtValue GetCameraParamValue(SdfPath const& cameraId,
710  TfToken const& paramName);
711 
712  // -----------------------------------------------------------------------//
714  // -----------------------------------------------------------------------//
715 
716  HD_API
717  virtual HdVolumeFieldDescriptorVector
718  GetVolumeFieldDescriptors(SdfPath const &volumeId);
719 
720  // -----------------------------------------------------------------------//
722  // -----------------------------------------------------------------------//
723 
731  HD_API
732  virtual TfTokenVector
733  GetExtComputationSceneInputNames(SdfPath const& computationId);
734 
740  HD_API
741  virtual HdExtComputationInputDescriptorVector
742  GetExtComputationInputDescriptors(SdfPath const& computationId);
743 
748  HD_API
749  virtual HdExtComputationOutputDescriptorVector
750  GetExtComputationOutputDescriptors(SdfPath const& computationId);
751 
752 
760  HD_API
761  virtual HdExtComputationPrimvarDescriptorVector
763  HdInterpolation interpolationMode);
764 
767  HD_API
768  virtual VtValue GetExtComputationInput(SdfPath const& computationId,
769  TfToken const& input);
770 
774  HD_API
775  virtual std::string GetExtComputationKernel(SdfPath const& computationId);
776 
787  HD_API
788  virtual void InvokeExtComputation(SdfPath const& computationId,
789  HdExtComputationContext *context);
790 
791  // -----------------------------------------------------------------------//
793  // -----------------------------------------------------------------------//
794 
796  HD_API
797  virtual HdPrimvarDescriptorVector
798  GetPrimvarDescriptors(SdfPath const& id, HdInterpolation interpolation);
799 
800  // -----------------------------------------------------------------------//
802  // -----------------------------------------------------------------------//
803  HD_API
804  virtual TfTokenVector GetTaskRenderTags(SdfPath const& taskId);
805 
806 private:
807  HdRenderIndex *_index;
808  SdfPath _delegateID;
809 
810  HdSceneDelegate() = delete;
811  HdSceneDelegate(HdSceneDelegate &) = delete;
812  HdSceneDelegate &operator=(HdSceneDelegate &) = delete;
813 };
814 
815 
816 PXR_NAMESPACE_CLOSE_SCOPE
817 
818 #endif //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:119
virtual HD_API std::string GetSurfaceShaderSource(SdfPath const &materialId)
Returns the surface shader source code for the given material ID.
Basic type: 3-dimensional floating point range.
Definition: range3d.h:64
virtual HD_API HdMaterialParamVector GetMaterialParams(SdfPath const &materialId)
Returns the material params for the given material ID.
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:79
value_type * data()
Direct access to the underlying array.
Definition: smallVector.h:746
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:239
virtual HD_API SdfPath GetMaterialId(SdfPath const &rprimId)
Returns the material ID bound to the rprim rprimId.
A map with string keys and VtValue values.
Definition: dictionary.h:61
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:87
Describes the allocation structure of a render buffer bprim.
Definition: aov.h:84
bool flatShadingEnabled
Is the prim flat shaded.
Definition: sceneDelegate.h:84
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:89
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:289
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.
virtual HD_API std::string GetDisplacementShaderSource(SdfPath const &materialId)
Returns the displacement shader source code for the given material ID.
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:438
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:287
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:81
HdDisplayStyle()
Creates a default DisplayStyle.
Definition: sceneDelegate.h:93
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 SdfPath GetPathForInstanceIndex(const SdfPath &protoRprimId, int protoIndex, int *instancerIndex, SdfPath *masterCachePath=NULL, SdfPathVector *instanceContext=NULL)
Resolves a protoRprimId and protoIndex back to original instancer path by backtracking nested instanc...
virtual HD_API VtValue GetMaterialParamValue(SdfPath const &materialId, TfToken const &paramName)
Returns a single value for the given material and named parameter.
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:67
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:87
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:182
virtual HD_API VtArray< TfToken > GetCategories(SdfPath const &id)
Returns the prim categories.