HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
skelRootAdapter.h
Go to the documentation of this file.
1 //
2 // Copyright 2019 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_IMAGING_USD_SKEL_IMAGING_SKEL_ROOT_ADAPTER_H
25 #define PXR_USD_IMAGING_USD_SKEL_IMAGING_SKEL_ROOT_ADAPTER_H
26 
27 #include "pxr/pxr.h"
30 
32 
33 /// \class UsdImagingSkelRootAdapter
34 ///
35 /// The SkelRoot adapter exists for two reasons:
36 /// (a) Registering the SkeletonAdapter to handle processing of any skinned
37 /// prim under a SkelRoot prim.
38 /// The UsdSkel schema requires that ANY skinned prim lives under a
39 /// SkelRoot.
40 /// (b) Getting the skeleton that deforms each skinned prim, which is stored
41 /// in the SkeletonAdapter (the latter is stateful).
42 /// Both of these happen during Populate(..)
43 ///
45 public:
47 
49  : BaseAdapter()
50  {}
51 
54 
55  // ---------------------------------------------------------------------- //
56  /// \name Initialization
57  // ---------------------------------------------------------------------- //
59  SdfPath
60  Populate(const UsdPrim& prim,
63  instancerContext=nullptr) override;
64 
66  bool CanPopulateUsdInstance() const override { return true; }
67 
68  bool ShouldIgnoreNativeInstanceSubtrees() const override;
69 
70  // ---------------------------------------------------------------------- //
71  /// \name Parallel Setup and Resolve
72  // ---------------------------------------------------------------------- //
73 
74  /// Thread Safe.
76  void TrackVariability(const UsdPrim& prim,
77  const SdfPath& cachePath,
78  HdDirtyBits* timeVaryingBits,
80  instancerContext = nullptr) const override;
81 
82  /// Thread Safe.
84  void UpdateForTime(const UsdPrim& prim,
85  const SdfPath& cachePath,
87  HdDirtyBits requestedBits,
89  instancerContext=nullptr) const override;
90 
91  // ---------------------------------------------------------------------- //
92  /// \name Change Processing
93  // ---------------------------------------------------------------------- //
94 
97  const SdfPath& cachePath,
98  const TfToken& propertyName) override;
99 
101  void MarkDirty(const UsdPrim& prim,
102  const SdfPath& cachePath,
103  HdDirtyBits dirty,
104  UsdImagingIndexProxy* index) override;
105 
106 protected:
108  void _RemovePrim(const SdfPath& cachePath,
109  UsdImagingIndexProxy* index) override;
110 };
111 
112 
114 
115 #endif // PXR_USD_IMAGING_USD_SKEL_IMAGING_SKEL_ROOT_ADAPTER_H
GT_API const UT_StringHolder time
uint32_t HdDirtyBits
Definition: types.h:158
USDSKELIMAGING_API void UpdateForTime(const UsdPrim &prim, const SdfPath &cachePath, UsdTimeCode time, HdDirtyBits requestedBits, const UsdImagingInstancerContext *instancerContext=nullptr) const override
Thread Safe.
USDSKELIMAGING_API void TrackVariability(const UsdPrim &prim, const SdfPath &cachePath, HdDirtyBits *timeVaryingBits, const UsdImagingInstancerContext *instancerContext=nullptr) const override
Thread Safe.
USDSKELIMAGING_API SdfPath Populate(const UsdPrim &prim, UsdImagingIndexProxy *index, const UsdImagingInstancerContext *instancerContext=nullptr) override
USDSKELIMAGING_API void _RemovePrim(const SdfPath &cachePath, UsdImagingIndexProxy *index) override
Provides to paramName->UsdAttribute value mappings.
Definition: token.h:87
USDSKELIMAGING_API bool CanPopulateUsdInstance() const override
Definition: prim.h:133
USDSKELIMAGING_API void MarkDirty(const UsdPrim &prim, const SdfPath &cachePath, HdDirtyBits dirty, UsdImagingIndexProxy *index) override
Definition: path.h:290
virtual USDSKELIMAGING_API ~UsdSkelImagingSkelRootAdapter()
bool ShouldIgnoreNativeInstanceSubtrees() const override
USDSKELIMAGING_API HdDirtyBits ProcessPropertyChange(const UsdPrim &prim, const SdfPath &cachePath, const TfToken &propertyName) override
#define USDSKELIMAGING_API
Definition: api.h:40
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
GLuint index
Definition: glcorearb.h:786
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91