Loading...
Searching...
No Matches
pointInstancer.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef USDGEOM_GENERATED_POINTINSTANCER_H
8#define USDGEOM_GENERATED_POINTINSTANCER_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdGeom/api.h"
15#include "pxr/usd/usd/prim.h"
16#include "pxr/usd/usd/stage.h"
18
19#include "pxr/base/vt/value.h"
20
21#include "pxr/base/gf/vec3d.h"
22#include "pxr/base/gf/vec3f.h"
24
25#include "pxr/base/tf/token.h"
26#include "pxr/base/tf/type.h"
27
28PXR_NAMESPACE_OPEN_SCOPE
29
30class SdfAssetPath;
31
32// -------------------------------------------------------------------------- //
33// POINTINSTANCER //
34// -------------------------------------------------------------------------- //
35
260{
261public:
266
271 explicit UsdGeomPointInstancer(const UsdPrim& prim=UsdPrim())
272 : UsdGeomBoundable(prim)
273 {
274 }
275
279 explicit UsdGeomPointInstancer(const UsdSchemaBase& schemaObj)
280 : UsdGeomBoundable(schemaObj)
281 {
282 }
283
285 USDGEOM_API
287
291 USDGEOM_API
292 static const TfTokenVector &
293 GetSchemaAttributeNames(bool includeInherited=true);
294
304 USDGEOM_API
306 Get(const UsdStagePtr &stage, const SdfPath &path);
307
330 USDGEOM_API
332 Define(const UsdStagePtr &stage, const SdfPath &path);
333
334protected:
338 USDGEOM_API
340
341private:
342 // needs to invoke _GetStaticTfType.
343 friend class UsdSchemaRegistry;
344 USDGEOM_API
345 static const TfType &_GetStaticTfType();
346
347 static bool _IsTypedSchema();
348
349 // override SchemaBase virtuals.
350 USDGEOM_API
351 const TfType &_GetTfType() const override;
352
353public:
354 // --------------------------------------------------------------------- //
355 // PROTOINDICES
356 // --------------------------------------------------------------------- //
367 USDGEOM_API
369
375 USDGEOM_API
376 UsdAttribute CreateProtoIndicesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
377
378public:
379 // --------------------------------------------------------------------- //
380 // IDS
381 // --------------------------------------------------------------------- //
394 USDGEOM_API
396
402 USDGEOM_API
403 UsdAttribute CreateIdsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
404
405public:
406 // --------------------------------------------------------------------- //
407 // POSITIONS
408 // --------------------------------------------------------------------- //
417 USDGEOM_API
419
425 USDGEOM_API
426 UsdAttribute CreatePositionsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
427
428public:
429 // --------------------------------------------------------------------- //
430 // ORIENTATIONS
431 // --------------------------------------------------------------------- //
450 USDGEOM_API
452
458 USDGEOM_API
459 UsdAttribute CreateOrientationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
460
461public:
462 // --------------------------------------------------------------------- //
463 // ORIENTATIONSF
464 // --------------------------------------------------------------------- //
485 USDGEOM_API
487
493 USDGEOM_API
494 UsdAttribute CreateOrientationsfAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
495
496public:
497 // --------------------------------------------------------------------- //
498 // SCALES
499 // --------------------------------------------------------------------- //
510 USDGEOM_API
512
518 USDGEOM_API
519 UsdAttribute CreateScalesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
520
521public:
522 // --------------------------------------------------------------------- //
523 // VELOCITIES
524 // --------------------------------------------------------------------- //
542 USDGEOM_API
544
550 USDGEOM_API
551 UsdAttribute CreateVelocitiesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
552
553public:
554 // --------------------------------------------------------------------- //
555 // ACCELERATIONS
556 // --------------------------------------------------------------------- //
569 USDGEOM_API
571
577 USDGEOM_API
578 UsdAttribute CreateAccelerationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
579
580public:
581 // --------------------------------------------------------------------- //
582 // ANGULARVELOCITIES
583 // --------------------------------------------------------------------- //
598 USDGEOM_API
600
606 USDGEOM_API
607 UsdAttribute CreateAngularVelocitiesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
608
609public:
610 // --------------------------------------------------------------------- //
611 // INVISIBLEIDS
612 // --------------------------------------------------------------------- //
621 USDGEOM_API
623
629 USDGEOM_API
630 UsdAttribute CreateInvisibleIdsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
631
632public:
633 // --------------------------------------------------------------------- //
634 // PROTOTYPES
635 // --------------------------------------------------------------------- //
644 USDGEOM_API
646
649 USDGEOM_API
651
652public:
653 // ===================================================================== //
654 // Feel free to add custom code below this line, it will be preserved by
655 // the code generator.
656 //
657 // Just remember to:
658 // - Close the class declaration with };
659 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
660 // - Close the include guard with #endif
661 // ===================================================================== //
662 // --(BEGIN CUSTOM CODE)--
663
664 // --------------------------------------------------------------------- //
668 // --------------------------------------------------------------------- //
669
676 USDGEOM_API
677 bool ActivateId(int64_t id) const;
678
685 USDGEOM_API
686 bool ActivateIds(VtInt64Array const &ids) const;
687
693 USDGEOM_API
694 bool ActivateAllIds() const;
695
701 USDGEOM_API
702 bool DeactivateId(int64_t id) const;
703
709 USDGEOM_API
710 bool DeactivateIds(VtInt64Array const &ids) const;
711
712
723 USDGEOM_API
724 bool VisId(int64_t id, UsdTimeCode const &time) const;
725
736 USDGEOM_API
737 bool VisIds(VtInt64Array const &ids, UsdTimeCode const &time) const;
738
745 USDGEOM_API
746 bool VisAllIds(UsdTimeCode const &time) const;
747
756 USDGEOM_API
757 bool InvisId(int64_t id, UsdTimeCode const &time) const;
758
767 USDGEOM_API
768 bool InvisIds(VtInt64Array const &ids, UsdTimeCode const &time) const;
769
787 USDGEOM_API
788 std::vector<bool> ComputeMaskAtTime(UsdTimeCode time,
789 VtInt64Array const *ids = nullptr) const;
790
803 template <class T>
804 static bool ApplyMaskToArray(std::vector<bool> const &mask,
805 VtArray<T> *dataArray,
806 const int elementSize = 1);
807
816 USDGEOM_API
817 bool UsesOrientationsf(UsdAttribute *rotationsAttr) const;
818
827 USDGEOM_API
828 bool UsesOrientationsf(TfToken *rotationsToken = nullptr) const;
829
830 // --------------------------------------------------------------------- //
832 // --------------------------------------------------------------------- //
833
844
845
856
857
914 USDGEOM_API
915 bool
917 VtArray<GfMatrix4d>* xforms,
918 const UsdTimeCode time,
919 const UsdTimeCode baseTime,
920 const ProtoXformInclusion doProtoXforms = IncludeProtoXform,
921 const MaskApplication applyMask = ApplyMask) const;
922
930 USDGEOM_API
931 bool
933 std::vector<VtArray<GfMatrix4d>>* xformsArray,
934 const std::vector<UsdTimeCode>& times,
935 const UsdTimeCode baseTime,
936 const ProtoXformInclusion doProtoXforms = IncludeProtoXform,
937 const MaskApplication applyMask = ApplyMask) const;
938
988 USDGEOM_API
989 static bool
991 VtArray<GfMatrix4d>* xforms,
992 UsdStageWeakPtr& stage,
993 UsdTimeCode time,
994 const VtIntArray& protoIndices,
995 const VtVec3fArray& positions,
996 const VtVec3fArray& velocities,
997 UsdTimeCode velocitiesSampleTime,
998 const VtVec3fArray& accelerations,
999 const VtVec3fArray& scales,
1000 const VtQuatfArray& orientations,
1001 const VtVec3fArray& angularVelocities,
1002 UsdTimeCode angularVelocitiesSampleTime,
1003 const SdfPathVector& protoPaths,
1004 const std::vector<bool>& mask,
1005 float velocityScale = 1.0);
1006
1011 USDGEOM_API
1012 static bool
1014 VtArray<GfMatrix4d>* xforms,
1015 UsdStageWeakPtr& stage,
1016 UsdTimeCode time,
1017 const VtIntArray& protoIndices,
1018 const VtVec3fArray& positions,
1019 const VtVec3fArray& velocities,
1020 UsdTimeCode velocitiesSampleTime,
1021 const VtVec3fArray& accelerations,
1022 const VtVec3fArray& scales,
1023 const VtQuathArray& orientations,
1024 const VtVec3fArray& angularVelocities,
1025 UsdTimeCode angularVelocitiesSampleTime,
1026 const SdfPathVector& protoPaths,
1027 const std::vector<bool>& mask,
1028 float velocityScale = 1.0);
1029
1030private:
1031
1032 // Get the authored prototype paths. Fail if there are no authored prototype
1033 // paths or the prototype indices are out of bounds.
1034 bool _GetPrototypePathsForInstanceTransforms(
1035 const VtIntArray& protoIndices,
1036 SdfPathVector* protoPaths) const;
1037
1038 // Get the authored prototype indices for instance transform computation.
1039 // Fail if prototype indices are not authored.
1040 bool _GetProtoIndicesForInstanceTransforms(
1041 UsdTimeCode baseTime,
1042 VtIntArray* protoIndices) const;
1043
1044 // Fetches data from attributes specific to UsdGeomPointInstancer
1045 // required for instance transform calculations; this includes
1046 // protoIndices, protoPaths, and the mask.
1047 bool _ComputePointInstancerAttributesPreamble(
1048 const UsdTimeCode baseTime,
1049 const ProtoXformInclusion doProtoXforms,
1050 const MaskApplication applyMask,
1051 VtIntArray* protoIndices,
1052 SdfPathVector* protoPaths,
1053 std::vector<bool>* mask) const;
1054
1060 template<class QuatType>
1061 bool _DoComputeInstanceTransformsAtTimes(
1062 std::vector<VtArray<GfMatrix4d>>* xformsArray,
1063 const std::vector<UsdTimeCode>& times,
1064 const UsdTimeCode baseTime,
1065 const ProtoXformInclusion doProtoXforms,
1066 const MaskApplication applyMask,
1067 const UsdAttribute orientationsAttr) const;
1068
1070 template <class QuatType>
1071 static bool _DoComputeInstanceTransformsAtTime(
1072 VtArray<GfMatrix4d>* xforms,
1073 UsdStageWeakPtr& stage,
1074 UsdTimeCode time,
1075 const VtIntArray& protoIndices,
1076 const VtVec3fArray& positions,
1077 const VtVec3fArray& velocities,
1078 UsdTimeCode velocitiesSampleTime,
1079 const VtVec3fArray& accelerations,
1080 const VtVec3fArray& scales,
1081 const VtArray<QuatType>& orientations,
1082 const VtVec3fArray& angularVelocities,
1083 UsdTimeCode angularVelocitiesSampleTime,
1084 const SdfPathVector& protoPaths,
1085 const std::vector<bool>& mask,
1086 float velocityScale = 1.0);
1087
1088public:
1089
1125 USDGEOM_API
1127 VtVec3fArray* extent,
1128 const UsdTimeCode time,
1129 const UsdTimeCode baseTime) const;
1130
1133 USDGEOM_API
1135 VtVec3fArray* extent,
1136 const UsdTimeCode time,
1137 const UsdTimeCode baseTime,
1138 const GfMatrix4d& transform) const;
1139
1153 USDGEOM_API
1155 std::vector<VtVec3fArray>* extents,
1156 const std::vector<UsdTimeCode>& times,
1157 const UsdTimeCode baseTime) const;
1158
1162 USDGEOM_API
1164 std::vector<VtVec3fArray>* extents,
1165 const std::vector<UsdTimeCode>& times,
1166 const UsdTimeCode baseTime,
1167 const GfMatrix4d& transform) const;
1168
1174 USDGEOM_API
1176
1177private:
1178
1179 bool _ComputeExtentAtTimePreamble(
1180 UsdTimeCode baseTime,
1181 VtIntArray* protoIndices,
1182 std::vector<bool>* mask,
1183 UsdRelationship* prototypes,
1184 SdfPathVector* protoPaths) const;
1185
1186 bool _ComputeExtentFromTransforms(
1187 VtVec3fArray* extent,
1188 const VtIntArray& protoIndices,
1189 const std::vector<bool>& mask,
1190 const UsdRelationship& prototypes,
1191 const SdfPathVector& protoPaths,
1192 const VtMatrix4dArray& instanceTransforms,
1193 UsdTimeCode time,
1194 const GfMatrix4d* transform) const;
1195
1196 bool _ComputeExtentAtTime(
1197 VtVec3fArray* extent,
1198 const UsdTimeCode time,
1199 const UsdTimeCode baseTime,
1200 const GfMatrix4d* transform) const;
1201
1202 bool _ComputeExtentAtTimes(
1203 std::vector<VtVec3fArray>* extent,
1204 const std::vector<UsdTimeCode>& times,
1205 const UsdTimeCode baseTime,
1206 const GfMatrix4d* transform) const;
1207};
1208
1209template <class T>
1210bool
1211UsdGeomPointInstancer::ApplyMaskToArray(std::vector<bool> const &mask,
1212 VtArray<T> *dataArray,
1213 const int elementSize)
1214{
1215 if (!dataArray) {
1216 TF_CODING_ERROR("NULL dataArray.");
1217 return false;
1218 }
1219 size_t maskSize = mask.size();
1220 if (maskSize == 0 || dataArray->size() == (size_t)elementSize){
1221 return true;
1222 }
1223 else if ((maskSize * elementSize) != dataArray->size()){
1224 TF_WARN("Input mask's size (%zu) is not compatible with the "
1225 "input dataArray (%zu) and elementSize (%d).",
1226 maskSize, dataArray->size(), elementSize);
1227 return false;
1228 }
1229
1230 T* beginData = dataArray->data();
1231 T* currData = beginData;
1232 size_t numPreserved = 0;
1233 for (size_t i = 0; i < maskSize; ++i) {
1234 // XXX Could add a fast-path for elementSize == 1 ?
1235 if (mask[i]) {
1236 for (int j = 0; j < elementSize; ++j) {
1237 *currData = beginData[i + j];
1238 ++currData;
1239 }
1240 numPreserved += elementSize;
1241 }
1242 }
1243 if (numPreserved < dataArray->size()) {
1244 dataArray->resize(numPreserved);
1245 }
1246 return true;
1247}
1248
1252USDGEOM_API
1253bool
1254UsdGeomPointInstancerSetOrMergeOverOp(std::vector<int64_t> const &items,
1255 SdfListOpType op,
1256 UsdPrim const &prim,
1257 TfToken const &metadataName);
1259PXR_NAMESPACE_CLOSE_SCOPE
1260
1261#endif
Stores a 4x4 matrix of double elements.
Definition matrix4d.h:71
Contains an asset path and optional evaluated and resolved paths.
Definition assetPath.h:79
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
TfType represents a dynamic runtime type.
Definition type.h:48
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition attribute.h:183
Boundable introduces the ability for a prim to persistently cache a rectilinear, local-space,...
Definition boundable.h:66
Encodes vectorized instancing of multiple, potentially animated, prototypes (object/instance masters)...
USDGEOM_API UsdAttribute GetScalesAttr() const
If authored, per-instance scale to be applied to each instance, before any rotation is applied.
USDGEOM_API bool VisIds(VtInt64Array const &ids, UsdTimeCode const &time) const
Ensure that the instances identified by ids are visible at time.
USDGEOM_API UsdAttribute CreatePositionsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetPositionsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetProtoIndicesAttr() const
Required property.
USDGEOM_API bool ActivateIds(VtInt64Array const &ids) const
Ensure that the instances identified by ids are active over all time.
USDGEOM_API bool DeactivateIds(VtInt64Array const &ids) const
Ensure that the instances identified by ids are inactive over all time.
USDGEOM_API UsdAttribute CreateAngularVelocitiesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetAngularVelocitiesAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API bool ComputeExtentAtTime(VtVec3fArray *extent, const UsdTimeCode time, const UsdTimeCode baseTime, const GfMatrix4d &transform) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USDGEOM_API UsdAttribute GetVelocitiesAttr() const
If provided, per-instance 'velocities' will be used to compute positions between samples for the 'pos...
USDGEOM_API UsdAttribute GetPositionsAttr() const
Required property.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
UsdGeomPointInstancer(const UsdSchemaBase &schemaObj)
Construct a UsdGeomPointInstancer on the prim held by schemaObj .
USDGEOM_API UsdAttribute CreateScalesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetScalesAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetInvisibleIdsAttr() const
A list of id's to make invisible at the evaluation time.
static bool ApplyMaskToArray(std::vector< bool > const &mask, VtArray< T > *dataArray, const int elementSize=1)
Contract dataArray in-place to contain only the elements whose index in mask is true.
virtual USDGEOM_API ~UsdGeomPointInstancer()
Destructor.
USDGEOM_API UsdRelationship GetPrototypesRel() const
Required property.
USDGEOM_API bool ComputeInstanceTransformsAtTime(VtArray< GfMatrix4d > *xforms, const UsdTimeCode time, const UsdTimeCode baseTime, const ProtoXformInclusion doProtoXforms=IncludeProtoXform, const MaskApplication applyMask=ApplyMask) const
Compute the per-instance, "PointInstancer relative" transforms given the positions,...
static USDGEOM_API bool ComputeInstanceTransformsAtTime(VtArray< GfMatrix4d > *xforms, UsdStageWeakPtr &stage, UsdTimeCode time, const VtIntArray &protoIndices, const VtVec3fArray &positions, const VtVec3fArray &velocities, UsdTimeCode velocitiesSampleTime, const VtVec3fArray &accelerations, const VtVec3fArray &scales, const VtQuatfArray &orientations, const VtVec3fArray &angularVelocities, UsdTimeCode angularVelocitiesSampleTime, const SdfPathVector &protoPaths, const std::vector< bool > &mask, float velocityScale=1.0)
This is an overloaded member function, provided for convenience. It differs from the above function o...
USDGEOM_API UsdAttribute CreateOrientationsfAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetOrientationsfAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API bool ComputeExtentAtTimes(std::vector< VtVec3fArray > *extents, const std::vector< UsdTimeCode > &times, const UsdTimeCode baseTime, const GfMatrix4d &transform) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDGEOM_API std::vector< bool > ComputeMaskAtTime(UsdTimeCode time, VtInt64Array const *ids=nullptr) const
Computes a presence mask to be applied to per-instance data arrays based on authored inactiveIds,...
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDGEOM_API UsdAttribute CreateIdsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetIdsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API bool ActivateAllIds() const
Ensure that all instances are active over all time.
USDGEOM_API UsdAttribute CreateProtoIndicesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetProtoIndicesAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDGEOM_API UsdGeomPointInstancer Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomPointInstancer holding the prim adhering to this schema at path on stage.
USDGEOM_API bool ActivateId(int64_t id) const
Ensure that the instance identified by id is active over all time.
USDGEOM_API UsdAttribute CreateOrientationsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetOrientationsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API bool ComputeExtentAtTime(VtVec3fArray *extent, const UsdTimeCode time, const UsdTimeCode baseTime) const
Compute the extent of the point instancer based on the per-instance, "PointInstancer relative" transf...
USDGEOM_API size_t GetInstanceCount(UsdTimeCode timeCode=UsdTimeCode::Default()) const
Returns the number of instances as defined by the size of the protoIndices array at timeCode.
USDGEOM_API bool VisAllIds(UsdTimeCode const &time) const
Ensure that all instances are visible at time.
static USDGEOM_API UsdGeomPointInstancer Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDGEOM_API bool InvisId(int64_t id, UsdTimeCode const &time) const
Ensure that the instance identified by id is invisible at time.
@ ExcludeProtoXform
Exclude the transform on the proto's root.
@ IncludeProtoXform
Include the transform on the proto's root.
@ ApplyMask
Compute and apply the PointInstancer mask.
@ IgnoreMask
Ignore the PointInstancer mask.
USDGEOM_API bool UsesOrientationsf(UsdAttribute *rotationsAttr) const
Determines if we should prefer orientationsf over orientations based on whether or not orientationsf ...
USDGEOM_API bool InvisIds(VtInt64Array const &ids, UsdTimeCode const &time) const
Ensure that the instances identified by ids are invisible at time.
USDGEOM_API UsdAttribute CreateVelocitiesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVelocitiesAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetIdsAttr() const
Ids are optional; if authored, the ids array should be the same length as the protoIndices array,...
USDGEOM_API UsdAttribute CreateInvisibleIdsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetInvisibleIdsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API bool VisId(int64_t id, UsdTimeCode const &time) const
Ensure that the instance identified by id is visible at time.
USDGEOM_API UsdAttribute GetAccelerationsAttr() const
If authored, per-instance 'accelerations' will be used with velocities to compute positions between s...
USDGEOM_API bool ComputeExtentAtTimes(std::vector< VtVec3fArray > *extents, const std::vector< UsdTimeCode > &times, const UsdTimeCode baseTime) const
Compute the extent of the point instancer as in ComputeExtentAtTime , but across multiple times .
USDGEOM_API bool ComputeInstanceTransformsAtTimes(std::vector< VtArray< GfMatrix4d > > *xformsArray, const std::vector< UsdTimeCode > &times, const UsdTimeCode baseTime, const ProtoXformInclusion doProtoXforms=IncludeProtoXform, const MaskApplication applyMask=ApplyMask) const
Compute the per-instance transforms as in ComputeInstanceTransformsAtTime, but using multiple sample ...
USDGEOM_API UsdAttribute GetOrientationsAttr() const
If authored, per-instance orientation of each instance about its prototype's origin,...
USDGEOM_API UsdAttribute CreateAccelerationsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetAccelerationsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetOrientationsfAttr() const
If authored, per-instance orientation of each instance about its prototype's origin,...
UsdGeomPointInstancer(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomPointInstancer on UsdPrim prim .
USDGEOM_API bool DeactivateId(int64_t id) const
Ensure that the instance identified by id is inactive over all time.
USDGEOM_API UsdAttribute GetAngularVelocitiesAttr() const
If authored, per-instance angular velocity vector to be used for interoplating orientations.
USDGEOM_API UsdRelationship CreatePrototypesRel() const
See GetPrototypesRel(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition prim.h:117
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
The base class for all schema types in Usd.
Definition schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition timeCode.h:73
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
Definition timeCode.h:114
Represents an arbitrary dimensional rectangular container class.
Definition array.h:213
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition value.h:90
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition common.h:112
@ ConcreteTyped
Represents a concrete typed schema.
size_t size() const
Return the total number of elements in this array.
Definition array.h:474
pointer data()
Return a non-const pointer to this array's data.
Definition array.h:403
void resize(size_t newSize)
Resize this array.
Definition array.h:545
#define TF_CODING_ERROR(fmt, args)
Issue an internal programming error, but continue execution.
Definition diagnostic.h:69
#define TF_WARN(...)
Issue a warning, but continue execution.
Definition diagnostic.h:133
USDGEOM_API bool UsdGeomPointInstancerSetOrMergeOverOp(std::vector< int64_t > const &items, SdfListOpType op, UsdPrim const &prim, TfToken const &metadataName)
Applies a list operation of type op using items over the existing list operation on prim with the nam...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition token.h:489