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"
14#include "pxr/usdImaging/usdSkelImaging/xformResolver.h"
17#include "pxr/imaging/hd/sceneIndexObserver.h"
21PXR_NAMESPACE_OPEN_SCOPE
39 ,
public std::enable_shared_from_this<
40 UsdSkelImagingDataSourceResolvedPointsBasedPrim>
56 HdSceneIndexBaseRefPtr
const &sceneIndex,
58 HdContainerDataSourceHandle primSource);
67 HdDataSourceBaseHandle
Get(
const TfToken &name)
override;
77 return _blendShapeTargetPaths;
90 const HdPrimvarsSchema &
GetPrimvars()
const {
return _primvars; }
94 return _resolvedSkeletonSchema;
113 return _skinningMethod;
123 _resolvedSkeletonSchema &&
129 _primPath != _skeletonPath &&
160 const TfToken &dirtiedPrimType,
167 HdSceneIndexBaseRefPtr
const &sceneIndex,
169 HdContainerDataSourceHandle primSource,
173 HdContainerDataSourceHandle skeletonPrimSource,
177 _ProcessDirtyLocators(
183 _ProcessDirtySkeletonLocators(
189 _ProcessDirtySkelBlendShapeLocators(
195 _ProcessDirtyInstancerLocators(
201 HdSceneIndexBaseRefPtr
const _sceneIndex;
205 HdContainerDataSourceHandle
const _primSource;
206 const bool _hasSkelRoot;
208 HdPrimvarsSchema
const _primvars;
212 HdContainerDataSourceHandle
const _skeletonPrimSource;
215 class _BlendShapeDataCache
219 _BlendShapeDataCache(
220 HdSceneIndexBaseRefPtr
const &sceneIndex,
223 Handle _Compute()
override;
225 HdSceneIndexBaseRefPtr
const _sceneIndex;
228 _BlendShapeDataCache _blendShapeDataCache;
230 class _JointInfluencesDataCache
234 _JointInfluencesDataCache(
235 HdContainerDataSourceHandle
const &primSource,
236 HdContainerDataSourceHandle
const &skeletonPrimSource);
238 Handle _Compute()
override;
240 HdContainerDataSourceHandle
const _primSource;
241 HdContainerDataSourceHandle
const _skeletonPrimSource;
243 _JointInfluencesDataCache _jointInfluencesDataCache;
251PXR_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 HdMatrixDataSourceHandle GetCommonSpaceToPrimLocal() const
Transfrom to go from common space (as defined by UsdSkelImagingDataSourceXformResolver) to the local ...
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.
const SdfPath & GetSkeletonPath() const
Path of bound skeleton.
const VtArray< SdfPath > & GetInstancerPaths() const
Paths to instancers instancing this prim - not including ones outside the skel root.
const TfToken & GetSkinningMethod() const
Skinning method computed from corresponding primvar.
Resolved data for a skeleton and the targeted skelAnim.
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.