24 #ifndef PXR_IMAGING_HD_RPRIM_H
25 #define PXR_IMAGING_HD_RPRIM_H
299 using _ReprVector = std::vector<std::pair<TfToken, HdReprSharedPtr>>;
305 bool operator() (
const std::pair<TfToken, HdReprSharedPtr> &e)
const {
306 return _name == e.first;
318 template<
typename DESC_TYPE,
int N=1>
327 if (it->first == reprToken)
return it->second;
334 if (config.first == reprToken) {
336 config.second = descs;
340 _configs.push_back(std::make_pair(reprToken, descs));
342 std::vector<std::pair<TfToken, DescArray> >
_configs;
373 return delegate->
Get(
GetId(), name);
385 #endif //PXR_IMAGING_HD_RPRIM_H
bool IsVisible() const
Is the prim itself visible.
SdfPath const & GetInstancerId() const
GLsizei GLenum const void * indices
virtual HD_API VtValue GetIndexedPrimvar(SdfPath const &id, TfToken const &key, VtIntArray *outIndices)
HD_API const HdRepr::DrawItemUniquePtrVector & GetDrawItems(TfToken const &reprToken) const
virtual void _InitRepr(TfToken const &reprToken, HdDirtyBits *dirtyBits)=0
DescArray Find(TfToken const &reprToken) const
virtual HD_API TfTokenVector const & GetBuiltinPrimvarNames() const =0
std::shared_ptr< HdRepr > HdReprSharedPtr
std::vector< std::pair< TfToken, DescArray > > _configs
SdfPath const & GetMaterialId() const
TfToken const & GetRenderTag() const
HD_API void _UpdateInstancer(HdSceneDelegate *sceneDelegate, HdDirtyBits *dirtyBits)
HD_API HdReprSharedPtr const & _GetRepr(TfToken const &reprToken) const
int32_t GetPrimId() const
Return the unique instance id.
HD_API void SetPrimId(int32_t primId)
Set the unique instance id.
static const int MAX_DESCS
virtual HdDirtyBits GetInitialDirtyBitsMask() const =0
HdRprimSharedData _sharedData
bool operator()(const std::pair< TfToken, HdReprSharedPtr > &e) const
HdPrimvarDescriptorVector GetPrimvarDescriptors(HdSceneDelegate *delegate, HdInterpolation interpolation) const
Primvar Query.
VtValue GetPrimvar(HdSceneDelegate *delegate, const TfToken &name) const
HD_API HdRprim(SdfPath const &id)
virtual void Sync(HdSceneDelegate *delegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits, TfToken const &reprToken)=0
virtual HD_API HdPrimvarDescriptorVector GetPrimvarDescriptors(SdfPath const &id, HdInterpolation interpolation)
Returns descriptors for all primvars of the given interpolation type.
std::vector< TfToken > TfTokenVector
Convenience types.
virtual HD_API GfRange3d GetExtent(SdfPath const &id)
virtual HD_API TfToken GetRenderTag(SdfPath const &id)
GLuint const GLchar * name
std::vector< std::pair< TfToken, HdReprSharedPtr >> _ReprVector
char const * GetText() const
HdReprSelector _authoredReprSelector
HD_API bool IsDirty(HdChangeTracker &changeTracker) const
Returns true if any dirty flags are set for this rprim.
virtual HdDirtyBits _PropagateDirtyBits(HdDirtyBits bits) const =0
virtual HD_API void Finalize(HdRenderParam *renderParam)
virtual HD_API VtValue Get(SdfPath const &id, TfToken const &key)
Returns a named value.
std::vector< DrawItemUniquePtr > DrawItemUniquePtrVector
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
VtValue GetIndexedPrimvar(HdSceneDelegate *delegate, const TfToken &name, VtIntArray *indices) const
SdfPath const & GetId() const
_ReprComparator(TfToken const &name)
HdReprSelector const & GetReprSelector() const
std::array< DESC_TYPE, N > DescArray
HD_API void SetMaterialId(SdfPath const &materialId)
Sets a new material binding to be used by this rprim.
HD_API void _UpdateVisibility(HdSceneDelegate *sceneDelegate, HdDirtyBits *dirtyBits)
virtual HD_API void UpdateRenderTag(HdSceneDelegate *delegate, HdRenderParam *renderParam)
#define PXR_NAMESPACE_CLOSE_SCOPE
GA_API const UT_StringHolder N
void AddOrUpdate(TfToken const &reprToken, DescArray descs)
#define TF_FOR_ALL(iter, c)
HD_API void UpdateReprSelector(HdSceneDelegate *delegate, HdDirtyBits *dirtyBits)
std::vector< HdPrimvarDescriptor > HdPrimvarDescriptorVector
HD_API void InitRepr(HdSceneDelegate *delegate, TfToken const &reprToken, HdDirtyBits *dirtyBits)
virtual HD_API ~HdRprim()
HD_API VtMatrix4dArray GetInstancerTransforms(HdSceneDelegate *delegate)
HD_API bool CanSkipDirtyBitPropagationAndSync(HdDirtyBits bits) const
GfRange3d GetExtent(HdSceneDelegate *delegate) const
Returns the bounds of the rprim in local, untransformed space.
HD_API HdDirtyBits PropagateRprimDirtyBits(HdDirtyBits bits)