All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
262{
263public:
267 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
268
273 explicit UsdGeomPointInstancer(const UsdPrim& prim=UsdPrim())
274 : UsdGeomBoundable(prim)
275 {
276 }
277
281 explicit UsdGeomPointInstancer(const UsdSchemaBase& schemaObj)
282 : UsdGeomBoundable(schemaObj)
283 {
284 }
285
287 USDGEOM_API
289
293 USDGEOM_API
294 static const TfTokenVector &
295 GetSchemaAttributeNames(bool includeInherited=true);
296
306 USDGEOM_API
308 Get(const UsdStagePtr &stage, const SdfPath &path);
309
332 USDGEOM_API
334 Define(const UsdStagePtr &stage, const SdfPath &path);
335
336protected:
340 USDGEOM_API
342
343private:
344 // needs to invoke _GetStaticTfType.
345 friend class UsdSchemaRegistry;
346 USDGEOM_API
347 static const TfType &_GetStaticTfType();
348
349 static bool _IsTypedSchema();
350
351 // override SchemaBase virtuals.
352 USDGEOM_API
353 const TfType &_GetTfType() const override;
354
355public:
356 // --------------------------------------------------------------------- //
357 // PROTOINDICES
358 // --------------------------------------------------------------------- //
369 USDGEOM_API
371
377 USDGEOM_API
378 UsdAttribute CreateProtoIndicesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
379
380public:
381 // --------------------------------------------------------------------- //
382 // IDS
383 // --------------------------------------------------------------------- //
396 USDGEOM_API
398
404 USDGEOM_API
405 UsdAttribute CreateIdsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
406
407public:
408 // --------------------------------------------------------------------- //
409 // POSITIONS
410 // --------------------------------------------------------------------- //
419 USDGEOM_API
421
427 USDGEOM_API
428 UsdAttribute CreatePositionsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
429
430public:
431 // --------------------------------------------------------------------- //
432 // ORIENTATIONS
433 // --------------------------------------------------------------------- //
452 USDGEOM_API
454
460 USDGEOM_API
461 UsdAttribute CreateOrientationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
462
463public:
464 // --------------------------------------------------------------------- //
465 // ORIENTATIONSF
466 // --------------------------------------------------------------------- //
487 USDGEOM_API
489
495 USDGEOM_API
496 UsdAttribute CreateOrientationsfAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
497
498public:
499 // --------------------------------------------------------------------- //
500 // SCALES
501 // --------------------------------------------------------------------- //
512 USDGEOM_API
514
520 USDGEOM_API
521 UsdAttribute CreateScalesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
522
523public:
524 // --------------------------------------------------------------------- //
525 // VELOCITIES
526 // --------------------------------------------------------------------- //
544 USDGEOM_API
546
552 USDGEOM_API
553 UsdAttribute CreateVelocitiesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
554
555public:
556 // --------------------------------------------------------------------- //
557 // ACCELERATIONS
558 // --------------------------------------------------------------------- //
571 USDGEOM_API
573
579 USDGEOM_API
580 UsdAttribute CreateAccelerationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
581
582public:
583 // --------------------------------------------------------------------- //
584 // ANGULARVELOCITIES
585 // --------------------------------------------------------------------- //
600 USDGEOM_API
602
608 USDGEOM_API
609 UsdAttribute CreateAngularVelocitiesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
610
611public:
612 // --------------------------------------------------------------------- //
613 // INVISIBLEIDS
614 // --------------------------------------------------------------------- //
623 USDGEOM_API
625
631 USDGEOM_API
632 UsdAttribute CreateInvisibleIdsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
633
634public:
635 // --------------------------------------------------------------------- //
636 // PROTOTYPES
637 // --------------------------------------------------------------------- //
646 USDGEOM_API
648
651 USDGEOM_API
653
654public:
655 // ===================================================================== //
656 // Feel free to add custom code below this line, it will be preserved by
657 // the code generator.
658 //
659 // Just remember to:
660 // - Close the class declaration with };
661 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
662 // - Close the include guard with #endif
663 // ===================================================================== //
664 // --(BEGIN CUSTOM CODE)--
665
666 // --------------------------------------------------------------------- //
670 // --------------------------------------------------------------------- //
671
678 USDGEOM_API
679 bool ActivateId(int64_t id) const;
680
687 USDGEOM_API
688 bool ActivateIds(VtInt64Array const &ids) const;
689
695 USDGEOM_API
696 bool ActivateAllIds() const;
697
703 USDGEOM_API
704 bool DeactivateId(int64_t id) const;
705
711 USDGEOM_API
712 bool DeactivateIds(VtInt64Array const &ids) const;
713
714
725 USDGEOM_API
726 bool VisId(int64_t id, UsdTimeCode const &time) const;
727
738 USDGEOM_API
739 bool VisIds(VtInt64Array const &ids, UsdTimeCode const &time) const;
740
747 USDGEOM_API
748 bool VisAllIds(UsdTimeCode const &time) const;
749
758 USDGEOM_API
759 bool InvisId(int64_t id, UsdTimeCode const &time) const;
760
769 USDGEOM_API
770 bool InvisIds(VtInt64Array const &ids, UsdTimeCode const &time) const;
771
789 USDGEOM_API
790 std::vector<bool> ComputeMaskAtTime(UsdTimeCode time,
791 VtInt64Array const *ids = nullptr) const;
792
805 template <class T>
806 static bool ApplyMaskToArray(std::vector<bool> const &mask,
807 VtArray<T> *dataArray,
808 const int elementSize = 1);
809
818 USDGEOM_API
819 bool UsesOrientationsf(UsdAttribute *rotationsAttr) const;
820
829 USDGEOM_API
830 bool UsesOrientationsf(TfToken *rotationsToken = nullptr) const;
831
832 // --------------------------------------------------------------------- //
834 // --------------------------------------------------------------------- //
835
843 };
844
845
854 };
855
856
913 USDGEOM_API
914 bool
916 VtArray<GfMatrix4d>* xforms,
917 const UsdTimeCode time,
918 const UsdTimeCode baseTime,
919 const ProtoXformInclusion doProtoXforms = IncludeProtoXform,
920 const MaskApplication applyMask = ApplyMask) const;
921
929 USDGEOM_API
930 bool
932 std::vector<VtArray<GfMatrix4d>>* xformsArray,
933 const std::vector<UsdTimeCode>& times,
934 const UsdTimeCode baseTime,
935 const ProtoXformInclusion doProtoXforms = IncludeProtoXform,
936 const MaskApplication applyMask = ApplyMask) const;
937
987 USDGEOM_API
988 static bool
990 VtArray<GfMatrix4d>* xforms,
991 UsdStageWeakPtr& stage,
992 UsdTimeCode time,
993 const VtIntArray& protoIndices,
994 const VtVec3fArray& positions,
995 const VtVec3fArray& velocities,
996 UsdTimeCode velocitiesSampleTime,
997 const VtVec3fArray& accelerations,
998 const VtVec3fArray& scales,
999 const VtQuatfArray& orientations,
1000 const VtVec3fArray& angularVelocities,
1001 UsdTimeCode angularVelocitiesSampleTime,
1002 const SdfPathVector& protoPaths,
1003 const std::vector<bool>& mask,
1004 float velocityScale = 1.0);
1005
1010 USDGEOM_API
1011 static bool
1013 VtArray<GfMatrix4d>* xforms,
1014 UsdStageWeakPtr& stage,
1015 UsdTimeCode time,
1016 const VtIntArray& protoIndices,
1017 const VtVec3fArray& positions,
1018 const VtVec3fArray& velocities,
1019 UsdTimeCode velocitiesSampleTime,
1020 const VtVec3fArray& accelerations,
1021 const VtVec3fArray& scales,
1022 const VtQuathArray& orientations,
1023 const VtVec3fArray& angularVelocities,
1024 UsdTimeCode angularVelocitiesSampleTime,
1025 const SdfPathVector& protoPaths,
1026 const std::vector<bool>& mask,
1027 float velocityScale = 1.0);
1028
1029private:
1030
1031 // Get the authored prototype paths. Fail if there are no authored prototype
1032 // paths or the prototype indices are out of bounds.
1033 bool _GetPrototypePathsForInstanceTransforms(
1034 const VtIntArray& protoIndices,
1035 SdfPathVector* protoPaths) const;
1036
1037 // Get the authored prototype indices for instance transform computation.
1038 // Fail if prototype indices are not authored.
1039 bool _GetProtoIndicesForInstanceTransforms(
1040 UsdTimeCode baseTime,
1041 VtIntArray* protoIndices) const;
1042
1043 // Fetches data from attributes specific to UsdGeomPointInstancer
1044 // required for instance transform calculations; this includes
1045 // protoIndices, protoPaths, and the mask.
1046 bool _ComputePointInstancerAttributesPreamble(
1047 const UsdTimeCode baseTime,
1048 const ProtoXformInclusion doProtoXforms,
1049 const MaskApplication applyMask,
1050 VtIntArray* protoIndices,
1051 SdfPathVector* protoPaths,
1052 std::vector<bool>* mask) const;
1053
1059 template<class QuatType>
1060 bool _DoComputeInstanceTransformsAtTimes(
1061 std::vector<VtArray<GfMatrix4d>>* xformsArray,
1062 const std::vector<UsdTimeCode>& times,
1063 const UsdTimeCode baseTime,
1064 const ProtoXformInclusion doProtoXforms,
1065 const MaskApplication applyMask,
1066 const UsdAttribute orientationsAttr) const;
1067
1069 template <class QuatType>
1070 static bool _DoComputeInstanceTransformsAtTime(
1071 VtArray<GfMatrix4d>* xforms,
1072 UsdStageWeakPtr& stage,
1073 UsdTimeCode time,
1074 const VtIntArray& protoIndices,
1075 const VtVec3fArray& positions,
1076 const VtVec3fArray& velocities,
1077 UsdTimeCode velocitiesSampleTime,
1078 const VtVec3fArray& accelerations,
1079 const VtVec3fArray& scales,
1080 const VtArray<QuatType>& orientations,
1081 const VtVec3fArray& angularVelocities,
1082 UsdTimeCode angularVelocitiesSampleTime,
1083 const SdfPathVector& protoPaths,
1084 const std::vector<bool>& mask,
1085 float velocityScale = 1.0);
1086
1087public:
1088
1124 USDGEOM_API
1126 VtVec3fArray* extent,
1127 const UsdTimeCode time,
1128 const UsdTimeCode baseTime) const;
1129
1132 USDGEOM_API
1134 VtVec3fArray* extent,
1135 const UsdTimeCode time,
1136 const UsdTimeCode baseTime,
1137 const GfMatrix4d& transform) const;
1138
1152 USDGEOM_API
1154 std::vector<VtVec3fArray>* extents,
1155 const std::vector<UsdTimeCode>& times,
1156 const UsdTimeCode baseTime) const;
1157
1161 USDGEOM_API
1163 std::vector<VtVec3fArray>* extents,
1164 const std::vector<UsdTimeCode>& times,
1165 const UsdTimeCode baseTime,
1166 const GfMatrix4d& transform) const;
1167
1173 USDGEOM_API
1175
1176private:
1177
1178 bool _ComputeExtentAtTimePreamble(
1179 UsdTimeCode baseTime,
1180 VtIntArray* protoIndices,
1181 std::vector<bool>* mask,
1182 UsdRelationship* prototypes,
1183 SdfPathVector* protoPaths) const;
1184
1185 bool _ComputeExtentFromTransforms(
1186 VtVec3fArray* extent,
1187 const VtIntArray& protoIndices,
1188 const std::vector<bool>& mask,
1189 const UsdRelationship& prototypes,
1190 const SdfPathVector& protoPaths,
1191 const VtMatrix4dArray& instanceTransforms,
1192 UsdTimeCode time,
1193 const GfMatrix4d* transform) const;
1194
1195 bool _ComputeExtentAtTime(
1196 VtVec3fArray* extent,
1197 const UsdTimeCode time,
1198 const UsdTimeCode baseTime,
1199 const GfMatrix4d* transform) const;
1200
1201 bool _ComputeExtentAtTimes(
1202 std::vector<VtVec3fArray>* extent,
1203 const std::vector<UsdTimeCode>& times,
1204 const UsdTimeCode baseTime,
1205 const GfMatrix4d* transform) const;
1206};
1207
1208template <class T>
1209bool
1210UsdGeomPointInstancer::ApplyMaskToArray(std::vector<bool> const &mask,
1211 VtArray<T> *dataArray,
1212 const int elementSize)
1213{
1214 if (!dataArray) {
1215 TF_CODING_ERROR("NULL dataArray.");
1216 return false;
1217 }
1218 size_t maskSize = mask.size();
1219 if (maskSize == 0 || dataArray->size() == (size_t)elementSize){
1220 return true;
1221 }
1222 else if ((maskSize * elementSize) != dataArray->size()){
1223 TF_WARN("Input mask's size (%zu) is not compatible with the "
1224 "input dataArray (%zu) and elementSize (%d).",
1225 maskSize, dataArray->size(), elementSize);
1226 return false;
1227 }
1228
1229 T* beginData = dataArray->data();
1230 T* currData = beginData;
1231 size_t numPreserved = 0;
1232 for (size_t i = 0; i < maskSize; ++i) {
1233 // XXX Could add a fast-path for elementSize == 1 ?
1234 if (mask[i]) {
1235 for (int j = 0; j < elementSize; ++j) {
1236 *currData = beginData[i + j];
1237 ++currData;
1238 }
1239 numPreserved += elementSize;
1240 }
1241 }
1242 if (numPreserved < dataArray->size()) {
1243 dataArray->resize(numPreserved);
1244 }
1245 return true;
1246}
1247
1250USDGEOM_API
1251bool
1253
1257USDGEOM_API
1258bool
1259UsdGeomPointInstancerSetOrMergeOverOp(std::vector<int64_t> const &items,
1260 SdfListOpType op,
1261 UsdPrim const &prim,
1262 TfToken const &metadataName);
1263
1264PXR_NAMESPACE_CLOSE_SCOPE
1265
1266#endif
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:71
Contains an asset path and an optional resolved path.
Definition: assetPath.h:30
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
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:160
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:67
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
Definition: timeCode.h:95
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:211
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
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:472
pointer data()
Return a non-const pointer to this array's data.
Definition: array.h:401
void resize(size_t newSize)
Resize this array.
Definition: array.h:541
#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