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;
98 HdMatrix4fArrayDataSourceHandle GetSkinningTransforms();
109 HdFloatArrayDataSourceHandle GetBlendShapeWeights();
118 HdSampledDataSourceHandle GetPoints();
121 HdDataSourceBaseHandle GetGeomBindTransform();
124 HdDataSourceBaseHandle GetHasConstantInfluences();
127 HdDataSourceBaseHandle GetNumInfluencesPerComponent();
130 HdDataSourceBaseHandle GetInfluences();
133 HdDataSourceBaseHandle GetBlendShapeOffsets();
136 HdDataSourceBaseHandle GetBlendShapeOffsetRanges();
139 HdDataSourceBaseHandle GetNumBlendShapeOffsetRanges();
142 HdSampledDataSourceHandle GetNormals();
145 HdSampledDataSourceHandle GetFaceVertexIndices();
148 HdDataSourceBaseHandle GetHasFaceVaryingNormals();
160 return _skinningMethod;
189 const TfToken &dirtiedPrimType,
196 HdSceneIndexBaseRefPtr
const &sceneIndex,
198 HdContainerDataSourceHandle primSource,
202 HdContainerDataSourceHandle skeletonPrimSource,
206 _ProcessDirtyLocators(
213 _ProcessDirtySkeletonLocators(
220 _ProcessDirtySkelBlendShapeLocators(
227 _ProcessDirtyInstancerLocators(
233 HdSceneIndexBaseRefPtr
const _sceneIndex;
237 HdContainerDataSourceHandle
const _primSource;
238 const bool _hasSkelRoot;
240 HdPrimvarsSchema
const _primvars;
244 HdContainerDataSourceHandle
const _skeletonPrimSource;
247 class _BlendShapeDataCache
251 _BlendShapeDataCache(
252 HdSceneIndexBaseRefPtr
const &sceneIndex,
255 Handle _Compute()
override;
257 HdSceneIndexBaseRefPtr
const _sceneIndex;
260 _BlendShapeDataCache _blendShapeDataCache;
262 class _JointInfluencesDataCache
266 _JointInfluencesDataCache(
267 HdContainerDataSourceHandle
const &primSource,
268 HdContainerDataSourceHandle
const &skeletonPrimSource);
270 Handle _Compute()
override;
272 HdContainerDataSourceHandle
const _primSource;
273 HdContainerDataSourceHandle
const _skeletonPrimSource;
275 _JointInfluencesDataCache _jointInfluencesDataCache;
283PXR_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.
USDSKELIMAGING_API HdMatrix3fArrayDataSourceHandle GetSkinningScaleTransforms()
Only valid if GetSkinningMethod() == UsdSkelTokens->dualQuaternion.
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.
USDSKELIMAGING_API HdVec4fArrayDataSourceHandle GetSkinningDualQuats()
Only valid if GetSkinningMethod() == UsdSkelTokens->dualQuaternion.
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.