8#ifndef PXR_USD_IMAGING_USD_SKEL_IMAGING_DATA_SOURCE_RESOLVED_SKELETON_PRIM_H
9#define PXR_USD_IMAGING_USD_SKEL_IMAGING_DATA_SOURCE_RESOLVED_SKELETON_PRIM_H
11#include "pxr/imaging/hd/sceneIndex.h"
14#include "pxr/usdImaging/usdSkelImaging/dataSourceUtils.h"
16#include "pxr/usdImaging/usdSkelImaging/xformResolver.h"
18PXR_NAMESPACE_OPEN_SCOPE
32 ,
public std::enable_shared_from_this<
33 UsdSkelImagingDataSourceResolvedSkeletonPrim>
45 HdDataSourceBaseHandle
Get(
const TfToken &name)
override;
50 return _animationSource;
54 return _instanceAnimationSources;
68 return _animationSchema;
72 &GetInstanceAnimationSchemas()
const {
73 return _instanceAnimationSchemas;
86 GetResolvedAnimationSchemas()
const;
116 return _skelDataCache.Get();
122 return _skelGuideDataCache.Get();
145 const TfToken &dirtiedPrimType,
152 HdSceneIndexBaseRefPtr
const &sceneIndex,
154 HdContainerDataSourceHandle
const &primSource);
156 bool _ShouldResolveInstanceAnimation()
const;
158 bool _ProcessSkeletonDirtyLocators(
162 bool _ProcessSkelAnimationDirtyLocators(
166 bool _ProcessInstancerDirtyLocators(
173 HdContainerDataSourceHandle
const _primSource;
175 const SdfPath _animationSource;
183 _SkelDataCache(HdSceneIndexBaseRefPtr
const &sceneIndex,
186 Handle _Compute()
override;
188 HdSceneIndexBaseRefPtr
const _sceneIndex;
191 _SkelDataCache _skelDataCache;
193 class _SkelGuideDataCache
200 Handle _Compute()
override;
204 _SkelGuideDataCache _skelGuideDataCache;
212 class _RestTransformsDataSource;
213 std::shared_ptr<_RestTransformsDataSource>
const _restTransformsDataSource;
227PXR_NAMESPACE_CLOSE_SCOPE
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Represents a set of data source locators closed under descendancy.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
Corresponds to UsdSkelAnimation.
A data source providing data for the UsdSkelImagingResolvedSkeletonSchema and for drawing the guide a...
HdTokenArrayDataSourceHandle GetBlendShapes() const
BlendShapes.
USDSKELIMAGING_API HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
const VtArray< SdfPath > GetResolvedAnimationSources() const
Get the resolved animationSchema(s)/animationSource(s) bound to this skeleton.
const SdfPath & GetAnimationSource() const
skelAnimation targeted by the skeleton.
USDSKELIMAGING_API bool ProcessDirtyLocators(const TfToken &dirtiedPrimType, const HdDataSourceLocatorSet &dirtyLocators, HdSceneIndexObserver::DirtiedPrimEntries *entries)
Dirty internal structures in response to dirty locators for skeleton prim (dirtiedPrimType = "skeleto...
HdMatrix4fArrayDataSourceHandle GetSkinningTransforms()
Skinning transforms.
static const HdDataSourceLocatorSet & GetDependendendOnDataSourceLocators()
Data source locators (on this prim) that this prim depends on.
HdMatrixDataSourceHandle GetSkelLocalToCommonSpace() const
Transfrom to go from local space of skeleton prim to common space (as defined by UsdSkelImagingDataSo...
const UsdSkelImagingAnimationSchema & GetAnimationSchema() const
Schema from skelAnimation at GetAnimationSource().
USDSKELIMAGING_API TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
HdFloatArrayDataSourceHandle GetBlendShapeWeights() const
BlendShape weights.
std::shared_ptr< UsdSkelImagingSkelData > GetSkelData()
(Non-animated) skel data computed from this skeleton and the parts of skelAnimation relating to the t...
const VtArray< SdfPath > & GetInstancerPaths() const
Paths to instancers instancing this prim - not including ones outside the skel root.
HdVec2iArrayDataSourceHandle GetBlendShapeRanges() const
BlendShape ranges.
std::shared_ptr< UsdSkelImagingSkelGuideData > GetSkelGuideData()
Some of the (non-animated) data to compute the points and topology for the mesh guide.
A thunk for shared pointers computing the result only once and using atomic operations to store the c...
Represents an arbitrary dimensional rectangular container class.
Some of the data necessary to compute the skinning transforms of a skeleton.
Data to compute the skeleton guide as mesh.
std::vector< TfToken > TfTokenVector
Convenience types.