cache.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_SKEL_CACHE_H
8 #define PXR_USD_USD_SKEL_CACHE_H
9 
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/usdSkel/api.h"
14 
15 #include "pxr/usd/usd/prim.h"
16 #include "pxr/usd/usd/primFlags.h"
17 
20 
21 #include <memory>
22 
23 
24 PXR_NAMESPACE_OPEN_SCOPE
25 
26 
27 class UsdSkelRoot;
28 class UsdSkelAnimation;
29 class UsdSkelSkeleton;
32 
34 
35 
41 {
42 public:
43  USDSKEL_API
44  UsdSkelCache();
45 
46  USDSKEL_API
47  void Clear();
48 
55  USDSKEL_API
56  bool Populate(const UsdSkelRoot& root,
57  Usd_PrimFlagsPredicate predicate) const;
58 
62  USDSKEL_API
64 
68  USDSKEL_API
70 
73  USDSKEL_API
74  UsdSkelAnimQuery GetAnimQuery(const UsdPrim& prim) const;
75 
84  USDSKEL_API
86 
92  USDSKEL_API
93  bool ComputeSkelBindings(const UsdSkelRoot& skelRoot,
94  std::vector<UsdSkelBinding>* bindings,
95  Usd_PrimFlagsPredicate predicate) const;
96 
102  USDSKEL_API
103  bool ComputeSkelBinding(const UsdSkelRoot& skelRoot,
104  const UsdSkelSkeleton& skel,
105  UsdSkelBinding* binding,
106  Usd_PrimFlagsPredicate predicate) const;
107 
108 private:
109  std::shared_ptr<class UsdSkel_CacheImpl> _impl;
110 
111  friend class UsdSkelAnimQuery;
112  friend class UsdSkelSkeletonQuery;
113 };
114 
115 PXR_NAMESPACE_CLOSE_SCOPE
116 
117 #endif // USDSKEL_EVALCACHE_H
Object used for querying resolved bindings for skinning.
Definition: skinningQuery.h:34
Thread-safe cache for accessing query objects for evaluating skeletal data.
Definition: cache.h:40
Class providing efficient queries of primitives that provide skel animation.
Definition: animQuery.h:37
Describes a skel animation, where joint animation is stored in a vectorized form.
Definition: animation.h:45
USDSKEL_API UsdSkelSkinningQuery GetSkinningQuery(const UsdPrim &prim) const
Get a skinning query at prim.
USDSKEL_API bool Populate(const UsdSkelRoot &root, Usd_PrimFlagsPredicate predicate) const
Populate the cache for the skeletal data beneath prim root, as traversed using predicate.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:116
Describes a skeleton.
Definition: skeleton.h:46
USDSKEL_API UsdSkelAnimQuery GetAnimQuery(const UsdSkelAnimation &anim) const
Get an anim query corresponding to anim.
Helper object that describes the binding of a skeleton to a set of skinnable objects.
Definition: binding.h:27
USDSKEL_API bool ComputeSkelBinding(const UsdSkelRoot &skelRoot, const UsdSkelSkeleton &skel, UsdSkelBinding *binding, Usd_PrimFlagsPredicate predicate) const
Compute the bindings corresponding to a single skeleton, bound beneath skelRoot, as discovered throug...
Boundable prim type used to identify a scope beneath which skeletally-posed primitives are defined.
Definition: root.h:46
USDSKEL_API bool ComputeSkelBindings(const UsdSkelRoot &skelRoot, std::vector< UsdSkelBinding > *bindings, Usd_PrimFlagsPredicate predicate) const
Compute the set of skeleton bindings beneath skelRoot, as discovered through a traversal using predic...
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
Primary interface to reading bound skeleton data.
Definition: skeletonQuery.h:53
USDSKEL_API UsdSkelSkeletonQuery GetSkelQuery(const UsdSkelSkeleton &skel) const
Get a skel query for computing properties of skel.