HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdPrimGather Class Referencefinal

#include <primGather.h>

Public Types

typedef bool(* FilterPredicateFn )(const SdfPath &path, const void *param)
 

Public Member Functions

 HdPrimGather ()=default
 
 ~HdPrimGather ()=default
 
HD_API void Filter (const SdfPathVector &paths, const SdfPathVector &includePaths, const SdfPathVector &excludePaths, SdfPathVector *results)
 
HD_API void PredicatedFilter (const SdfPathVector &paths, const SdfPathVector &includePaths, const SdfPathVector &excludePaths, FilterPredicateFn predicateFn, void *predicateParam, SdfPathVector *results)
 
HD_API void Subtree (const SdfPathVector &paths, const SdfPath &rootPath, SdfPathVector *results)
 
HD_API bool SubtreeAsRange (const SdfPathVector &paths, const SdfPath &rootPath, size_t *start, size_t *end)
 

Detailed Description

Definition at line 38 of file primGather.h.

Member Typedef Documentation

typedef bool(* HdPrimGather::FilterPredicateFn)(const SdfPath &path, const void *param)

Definition at line 40 of file primGather.h.

Constructor & Destructor Documentation

HdPrimGather::HdPrimGather ( )
default
HdPrimGather::~HdPrimGather ( )
default

Member Function Documentation

HD_API void HdPrimGather::Filter ( const SdfPathVector paths,
const SdfPathVector includePaths,
const SdfPathVector excludePaths,
SdfPathVector results 
)

Filter takes a list of paths and returns a list of paths that match the following criteria:

  • A path is prefixed by at least one include path
  • A path is not prefixed by an exclude path that has more elements than the include path with the most element that is a prefix of the path.

The list of paths to filter must be pre-sorted with ordering defined by std::less<SdfPath &>.

The list of include and exclude paths do not need to be pre-sorted.

If the same path appears in the list of include and exclude paths results are undefined.

The resulting set of paths are stored in results arg, the results might not be in sorted order.

HD_API void HdPrimGather::PredicatedFilter ( const SdfPathVector paths,
const SdfPathVector includePaths,
const SdfPathVector excludePaths,
FilterPredicateFn  predicateFn,
void predicateParam,
SdfPathVector results 
)

PredicatedFilter takes a list of paths and returns a list of paths that match the following criteria:

  • A path is prefixed by at least one include path
  • A path is not prefixed by an exclude path that has more elements than the include path with the most element that is a prefix of the path.
  • The predicate function for the path returns true.

The list of paths to filter must be pre-sorted with ordering defined by std::less<SdfPath &>.

The list of include and exclude paths do not need to be pre-sorted.

If the same path appears in the list of include and exclude paths results are undefined.

The predicate function has the prototype: bool Predicate(const SdfPath &path, void *param);

The function should return true if the path should appear in the results and false if not. The Predicate function may be called on worker threads and as such must be thread-safe.

The resulting set of paths are stored in results arg, the results might not be in sorted order.

HD_API void HdPrimGather::Subtree ( const SdfPathVector paths,
const SdfPath rootPath,
SdfPathVector results 
)

Subtree is a simplified form of filter, that gathers all prims that meet the single rootPath prefix condition.

The list of paths to filter must be pre-sorted with ordering defined by std::less<SdfPath &>.

The returned result maintain the sorted order.

HD_API bool HdPrimGather::SubtreeAsRange ( const SdfPathVector paths,
const SdfPath rootPath,
size_t *  start,
size_t *  end 
)

Subtree is a simplified form of filter, that gathers all prims that meet the single rootPath prefix condition.

The list of paths to filter must be pre-sorted with ordering defined by std::less<SdfPath &>.

Rather than returning a list the paths, it instead returns the start and end (inclusive) indexes into the paths vector of that subtree range.

If the rootPath wasn't found or an error occurred, that otherwise produces an invalid range. The method returns false.


The documentation for this class was generated from the following file: