HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bboxCache.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_USD_GEOM_BBOX_CACHE_H
8 #define PXR_USD_USD_GEOM_BBOX_CACHE_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/usd/usdGeom/api.h"
15 #include "pxr/base/gf/bbox3d.h"
16 #include "pxr/base/tf/hash.h"
17 #include "pxr/base/tf/hashmap.h"
19 
20 #include <optional>
21 
23 
24 
25 class UsdGeomModelAPI;
26 
27 /// \class UsdGeomBBoxCache
28 ///
29 /// Caches bounds by recursively computing and aggregating bounds of children in
30 /// world space and aggregating the result back into local space.
31 ///
32 /// The cache is configured for a specific time and
33 /// \ref UsdGeomImageable::GetPurposeAttr() set of purposes. When querying a
34 /// bound, transforms and extents are read either from the time specified or
35 /// UsdTimeCode::Default(), following \ref Usd_ValueResolution standard
36 /// time-sample value resolution. As noted in SetIncludedPurposes(), changing
37 /// the included purposes does not invalidate the cache, because we cache
38 /// purpose along with the geometric data.
39 ///
40 /// Child prims that are invisible at the requested time are excluded when
41 /// computing a prim's bounds. However, if a bound is requested directly for an
42 /// excluded prim, it will be computed. Additionally, only prims deriving from
43 /// UsdGeomImageable are included in child bounds computations.
44 ///
45 /// Unlike standard UsdStage traversals, the traversal performed by the
46 /// UsdGeomBBoxCache includes prims that are unloaded (see UsdPrim::IsLoaded()).
47 /// This makes it possible to fetch bounds for a UsdStage that has been opened
48 /// without \em forcePopulate , provided the unloaded model prims have authored
49 /// extent hints (see UsdGeomModelAPI::GetExtentsHint()).
50 ///
51 /// This class is optimized for computing tight <b>untransformed "object"
52 /// space</b> bounds for component-models. In the absence of component models,
53 /// bounds are optimized for world-space, since there is no other easily
54 /// identifiable space for which to optimize, and we cannot optimize for every
55 /// prim's local space without performing quadratic work.
56 ///
57 /// The TfDebug flag, USDGEOM_BBOX, is provided for debugging.
58 ///
59 /// Warnings:
60 /// * This class should only be used with valid UsdPrim objects.
61 ///
62 /// * This cache does not listen for change notifications; the user is
63 /// responsible for clearing the cache when changes occur.
64 ///
65 /// * Thread safety: instances of this class may not be used concurrently.
66 ///
67 /// * Plugins may be loaded in order to compute extents for prim types provided
68 /// by that plugin. See UsdGeomBoundable::ComputeExtentFromPlugins
69 ///
71 {
72 public:
73  /// Construct a new BBoxCache for a specific \p time and set of
74  /// \p includedPurposes.
75  ///
76  /// Only prims with a purpose that matches the \p includedPurposes will be
77  /// considered when accumulating child bounds. See UsdGeomImageable for
78  /// allowed purpose values.
79  ///
80  /// If \p useExtentsHint is true, then when computing the bounds for any
81  /// model-root prim, if the prim is visible at \p time, we will fetch its
82  /// extents hint (via UsdGeomModelAPI::GetExtentsHint()). If it is authored,
83  /// we use it to compute the bounding box for the selected combination of
84  /// includedPurposes by combining bounding box hints that have been cached
85  /// for various values of purposes.
86  ///
87  /// If \p ignoreVisibility is true invisible prims will be included during
88  /// bounds computations.
89  ///
92  bool useExtentsHint=false, bool ignoreVisibility=false);
93 
94  /// Copy constructor.
96  UsdGeomBBoxCache(UsdGeomBBoxCache const &other);
97 
98  /// Copy assignment.
100  UsdGeomBBoxCache &operator=(UsdGeomBBoxCache const &other);
101 
102  /// Compute the bound of the given prim in world space, leveraging any
103  /// pre-existing, cached bounds.
104  ///
105  /// The bound of the prim is computed, including the transform (if any)
106  /// authored on the node itself, and then transformed to world space.
107  ///
108  /// Error handling note: No checking of \p prim validity is performed. If
109  /// \p prim is invalid, this method will abort the program; therefore it is
110  /// the client's responsibility to ensure \p prim is valid.
112  GfBBox3d ComputeWorldBound(const UsdPrim& prim);
113 
114  /// Computes the bound of the prim's descendents in world space while
115  /// excluding the subtrees rooted at the paths in \p pathsToSkip.
116  ///
117  /// Additionally, the parameter \p primOverride overrides the local-to-world
118  /// transform of the prim and \p ctmOverrides is used to specify overrides
119  /// the local-to-world transforms of certain paths underneath the prim.
120  ///
121  /// This leverages any pre-existing, cached bounds, but does not include the
122  /// transform (if any) authored on the prim itself.
123  ///
124  /// See ComputeWorldBound() for notes on performance and error handling.
127  const UsdPrim &prim,
128  const SdfPathSet &pathsToSkip,
129  const GfMatrix4d &primOverride,
131 
132 
133  /// Compute the bound of the given prim in the space of an ancestor prim,
134  /// \p relativeToAncestorPrim, leveraging any pre-existing cached bounds.
135  ///
136  /// The computed bound excludes the local transform at
137  /// \p relativeToAncestorPrim. The computed bound may be incorrect if
138  /// \p relativeToAncestorPrim is not an ancestor of \p prim.
139  ///
142  const UsdPrim &relativeToAncestorPrim);
143 
144  /// Computes the oriented bounding box of the given prim, leveraging any
145  /// pre-existing, cached bounds.
146  ///
147  /// The computed bound includes the transform authored on the prim itself,
148  /// but does not include any ancestor transforms (it does not include the
149  /// local-to-world transform).
150  ///
151  /// See ComputeWorldBound() for notes on performance and error handling.
153  GfBBox3d ComputeLocalBound(const UsdPrim& prim);
154 
155  /// Computes the bound of the prim's children leveraging any pre-existing,
156  /// cached bounds, but does not include the transform (if any) authored on
157  /// the prim itself.
158  ///
159  /// \b IMPORTANT: while the BBox does not contain the local transformation,
160  /// in general it may still contain a non-identity transformation matrix to
161  /// put the bounds in the correct space. Therefore, to obtain the correct
162  /// axis-aligned bounding box, the client must call ComputeAlignedRange().
163  ///
164  /// See ComputeWorldBound() for notes on performance and error handling.
167 
168  /// \overload
169  /// Computes the bound of the prim's descendents while excluding the
170  /// subtrees rooted at the paths in \p pathsToSkip. Additionally, the
171  /// parameter \p ctmOverrides is used to specify overrides to the CTM values
172  /// of certain paths underneath the prim. The CTM values in the
173  /// \p ctmOverrides map are in the space of the given prim, \p prim.
174  ///
175  /// This leverages any pre-existing, cached bounds, but does not include the
176  /// transform (if any) authored on the prim itself.
177  ///
178  /// \b IMPORTANT: while the BBox does not contain the local transformation,
179  /// in general it may still contain a non-identity transformation matrix to
180  /// put the bounds in the correct space. Therefore, to obtain the correct
181  /// axis-aligned bounding box, the client must call ComputeAlignedRange().
182  ///
183  /// See ComputeWorldBound() for notes on performance and error handling.
186  const UsdPrim &prim,
187  const SdfPathSet &pathsToSkip,
189 
190  /// Compute the bound of the given point instances in world space.
191  ///
192  /// The bounds of each instance is computed and then transformed to world
193  /// space. The \p result pointer must point to \p numIds GfBBox3d instances
194  /// to be filled.
196  bool
198  const UsdGeomPointInstancer& instancer,
199  int64_t const *instanceIdBegin,
200  size_t numIds,
201  GfBBox3d *result);
202 
203  /// Compute the bound of the given point instance in world space.
204  ///
205  GfBBox3d
207  const UsdGeomPointInstancer& instancer, int64_t instanceId) {
208  GfBBox3d ret;
209  ComputePointInstanceWorldBounds(instancer, &instanceId, 1, &ret);
210  return ret;
211  }
212 
213  /// Compute the bounds of the given point instances in the space of an
214  /// ancestor prim \p relativeToAncestorPrim. Write the results to
215  /// \p result.
216  ///
217  /// The computed bound excludes the local transform at
218  /// \p relativeToAncestorPrim. The computed bound may be incorrect if
219  /// \p relativeToAncestorPrim is not an ancestor of \p prim.
220  ///
221  /// The \p result pointer must point to \p numIds GfBBox3d instances to be
222  /// filled.
224  bool
226  const UsdGeomPointInstancer &instancer,
227  int64_t const *instanceIdBegin,
228  size_t numIds,
229  const UsdPrim &relativeToAncestorPrim,
230  GfBBox3d *result);
231 
232  /// Compute the bound of the given point instance in the space of an
233  /// ancestor prim \p relativeToAncestorPrim.
234  GfBBox3d
236  const UsdGeomPointInstancer &instancer,
237  int64_t instanceId,
238  const UsdPrim &relativeToAncestorPrim) {
239  GfBBox3d ret;
241  instancer, &instanceId, 1, relativeToAncestorPrim, &ret);
242  return ret;
243  }
244 
245  /// Compute the oriented bounding boxes of the given point instances.
246  ///
247  /// The computed bounds include the transform authored on the instancer
248  /// itself, but does not include any ancestor transforms (it does not
249  /// include the local-to-world transform).
250  ///
251  /// The \p result pointer must point to \p numIds GfBBox3d instances to be
252  /// filled.
254  bool
256  const UsdGeomPointInstancer& instancer,
257  int64_t const *instanceIdBegin,
258  size_t numIds,
259  GfBBox3d *result);
260 
261  /// Compute the oriented bounding boxes of the given point instances.
262  GfBBox3d
264  const UsdGeomPointInstancer& instancer,
265  int64_t instanceId) {
266  GfBBox3d ret;
267  ComputePointInstanceLocalBounds(instancer, &instanceId, 1, &ret);
268  return ret;
269  }
270 
271 
272  /// Computes the bound of the given point instances, but does not include
273  /// the transform (if any) authored on the instancer itself.
274  ///
275  /// \b IMPORTANT: while the BBox does not contain the local transformation,
276  /// in general it may still contain a non-identity transformation matrix to
277  /// put the bounds in the correct space. Therefore, to obtain the correct
278  /// axis-aligned bounding box, the client must call ComputeAlignedRange().
279  ///
280  /// The \p result pointer must point to \p numIds GfBBox3d instances to be
281  /// filled.
283  bool
285  const UsdGeomPointInstancer& instancer,
286  int64_t const *instanceIdBegin,
287  size_t numIds,
288  GfBBox3d *result);
289 
290  /// Computes the bound of the given point instances, but does not include
291  /// the instancer's transform.
292  GfBBox3d
294  const UsdGeomPointInstancer& instancer,
295  int64_t instanceId) {
296  GfBBox3d ret;
298  instancer, &instanceId, 1, &ret);
299  return ret;
300  }
301 
302  /// Clears all pre-cached values.
304  void Clear();
305 
306  /// Indicate the set of \p includedPurposes to use when resolving child
307  /// bounds. Each child's purpose must match one of the elements of this set
308  /// to be included in the computation; if it does not, child is excluded.
309  ///
310  /// Note the use of *child* in the docs above, purpose is ignored for the
311  /// prim for whose bounds are directly queried.
312  ///
313  /// Changing this value <b>does not invalidate existing caches</b>.
315  void SetIncludedPurposes(const TfTokenVector& includedPurposes);
316 
317  /// Get the current set of included purposes.
318  const TfTokenVector& GetIncludedPurposes() { return _includedPurposes; }
319 
320  /// Returns whether authored extent hints are used to compute
321  /// bounding boxes.
322  bool GetUseExtentsHint() const {
323  return _useExtentsHint;
324  }
325 
326  /// Returns whether prim visibility should be ignored when computing
327  /// bounding boxes.
328  bool GetIgnoreVisibility() const {
329  return _ignoreVisibility;
330  }
331 
332  /// Use the new \p time when computing values and may clear any existing
333  /// values cached for the previous time. Setting \p time to the current time
334  /// is a no-op.
336  void SetTime(UsdTimeCode time);
337 
338  /// Get the current time from which this cache is reading values.
339  UsdTimeCode GetTime() const { return _time; }
340 
341  /// Set the base time value for this bbox cache. This value is used only
342  /// when computing bboxes for point instancer instances (see
343  /// ComputePointInstanceWorldBounds(), for example). See
344  /// UsdGeomPointInstancer::ComputeExtentAtTime() for more information. If
345  /// unset, the bbox cache uses its time (GetTime() / SetTime()) for this
346  /// value.
347  ///
348  /// Note that setting the base time does not invalidate any cache entries.
349  void SetBaseTime(UsdTimeCode baseTime) {
350  _baseTime = baseTime;
351  }
352 
353  /// Return the base time if set, otherwise GetTime(). Use HasBaseTime() to
354  /// observe if a base time has been set.
356  return _baseTime.value_or(GetTime());
357  }
358 
359  /// Clear this cache's baseTime if one has been set. After calling this,
360  /// the cache will use its time as the baseTime value.
361  void ClearBaseTime() {
362  _baseTime = std::nullopt;
363  }
364 
365  /// Return true if this cache has a baseTime that's been explicitly set,
366  /// false otherwise.
367  bool HasBaseTime() const {
368  return static_cast<bool>(_baseTime);
369  }
370 
371 private:
372  // Worker task.
373  class _BBoxTask;
374 
375  // Helper object for computing bounding boxes for instance prototypes.
376  class _PrototypeBBoxResolver;
377 
378  // Map of purpose tokens to associated bboxes.
379  typedef std::map<TfToken, GfBBox3d, TfTokenFastArbitraryLessThan>
380  _PurposeToBBoxMap;
381 
382  // Each individual prim will have it's own entry in the bbox cache. When
383  // instancing is involved we store the prototype prims and their children in
384  // the cache for use by each prim that instances each prototype. However,
385  // because of the way we compute and inherit purpose, we may end up needed
386  // to compute multitple different bboxes for prototypes and their children
387  // if the prims that instance them would cause these prototypes to inherit a
388  // different purpose value when the prims under the prototype don't have an
389  // authored purpose of their own.
390  //
391  // This struct is here to represent a prim and the purpose that it would
392  // inherit from the prim that instances it. It is used as the key for the
393  // map of prim's to the cached entries, allowing prims in prototypes to have
394  // more than one bbox cache entry for each distinct context needed to
395  // appropriately compute for all instances. instanceInheritablePurpose will
396  // always be empty for prims that aren't prototypes or children of
397  // prototypes, meaning that prims not in prototypes will only have one
398  // context each.
399  struct _PrimContext {
400  // The prim itself
401  UsdPrim prim;
402 
403  // The purpose that would be inherited from the instancing prim if this
404  // prim does not have an explicit purpose.
405  TfToken instanceInheritablePurpose;
406 
407  _PrimContext() = default;
408  explicit _PrimContext(const UsdPrim &prim_,
409  const TfToken &purpose = TfToken())
410  : prim(prim_), instanceInheritablePurpose(purpose) {};
411 
412  bool operator==(const _PrimContext &rhs) const {
413  return prim == rhs.prim &&
414  instanceInheritablePurpose == rhs.instanceInheritablePurpose;
415  }
416 
417  // Convenience stringify for debugging.
418  std::string ToString() const;
419  };
420 
421  template<typename TransformType>
422  GfBBox3d _ComputeBoundWithOverridesHelper(
423  const UsdPrim &prim,
424  const SdfPathSet &pathsToSkip,
425  const TransformType &primOverride,
427 
428  bool
429  _ComputePointInstanceBoundsHelper(
430  const UsdGeomPointInstancer &instancer,
431  int64_t const *instanceIdBegin,
432  size_t numIds,
433  GfMatrix4d const &xform,
434  GfBBox3d *result);
435 
436  // Returns true if the \p prim should be included during child bounds
437  // accumulation.
438  bool _ShouldIncludePrim(const UsdPrim& prim);
439 
440  // True if \p attr or \p query may return different values given different
441  // time queries. Note that a true result implies the attribute may have no
442  // value, a default value or a single time sample value.
443  bool _IsVarying(const UsdAttribute& attr);
444  bool _IsVarying(const UsdAttributeQuery& query);
445 
446  // Populate the local bbox for the requested prim, without the
447  // local-to-world transform or local transform applied. Return true when
448  // bbox volume > 0.
449  bool _Resolve(const UsdPrim& prim, _PurposeToBBoxMap *bboxes);
450 
451  // Resolves a single prim. This method must be thread safe. Assumes the
452  // cache entry has been created for \p prim.
453  //
454  // \p inverseComponentCtm is used to combine all the child bboxes in
455  // component-relative space.
456  void _ResolvePrim(const _BBoxTask* task,
457  const _PrimContext& prim,
458  const GfMatrix4d &inverseComponentCtm);
459 
460  struct _Entry {
461  _Entry()
462  : isComplete(false)
463  , isVarying(false)
464  , isIncluded(false)
465  { }
466 
467  // The cached bboxes for the various values of purpose token.
468  _PurposeToBBoxMap bboxes;
469 
470  // Queries for attributes that need to be re-computed at each
471  // time for this entry. This will be invalid for non-varying entries.
472  std::shared_ptr<UsdAttributeQuery[]> queries;
473 
474  // Computed purpose info of the prim that's associated with the entry.
475  // This data includes the prim's actual computed purpose as well as
476  // whether this purpose is inheritable by child prims.
477  UsdGeomImageable::PurposeInfo purposeInfo;
478 
479  // True when data in the entry is valid.
480  bool isComplete;
481 
482  // True when the entry varies over time.
483  bool isVarying;
484 
485  // True when the entry is visible.
486  bool isIncluded;
487  };
488 
489  // Returns the cache entry for the given \p prim if one already exists.
490  // If no entry exists, creates (but does not resolve) entries for
491  // \p prim and all of its descendents. In this case, the prototype prims
492  // whose bounding boxes need to be resolved in order to resolve \p prim
493  // will be returned in \p prototypePrimContexts.
494  _Entry* _FindOrCreateEntriesForPrim(
495  const _PrimContext& prim,
496  std::vector<_PrimContext> *prototypePrimContexts);
497 
498  // Returns the combined bounding box for the currently included set of
499  // purposes given a _PurposeToBBoxMap.
500  GfBBox3d _GetCombinedBBoxForIncludedPurposes(
501  const _PurposeToBBoxMap &bboxes);
502 
503  // Populates \p bbox with the bounding box computed from the authored
504  // extents hint. Based on the included purposes, the extents in the
505  // extentsHint attribute are combined together to compute the bounding box.
506  bool _GetBBoxFromExtentsHint(
507  const UsdGeomModelAPI &geomModel,
508  const UsdAttributeQuery &extentsHintQuery,
509  _PurposeToBBoxMap *bboxes);
510 
511  // Returns whether the children of the given prim can be pruned
512  // from the traversal to pre-populate entries.
513  bool _ShouldPruneChildren(const UsdPrim &prim, _Entry *entry);
514 
515  // Helper function for computing a prim's purpose info efficiently by
516  // using the parent entry's cached computed purpose info and caching it
517  // its cache entry.
518  // Optionally this can recursively compute and cache the purposes for any
519  // existing parent entries in the cache that haven't had their purposes
520  // computed yet.
521  template <bool IsRecursive>
522  void _ComputePurposeInfo(_Entry *entry, const _PrimContext &prim);
523 
524  // Helper to determine if we should use extents hints for \p prim.
525  inline bool _UseExtentsHintForPrim(UsdPrim const &prim) const;
526 
527  // Specialize TfHashAppend for TfHash
528  template <typename HashState>
529  friend void TfHashAppend(HashState& h, const _PrimContext &key)
530  {
531  h.Append(key.prim);
532  h.Append(key.instanceInheritablePurpose);
533  }
534 
535  // Need hash_value for boost to key cache entries by prim context.
536  friend size_t hash_value(const _PrimContext &key) { return TfHash{}(key); }
537 
538  typedef TfHash _PrimContextHash;
539  typedef TfHashMap<_PrimContext, _Entry, _PrimContextHash> _PrimBBoxHashMap;
540 
541  // Finds the cache entry for the prim context if it exists.
542  _Entry *_FindEntry(const _PrimContext &primContext)
543  {
544  return TfMapLookupPtr(_bboxCache, primContext);
545  }
546 
547  // Returns the cache entry for the prim context, adding it if doesn't
548  // exist.
549  _Entry *_InsertEntry(const _PrimContext &primContext)
550  {
551  return &(_bboxCache[primContext]);
552  }
553 
554  WorkDispatcher _dispatcher;
555  UsdTimeCode _time;
556  std::optional<UsdTimeCode> _baseTime;
557  TfTokenVector _includedPurposes;
558  UsdGeomXformCache _ctmCache;
559  _PrimBBoxHashMap _bboxCache;
560  bool _useExtentsHint;
561  bool _ignoreVisibility;
562 };
563 
564 
566 
567 #endif // PXR_USD_USD_GEOM_BBOX_CACHE_H
USDGEOM_API GfBBox3d ComputeUntransformedBound(const UsdPrim &prim)
USDGEOM_API bool ComputePointInstanceLocalBounds(const UsdGeomPointInstancer &instancer, int64_t const *instanceIdBegin, size_t numIds, GfBBox3d *result)
GLenum query
Definition: glad.h:2772
USDGEOM_API void SetIncludedPurposes(const TfTokenVector &includedPurposes)
bool HasBaseTime() const
Definition: bboxCache.h:367
USDGEOM_API GfBBox3d ComputeWorldBoundWithOverrides(const UsdPrim &prim, const SdfPathSet &pathsToSkip, const GfMatrix4d &primOverride, const TfHashMap< SdfPath, GfMatrix4d, SdfPath::Hash > &ctmOverrides)
GT_API const UT_StringHolder time
USDGEOM_API GfBBox3d ComputeLocalBound(const UsdPrim &prim)
USDGEOM_API bool ComputePointInstanceWorldBounds(const UsdGeomPointInstancer &instancer, int64_t const *instanceIdBegin, size_t numIds, GfBBox3d *result)
**But if you need a result
Definition: thread.h:622
bool GetIgnoreVisibility() const
Definition: bboxCache.h:328
USDGEOM_API void Clear()
Clears all pre-cached values.
bool GetUseExtentsHint() const
Definition: bboxCache.h:322
USDGEOM_API bool ComputePointInstanceUntransformedBounds(const UsdGeomPointInstancer &instancer, int64_t const *instanceIdBegin, size_t numIds, GfBBox3d *result)
Definition: hash.h:472
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
USDGEOM_API UsdGeomBBoxCache & operator=(UsdGeomBBoxCache const &other)
Copy assignment.
Definition: token.h:70
void ClearBaseTime()
Definition: bboxCache.h:361
friend size_t hash_value(const _PrimContext &key)
Definition: bboxCache.h:536
Container::mapped_type * TfMapLookupPtr(Container &map, Key const &key)
Definition: stl.h:124
GfBBox3d ComputePointInstanceRelativeBound(const UsdGeomPointInstancer &instancer, int64_t instanceId, const UsdPrim &relativeToAncestorPrim)
Definition: bboxCache.h:235
USDGEOM_API bool ComputePointInstanceRelativeBounds(const UsdGeomPointInstancer &instancer, int64_t const *instanceIdBegin, size_t numIds, const UsdPrim &relativeToAncestorPrim, GfBBox3d *result)
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
void SetBaseTime(UsdTimeCode baseTime)
Definition: bboxCache.h:349
GfBBox3d ComputePointInstanceUntransformedBound(const UsdGeomPointInstancer &instancer, int64_t instanceId)
Definition: bboxCache.h:293
friend void TfHashAppend(HashState &h, const _PrimContext &key)
Definition: bboxCache.h:529
std::set< class SdfPath > SdfPathSet
A set of SdfPaths.
Definition: path.h:192
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
GfBBox3d ComputePointInstanceLocalBound(const UsdGeomPointInstancer &instancer, int64_t instanceId)
Compute the oriented bounding boxes of the given point instances.
Definition: bboxCache.h:263
GfBBox3d ComputePointInstanceWorldBound(const UsdGeomPointInstancer &instancer, int64_t instanceId)
Definition: bboxCache.h:206
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
USDGEOM_API void SetTime(UsdTimeCode time)
UsdTimeCode GetBaseTime() const
Definition: bboxCache.h:355
#define USDGEOM_API
Definition: api.h:23
USDGEOM_API GfBBox3d ComputeWorldBound(const UsdPrim &prim)
USDGEOM_API GfBBox3d ComputeRelativeBound(const UsdPrim &prim, const UsdPrim &relativeToAncestorPrim)
USDGEOM_API UsdGeomBBoxCache(UsdTimeCode time, TfTokenVector includedPurposes, bool useExtentsHint=false, bool ignoreVisibility=false)
const TfTokenVector & GetIncludedPurposes()
Get the current set of included purposes.
Definition: bboxCache.h:318
UsdTimeCode GetTime() const
Get the current time from which this cache is reading values.
Definition: bboxCache.h:339