All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cache.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_USD_SKEL_CACHE_H
25 #define PXR_USD_USD_SKEL_CACHE_H
26 
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usdSkel/api.h"
31 
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/primFlags.h"
34 
37 
38 #include <memory>
39 
40 
41 PXR_NAMESPACE_OPEN_SCOPE
42 
43 
44 class UsdSkelRoot;
45 class UsdSkelAnimation;
46 class UsdSkelSkeleton;
49 
51 
52 
58 {
59 public:
60  USDSKEL_API
61  UsdSkelCache();
62 
63  USDSKEL_API
64  void Clear();
65 
72  USDSKEL_API
73  bool Populate(const UsdSkelRoot& root,
74  Usd_PrimFlagsPredicate predicate) const;
75 
79  USDSKEL_API
81 
85  USDSKEL_API
87 
90  USDSKEL_API
91  UsdSkelAnimQuery GetAnimQuery(const UsdPrim& prim) const;
92 
101  USDSKEL_API
102  UsdSkelSkinningQuery GetSkinningQuery(const UsdPrim& prim) const;
103 
109  USDSKEL_API
110  bool ComputeSkelBindings(const UsdSkelRoot& skelRoot,
111  std::vector<UsdSkelBinding>* bindings,
112  Usd_PrimFlagsPredicate predicate) const;
113 
119  USDSKEL_API
120  bool ComputeSkelBinding(const UsdSkelRoot& skelRoot,
121  const UsdSkelSkeleton& skel,
122  UsdSkelBinding* binding,
123  Usd_PrimFlagsPredicate predicate) const;
124 
125 private:
126  std::shared_ptr<class UsdSkel_CacheImpl> _impl;
127 
128  friend class UsdSkelAnimQuery;
129  friend class UsdSkelSkeletonQuery;
130 };
131 
132 PXR_NAMESPACE_CLOSE_SCOPE
133 
134 #endif // USDSKEL_EVALCACHE_H
Object used for querying resolved bindings for skinning.
Definition: skinningQuery.h:50
Thread-safe cache for accessing query objects for evaluating skeletal data.
Definition: cache.h:57
USDSKEL_API UsdSkelAnimQuery GetAnimQuery(const UsdSkelAnimation &anim) const
Get an anim query corresponding to anim.
Class providing efficient queries of primitives that provide skel animation.
Definition: animQuery.h:54
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...
Describes a skel animation, where joint animation is stored in a vectorized form. ...
Definition: animation.h:62
USDSKEL_API UsdSkelSkinningQuery GetSkinningQuery(const UsdPrim &prim) const
Get a skinning query at prim.
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...
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.
USDSKEL_API UsdSkelSkeletonQuery GetSkelQuery(const UsdSkelSkeleton &skel) const
Get a skel query for computing properties of skel.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a &quot;Prim&quot; as ...
Definition: prim.h:132
Describes a skeleton.
Definition: skeleton.h:63
Helper object that describes the binding of a skeleton to a set of skinnable objects.
Definition: binding.h:44
Boundable prim type used to identify a scope beneath which skeletally-posed primitives are defined...
Definition: root.h:63
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:75
Primary interface to reading bound skeleton data.
Definition: skeletonQuery.h:70