8#ifndef PXR_USD_IMAGING_USD_SKEL_IMAGING_DATA_SOURCE_RESOLVED_POINTS_BASED_PRIM_H
9#define PXR_USD_IMAGING_USD_SKEL_IMAGING_DATA_SOURCE_RESOLVED_POINTS_BASED_PRIM_H
11#include "pxr/usdImaging/usdSkelImaging/api.h"
12#include "pxr/usdImaging/usdSkelImaging/dataSourceUtils.h"
16#include "pxr/imaging/hd/sceneIndexObserver.h"
20PXR_NAMESPACE_OPEN_SCOPE
38 ,
public std::enable_shared_from_this<
39 UsdSkelImagingDataSourceResolvedPointsBasedPrim>
55 HdSceneIndexBaseRefPtr
const &sceneIndex,
57 HdContainerDataSourceHandle primSource);
66 HdDataSourceBaseHandle
Get(
const TfToken &name)
override;
76 return _blendShapeTargetPaths;
80 const HdPrimvarsSchema &
GetPrimvars()
const {
return _primvars; }
84 return _resolvedSkeletonSchema;
102 return _skinningMethod;
112 _resolvedSkeletonSchema &&
118 _primPath != _skeletonPath &&
149 const TfToken &dirtiedPrimType,
156 HdSceneIndexBaseRefPtr
const &sceneIndex,
158 HdContainerDataSourceHandle primSource,
162 HdContainerDataSourceHandle skeletonPrimSource,
163 UsdSkelImagingResolvedSkeletonSchema resolvedSkeletonSchema);
166 _ProcessDirtyLocators(
172 _ProcessDirtySkeletonLocators(
178 _ProcessDirtySkelBlendShapeLocators(
184 HdSceneIndexBaseRefPtr
const _sceneIndex;
188 HdContainerDataSourceHandle
const _primSource;
189 const bool _hasSkelRoot;
191 HdPrimvarsSchema
const _primvars;
195 HdContainerDataSourceHandle
const _skeletonPrimSource;
196 const UsdSkelImagingResolvedSkeletonSchema _resolvedSkeletonSchema;
198 class _BlendShapeDataCache
202 _BlendShapeDataCache(
203 HdSceneIndexBaseRefPtr
const &sceneIndex,
206 Handle _Compute()
override;
208 HdSceneIndexBaseRefPtr
const _sceneIndex;
211 _BlendShapeDataCache _blendShapeDataCache;
213 class _JointInfluencesDataCache
217 _JointInfluencesDataCache(
218 HdContainerDataSourceHandle
const &primSource,
219 HdContainerDataSourceHandle
const &skeletonPrimSource);
221 Handle _Compute()
override;
223 HdContainerDataSourceHandle
const _primSource;
224 HdContainerDataSourceHandle
const _skeletonPrimSource;
226 _JointInfluencesDataCache _jointInfluencesDataCache;
231PXR_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.
Abstract interface to scene data.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
A prim data source providing resolved data for a points based prim (mesh, basisCurves,...
USDSKELIMAGING_API std::shared_ptr< UsdSkelImagingBlendShapeData > GetBlendShapeData()
Blend shape data computed from primvars, skel bindings and skeleton.
bool HasExtComputations() const
Should the points for this primvar be given by an ext computation or from the primvars schema.
USDSKELIMAGING_API std::shared_ptr< UsdSkelImagingJointInfluencesData > GetJointInfluencesData()
Joint influences data computed from primvars.
const UsdSkelImagingResolvedSkeletonSchema & GetResolvedSkeletonSchema()
Resolved skeleton of prim in the input scene.
static USDSKELIMAGING_API Handle New(HdSceneIndexBaseRefPtr const &sceneIndex, SdfPath primPath, HdContainerDataSourceHandle primSource)
C'tor.
USDSKELIMAGING_API HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
const HdPrimvarsSchema & GetPrimvars() const
Primvars of prim in the input scene.
static USDSKELIMAGING_API const HdDataSourceLocatorSet & GetDependendendOnDataSourceLocators()
Data source locators (on this prim) that this prim depends on.
USDSKELIMAGING_API bool ProcessDirtyLocators(const TfToken &dirtiedPrimType, const HdDataSourceLocatorSet &dirtyLocators, HdSceneIndexObserver::DirtiedPrimEntries *entries)
Dirty internal structures in response to dirty locators for the target (resolved) skeleton prim (dirt...
const VtArray< SdfPath > & GetBlendShapeTargetPaths() const
Paths to BlendShape prims.
const SdfPath & GetPrimPath() const
Path of prim in input scene (and for prim this data source is for).
USDSKELIMAGING_API TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
USDSKELIMAGING_API HdMatrixDataSourceHandle GetPrimWorldToLocal() const
Typed sampled data source for the inverse of the xform matrix of the prim in the input scene.
const SdfPath & GetSkeletonPath() const
Path of bound skeleton.
const TfToken & GetSkinningMethod() const
Skinning method computed from corresponding primvar.
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.
Standard pointer typedefs.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Data for skinned prim to compute the skel ext computation inputs related to blend shapes.
Some of the data feeding into the ext computations to skin a prim.
std::vector< TfToken > TfTokenVector
Convenience types.