HDK
|
#include <rprimCollection.h>
Classes | |
struct | Hash |
Friends | |
template<class HashState > | |
void | TfHashAppend (HashState &h, HdRprimCollection const &rc) |
HD_API friend std::ostream & | operator<< (std::ostream &out, HdRprimCollection const &v) |
A named, semantic collection of objects.
Note that the collection object itself doesn't hold HdRprim objects, rather it acts as an addressing mechanism to identify a specific group of HdRprim objects that can be requested from the HdRenderIndex.
HdDirtyList provides the above algorithmic functionality, while HdRenderPass uses HdRprimCollection to concisely represent the HdRprim's it operates on.
Definition at line 54 of file rprimCollection.h.
HD_API HdRprimCollection::HdRprimCollection | ( | ) |
HD_API HdRprimCollection::HdRprimCollection | ( | TfToken const & | name, |
HdReprSelector const & | reprSelector, | ||
bool | forcedRepr = false , |
||
TfToken const & | materialTag = TfToken() |
||
) |
Constructs an rprim collection with reprSelector
. if
forcedRepr is set to true, prims authored repr will be ignored. If materialTag
is provided, only prims who's material have a matching tag will end up in the collection. This can be used to make seperate collections for e.g. opaque vs translucent prims. An empty materialTag opts-out of using material tags entirely and will return all prims in the collection, regardless of their material tags.
HD_API HdRprimCollection::HdRprimCollection | ( | TfToken const & | name, |
HdReprSelector const & | reprSelector, | ||
SdfPath const & | rootPath, | ||
bool | forcedRepr = false , |
||
TfToken const & | materialTag = TfToken() |
||
) |
Constructs an rprim collection, excluding all Rprims not prefixed by rootPath
. if
forcedRepr is set to true, prims authored repr will be ignored. If materialTag
is provided, only prims who's material have a matching tag will end up in the collection. This can be used to make seperate collections for e.g. opaque vs translucent prims. An empty materialTag opts-out of using material tags entirely and will return all prims in the collection, regardless of their material tags.
HD_API HdRprimCollection::HdRprimCollection | ( | HdRprimCollection const & | col | ) |
Copy constructor.
|
virtual |
HD_API size_t HdRprimCollection::ComputeHash | ( | ) | const |
HD_API HdRprimCollection HdRprimCollection::CreateInverseCollection | ( | ) | const |
Constructs and returns a collection with the root and exclude paths swapped.
HD_API SdfPathVector const& HdRprimCollection::GetExcludePaths | ( | ) | const |
Returns the excluded paths
Note that this vector is always sorted.
|
inline |
Returns the semantic name of this collection.
The semantic name represents the entire collection of prims, for example "visible", "selected", etc.
Definition at line 104 of file rprimCollection.h.
|
inline |
Returns the representation name.
The repr selector corresponds to specific aspects of the requested set of Rprims, for example one can request "hullAndPoints" repr which would cause both the hull and points representations of all prims named by the collection to be included.
Definition at line 119 of file rprimCollection.h.
HD_API SdfPathVector const& HdRprimCollection::GetRootPaths | ( | ) | const |
Returns the paths at which all Rprims must be rooted to be included in this collection. Defaults to a vector containing only SdfPath::AbsoluteRootPath().
Note that this vector is always sorted.
|
inline |
Definition at line 127 of file rprimCollection.h.
HD_API bool HdRprimCollection::operator!= | ( | HdRprimCollection const & | lhs | ) | const |
HD_API bool HdRprimCollection::operator== | ( | HdRprimCollection const & | lhs | ) | const |
HD_API void HdRprimCollection::SetExcludePaths | ( | SdfPathVector const & | excludePaths | ) |
Sets all exclude paths for this collection. All paths must be absolute. Duplicate paths are allowed, but may result in performance degradation.
|
inline |
Definition at line 131 of file rprimCollection.h.
A MaterialTag can be used to ensure only prims whos material have a matching tag will end up in the collection. Different rendering backends can control what material properties are useful for splitting up collections. For example, when Storm finds the 'translucent' MaterialTag in a material it will transfer this tag onto the prim's DrawItem. This ensures that opaque and translucent prims end up in different collections so they can be rendered seperately. A path-tracer backend may find the translucent MaterialTag on a material and choose NOT to transfer the tag onto the DrawItem because the backend wants to render opaque and translucent prims in the same collection.
Sets the semantic name of this collection.
Definition at line 109 of file rprimCollection.h.
|
inline |
Definition at line 123 of file rprimCollection.h.
Sets the path at which all Rprims must be rooted to be included in this collection, replacing any existing root paths that were previously specified.
HD_API void HdRprimCollection::SetRootPaths | ( | SdfPathVector const & | rootPaths | ) |
Sets all root paths for this collection, replacing any existing paths that were present previously. All paths must be absolute. Duplicate paths are allowed, but may result in performance degradation.
|
friend |
|
friend |
Definition at line 194 of file rprimCollection.h.