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
266{
267public:
271 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
272
277 explicit UsdGeomPointInstancer(const UsdPrim& prim=UsdPrim())
278 : UsdGeomBoundable(prim)
279 {
280 }
281
285 explicit UsdGeomPointInstancer(const UsdSchemaBase& schemaObj)
286 : UsdGeomBoundable(schemaObj)
287 {
288 }
289
291 USDGEOM_API
293
297 USDGEOM_API
298 static const TfTokenVector &
299 GetSchemaAttributeNames(bool includeInherited=true);
300
310 USDGEOM_API
312 Get(const UsdStagePtr &stage, const SdfPath &path);
313
336 USDGEOM_API
338 Define(const UsdStagePtr &stage, const SdfPath &path);
339
340protected:
344 USDGEOM_API
346
347private:
348 // needs to invoke _GetStaticTfType.
349 friend class UsdSchemaRegistry;
350 USDGEOM_API
351 static const TfType &_GetStaticTfType();
352
353 static bool _IsTypedSchema();
354
355 // override SchemaBase virtuals.
356 USDGEOM_API
357 const TfType &_GetTfType() const override;
358
359public:
360 // --------------------------------------------------------------------- //
361 // PROTOINDICES
362 // --------------------------------------------------------------------- //
373 USDGEOM_API
375
381 USDGEOM_API
382 UsdAttribute CreateProtoIndicesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
383
384public:
385 // --------------------------------------------------------------------- //
386 // IDS
387 // --------------------------------------------------------------------- //
400 USDGEOM_API
402
408 USDGEOM_API
409 UsdAttribute CreateIdsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
410
411public:
412 // --------------------------------------------------------------------- //
413 // POSITIONS
414 // --------------------------------------------------------------------- //
423 USDGEOM_API
425
431 USDGEOM_API
432 UsdAttribute CreatePositionsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
433
434public:
435 // --------------------------------------------------------------------- //
436 // ORIENTATIONS
437 // --------------------------------------------------------------------- //
456 USDGEOM_API
458
464 USDGEOM_API
465 UsdAttribute CreateOrientationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
466
467public:
468 // --------------------------------------------------------------------- //
469 // ORIENTATIONSF
470 // --------------------------------------------------------------------- //
491 USDGEOM_API
493
499 USDGEOM_API
500 UsdAttribute CreateOrientationsfAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
501
502public:
503 // --------------------------------------------------------------------- //
504 // SCALES
505 // --------------------------------------------------------------------- //
516 USDGEOM_API
518
524 USDGEOM_API
525 UsdAttribute CreateScalesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
526
527public:
528 // --------------------------------------------------------------------- //
529 // VELOCITIES
530 // --------------------------------------------------------------------- //
548 USDGEOM_API
550
556 USDGEOM_API
557 UsdAttribute CreateVelocitiesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
558
559public:
560 // --------------------------------------------------------------------- //
561 // ACCELERATIONS
562 // --------------------------------------------------------------------- //
575 USDGEOM_API
577
583 USDGEOM_API
584 UsdAttribute CreateAccelerationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
585
586public:
587 // --------------------------------------------------------------------- //
588 // ANGULARVELOCITIES
589 // --------------------------------------------------------------------- //
604 USDGEOM_API
606
612 USDGEOM_API
613 UsdAttribute CreateAngularVelocitiesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
614
615public:
616 // --------------------------------------------------------------------- //
617 // INVISIBLEIDS
618 // --------------------------------------------------------------------- //
627 USDGEOM_API
629
635 USDGEOM_API
636 UsdAttribute CreateInvisibleIdsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
637
638public:
639 // --------------------------------------------------------------------- //
640 // PROTOTYPES
641 // --------------------------------------------------------------------- //
650 USDGEOM_API
652
655 USDGEOM_API
657
658public:
659 // ===================================================================== //
660 // Feel free to add custom code below this line, it will be preserved by
661 // the code generator.
662 //
663 // Just remember to:
664 // - Close the class declaration with };
665 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
666 // - Close the include guard with #endif
667 // ===================================================================== //
668 // --(BEGIN CUSTOM CODE)--
669
670 // --------------------------------------------------------------------- //
674 // --------------------------------------------------------------------- //
675
682 USDGEOM_API
683 bool ActivateId(int64_t id) const;
684
691 USDGEOM_API
692 bool ActivateIds(VtInt64Array const &ids) const;
693
699 USDGEOM_API
700 bool ActivateAllIds() const;
701
707 USDGEOM_API
708 bool DeactivateId(int64_t id) const;
709
715 USDGEOM_API
716 bool DeactivateIds(VtInt64Array const &ids) const;
717
718
729 USDGEOM_API
730 bool VisId(int64_t id, UsdTimeCode const &time) const;
731
742 USDGEOM_API
743 bool VisIds(VtInt64Array const &ids, UsdTimeCode const &time) const;
744
751 USDGEOM_API
752 bool VisAllIds(UsdTimeCode const &time) const;
753
762 USDGEOM_API
763 bool InvisId(int64_t id, UsdTimeCode const &time) const;
764
773 USDGEOM_API
774 bool InvisIds(VtInt64Array const &ids, UsdTimeCode const &time) const;
775
793 USDGEOM_API
794 std::vector<bool> ComputeMaskAtTime(UsdTimeCode time,
795 VtInt64Array const *ids = nullptr) const;
796
809 template <class T>
810 static bool ApplyMaskToArray(std::vector<bool> const &mask,
811 VtArray<T> *dataArray,
812 const int elementSize = 1);
813
822 USDGEOM_API
823 bool UsesOrientationsf(UsdAttribute *rotationsAttr) const;
824
833 USDGEOM_API
834 bool UsesOrientationsf(TfToken *rotationsToken = nullptr) const;
835
836 // --------------------------------------------------------------------- //
838 // --------------------------------------------------------------------- //
839
847 };
848
849
858 };
859
860
917 USDGEOM_API
918 bool
920 VtArray<GfMatrix4d>* xforms,
921 const UsdTimeCode time,
922 const UsdTimeCode baseTime,
923 const ProtoXformInclusion doProtoXforms = IncludeProtoXform,
924 const MaskApplication applyMask = ApplyMask) const;
925
933 USDGEOM_API
934 bool
936 std::vector<VtArray<GfMatrix4d>>* xformsArray,
937 const std::vector<UsdTimeCode>& times,
938 const UsdTimeCode baseTime,
939 const ProtoXformInclusion doProtoXforms = IncludeProtoXform,
940 const MaskApplication applyMask = ApplyMask) const;
941
991 USDGEOM_API
992 static bool
994 VtArray<GfMatrix4d>* xforms,
995 UsdStageWeakPtr& stage,
996 UsdTimeCode time,
997 const VtIntArray& protoIndices,
998 const VtVec3fArray& positions,
999 const VtVec3fArray& velocities,
1000 UsdTimeCode velocitiesSampleTime,
1001 const VtVec3fArray& accelerations,
1002 const VtVec3fArray& scales,
1003 const VtQuatfArray& orientations,
1004 const VtVec3fArray& angularVelocities,
1005 UsdTimeCode angularVelocitiesSampleTime,
1006 const SdfPathVector& protoPaths,
1007 const std::vector<bool>& mask,
1008 float velocityScale = 1.0);
1009
1014 USDGEOM_API
1015 static bool
1017 VtArray<GfMatrix4d>* xforms,
1018 UsdStageWeakPtr& stage,
1019 UsdTimeCode time,
1020 const VtIntArray& protoIndices,
1021 const VtVec3fArray& positions,
1022 const VtVec3fArray& velocities,
1023 UsdTimeCode velocitiesSampleTime,
1024 const VtVec3fArray& accelerations,
1025 const VtVec3fArray& scales,
1026 const VtQuathArray& orientations,
1027 const VtVec3fArray& angularVelocities,
1028 UsdTimeCode angularVelocitiesSampleTime,
1029 const SdfPathVector& protoPaths,
1030 const std::vector<bool>& mask,
1031 float velocityScale = 1.0);
1032
1033private:
1034
1035 // Get the authored prototype paths. Fail if there are no authored prototype
1036 // paths or the prototype indices are out of bounds.
1037 bool _GetPrototypePathsForInstanceTransforms(
1038 const VtIntArray& protoIndices,
1039 SdfPathVector* protoPaths) const;
1040
1041 // Get the authored prototype indices for instance transform computation.
1042 // Fail if prototype indices are not authored.
1043 bool _GetProtoIndicesForInstanceTransforms(
1044 UsdTimeCode baseTime,
1045 VtIntArray* protoIndices) const;
1046
1047 // Fetches data from attributes specific to UsdGeomPointInstancer
1048 // required for instance transform calculations; this includes
1049 // protoIndices, protoPaths, and the mask.
1050 bool _ComputePointInstancerAttributesPreamble(
1051 const UsdTimeCode baseTime,
1052 const ProtoXformInclusion doProtoXforms,
1053 const MaskApplication applyMask,
1054 VtIntArray* protoIndices,
1055 SdfPathVector* protoPaths,
1056 std::vector<bool>* mask) const;
1057
1063 template<class QuatType>
1064 bool _DoComputeInstanceTransformsAtTimes(
1065 std::vector<VtArray<GfMatrix4d>>* xformsArray,
1066 const std::vector<UsdTimeCode>& times,
1067 const UsdTimeCode baseTime,
1068 const ProtoXformInclusion doProtoXforms,
1069 const MaskApplication applyMask,
1070 const UsdAttribute orientationsAttr) const;
1071
1073 template <class QuatType>
1074 static bool _DoComputeInstanceTransformsAtTime(
1075 VtArray<GfMatrix4d>* xforms,
1076 UsdStageWeakPtr& stage,
1077 UsdTimeCode time,
1078 const VtIntArray& protoIndices,
1079 const VtVec3fArray& positions,
1080 const VtVec3fArray& velocities,
1081 UsdTimeCode velocitiesSampleTime,
1082 const VtVec3fArray& accelerations,
1083 const VtVec3fArray& scales,
1084 const VtArray<QuatType>& orientations,
1085 const VtVec3fArray& angularVelocities,
1086 UsdTimeCode angularVelocitiesSampleTime,
1087 const SdfPathVector& protoPaths,
1088 const std::vector<bool>& mask,
1089 float velocityScale = 1.0);
1090
1091public:
1092
1128 USDGEOM_API
1130 VtVec3fArray* extent,
1131 const UsdTimeCode time,
1132 const UsdTimeCode baseTime) const;
1133
1136 USDGEOM_API
1138 VtVec3fArray* extent,
1139 const UsdTimeCode time,
1140 const UsdTimeCode baseTime,
1141 const GfMatrix4d& transform) const;
1142
1156 USDGEOM_API
1158 std::vector<VtVec3fArray>* extents,
1159 const std::vector<UsdTimeCode>& times,
1160 const UsdTimeCode baseTime) const;
1161
1165 USDGEOM_API
1167 std::vector<VtVec3fArray>* extents,
1168 const std::vector<UsdTimeCode>& times,
1169 const UsdTimeCode baseTime,
1170 const GfMatrix4d& transform) const;
1171
1177 USDGEOM_API
1179
1180private:
1181
1182 bool _ComputeExtentAtTimePreamble(
1183 UsdTimeCode baseTime,
1184 VtIntArray* protoIndices,
1185 std::vector<bool>* mask,
1186 UsdRelationship* prototypes,
1187 SdfPathVector* protoPaths) const;
1188
1189 bool _ComputeExtentFromTransforms(
1190 VtVec3fArray* extent,
1191 const VtIntArray& protoIndices,
1192 const std::vector<bool>& mask,
1193 const UsdRelationship& prototypes,
1194 const SdfPathVector& protoPaths,
1195 const VtMatrix4dArray& instanceTransforms,
1196 UsdTimeCode time,
1197 const GfMatrix4d* transform) const;
1198
1199 bool _ComputeExtentAtTime(
1200 VtVec3fArray* extent,
1201 const UsdTimeCode time,
1202 const UsdTimeCode baseTime,
1203 const GfMatrix4d* transform) const;
1204
1205 bool _ComputeExtentAtTimes(
1206 std::vector<VtVec3fArray>* extent,
1207 const std::vector<UsdTimeCode>& times,
1208 const UsdTimeCode baseTime,
1209 const GfMatrix4d* transform) const;
1210};
1211
1212template <class T>
1213bool
1214UsdGeomPointInstancer::ApplyMaskToArray(std::vector<bool> const &mask,
1215 VtArray<T> *dataArray,
1216 const int elementSize)
1217{
1218 if (!dataArray) {
1219 TF_CODING_ERROR("NULL dataArray.");
1220 return false;
1221 }
1222 size_t maskSize = mask.size();
1223 if (maskSize == 0 || dataArray->size() == (size_t)elementSize){
1224 return true;
1225 }
1226 else if ((maskSize * elementSize) != dataArray->size()){
1227 TF_WARN("Input mask's size (%zu) is not compatible with the "
1228 "input dataArray (%zu) and elementSize (%d).",
1229 maskSize, dataArray->size(), elementSize);
1230 return false;
1231 }
1232
1233 T* beginData = dataArray->data();
1234 T* currData = beginData;
1235 size_t numPreserved = 0;
1236 for (size_t i = 0; i < maskSize; ++i) {
1237 // XXX Could add a fast-path for elementSize == 1 ?
1238 if (mask[i]) {
1239 for (int j = 0; j < elementSize; ++j) {
1240 *currData = beginData[i + j];
1241 ++currData;
1242 }
1243 numPreserved += elementSize;
1244 }
1245 }
1246 if (numPreserved < dataArray->size()) {
1247 dataArray->resize(numPreserved);
1248 }
1249 return true;
1250}
1251
1254USDGEOM_API
1255bool
1257
1261USDGEOM_API
1262bool
1263UsdGeomPointInstancerSetOrMergeOverOp(std::vector<int64_t> const &items,
1264 SdfListOpType op,
1265 UsdPrim const &prim,
1266 TfToken const &metadataName);
1267
1268PXR_NAMESPACE_CLOSE_SCOPE
1269
1270#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:71
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.
ProtoXformInclusion
Encodes whether to include each prototype's root prim's transformation as the most-local component of...
@ ExcludeProtoXform
Exclude the transform on the proto's root.
@ IncludeProtoXform
Include the transform on the proto's root.
MaskApplication
Encodes whether to evaluate and apply the PointInstancer's mask to computed results.
@ 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 ...
Definition: relationship.h:111
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:72
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
Definition: timeCode.h:113
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
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:68
#define TF_WARN(...)
Issue a warning, but continue execution.
Definition: diagnostic.h:132
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...
USDGEOM_API bool UsdGeomPointInstancerApplyNewStyleListOps()
Returns true if list ops should be composed with SdfListOp::ApplyOperations() Returns false if list o...
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:440