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;
64 return _animationSchema;
77 return _skelDataCache.Get();
83 return _skelGuideDataCache.Get();
106 const TfToken &dirtiedPrimType,
113 HdSceneIndexBaseRefPtr
const &sceneIndex,
115 HdContainerDataSourceHandle
const &primSource);
117 bool _ProcessSkeletonDirtyLocators(
121 bool _ProcessSkelAnimationDirtyLocators(
125 bool _ProcessInstancerDirtyLocators(
132 HdContainerDataSourceHandle
const _primSource;
134 const SdfPath _animationSource;
142 _SkelDataCache(HdSceneIndexBaseRefPtr
const &sceneIndex,
145 Handle _Compute()
override;
147 HdSceneIndexBaseRefPtr
const _sceneIndex;
150 _SkelDataCache _skelDataCache;
152 class _SkelGuideDataCache
159 Handle _Compute()
override;
163 _SkelGuideDataCache _skelGuideDataCache;
171 class _RestTransformsDataSource;
172 std::shared_ptr<_RestTransformsDataSource>
const _restTransformsDataSource;
180PXR_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...
USDSKELIMAGING_API HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
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.
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.
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.