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;
93 return _skelDataCache.Get();
99 return _skelGuideDataCache.Get();
122 const TfToken &dirtiedPrimType,
129 HdSceneIndexBaseRefPtr
const &sceneIndex,
131 HdContainerDataSourceHandle
const &primSource);
133 bool _ShouldResolveInstanceAnimation()
const;
135 bool _ProcessSkeletonDirtyLocators(
139 bool _ProcessSkelAnimationDirtyLocators(
143 bool _ProcessInstancerDirtyLocators(
150 HdContainerDataSourceHandle
const _primSource;
152 const SdfPath _animationSource;
160 _SkelDataCache(HdSceneIndexBaseRefPtr
const &sceneIndex,
163 Handle _Compute()
override;
165 HdSceneIndexBaseRefPtr
const _sceneIndex;
168 _SkelDataCache _skelDataCache;
170 class _SkelGuideDataCache
177 Handle _Compute()
override;
181 _SkelGuideDataCache _skelGuideDataCache;
189 class _RestTransformsDataSource;
190 std::shared_ptr<_RestTransformsDataSource>
const _restTransformsDataSource;
204PXR_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.
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...
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.
VtArray< UsdSkelImagingAnimationSchema > GetAnimationSchema() const
Schema(s) from skelAnimation at GetAnimationSource().
VtArray< SdfPath > GetAnimationSource() const
skelAnimation targeted by the skeleton.
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.