Loading...
Searching...
No Matches
pointInstancer.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
24#ifndef USDGEOM_GENERATED_POINTINSTANCER_H
25#define USDGEOM_GENERATED_POINTINSTANCER_H
26
28
29#include "pxr/pxr.h"
30#include "pxr/usd/usdGeom/api.h"
32#include "pxr/usd/usd/prim.h"
33#include "pxr/usd/usd/stage.h"
35
36#include "pxr/base/vt/value.h"
37
38#include "pxr/base/gf/vec3d.h"
39#include "pxr/base/gf/vec3f.h"
41
42#include "pxr/base/tf/token.h"
43#include "pxr/base/tf/type.h"
44
45PXR_NAMESPACE_OPEN_SCOPE
46
47class SdfAssetPath;
48
49// -------------------------------------------------------------------------- //
50// POINTINSTANCER //
51// -------------------------------------------------------------------------- //
52
279{
280public:
284 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
285
290 explicit UsdGeomPointInstancer(const UsdPrim& prim=UsdPrim())
291 : UsdGeomBoundable(prim)
292 {
293 }
294
298 explicit UsdGeomPointInstancer(const UsdSchemaBase& schemaObj)
299 : UsdGeomBoundable(schemaObj)
300 {
301 }
302
304 USDGEOM_API
306
310 USDGEOM_API
311 static const TfTokenVector &
312 GetSchemaAttributeNames(bool includeInherited=true);
313
323 USDGEOM_API
325 Get(const UsdStagePtr &stage, const SdfPath &path);
326
349 USDGEOM_API
351 Define(const UsdStagePtr &stage, const SdfPath &path);
352
353protected:
357 USDGEOM_API
359
360private:
361 // needs to invoke _GetStaticTfType.
362 friend class UsdSchemaRegistry;
363 USDGEOM_API
364 static const TfType &_GetStaticTfType();
365
366 static bool _IsTypedSchema();
367
368 // override SchemaBase virtuals.
369 USDGEOM_API
370 const TfType &_GetTfType() const override;
371
372public:
373 // --------------------------------------------------------------------- //
374 // PROTOINDICES
375 // --------------------------------------------------------------------- //
386 USDGEOM_API
388
394 USDGEOM_API
395 UsdAttribute CreateProtoIndicesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
396
397public:
398 // --------------------------------------------------------------------- //
399 // IDS
400 // --------------------------------------------------------------------- //
413 USDGEOM_API
415
421 USDGEOM_API
422 UsdAttribute CreateIdsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
423
424public:
425 // --------------------------------------------------------------------- //
426 // POSITIONS
427 // --------------------------------------------------------------------- //
436 USDGEOM_API
438
444 USDGEOM_API
445 UsdAttribute CreatePositionsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
446
447public:
448 // --------------------------------------------------------------------- //
449 // ORIENTATIONS
450 // --------------------------------------------------------------------- //
469 USDGEOM_API
471
477 USDGEOM_API
478 UsdAttribute CreateOrientationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
479
480public:
481 // --------------------------------------------------------------------- //
482 // ORIENTATIONSF
483 // --------------------------------------------------------------------- //
504 USDGEOM_API
506
512 USDGEOM_API
513 UsdAttribute CreateOrientationsfAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
514
515public:
516 // --------------------------------------------------------------------- //
517 // SCALES
518 // --------------------------------------------------------------------- //
529 USDGEOM_API
531
537 USDGEOM_API
538 UsdAttribute CreateScalesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
539
540public:
541 // --------------------------------------------------------------------- //
542 // VELOCITIES
543 // --------------------------------------------------------------------- //
561 USDGEOM_API
563
569 USDGEOM_API
570 UsdAttribute CreateVelocitiesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
571
572public:
573 // --------------------------------------------------------------------- //
574 // ACCELERATIONS
575 // --------------------------------------------------------------------- //
588 USDGEOM_API
590
596 USDGEOM_API
597 UsdAttribute CreateAccelerationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
598
599public:
600 // --------------------------------------------------------------------- //
601 // ANGULARVELOCITIES
602 // --------------------------------------------------------------------- //
617 USDGEOM_API
619
625 USDGEOM_API
626 UsdAttribute CreateAngularVelocitiesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
627
628public:
629 // --------------------------------------------------------------------- //
630 // INVISIBLEIDS
631 // --------------------------------------------------------------------- //
640 USDGEOM_API
642
648 USDGEOM_API
649 UsdAttribute CreateInvisibleIdsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
650
651public:
652 // --------------------------------------------------------------------- //
653 // PROTOTYPES
654 // --------------------------------------------------------------------- //
663 USDGEOM_API
665
668 USDGEOM_API
670
671public:
672 // ===================================================================== //
673 // Feel free to add custom code below this line, it will be preserved by
674 // the code generator.
675 //
676 // Just remember to:
677 // - Close the class declaration with };
678 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
679 // - Close the include guard with #endif
680 // ===================================================================== //
681 // --(BEGIN CUSTOM CODE)--
682
683 // --------------------------------------------------------------------- //
687 // --------------------------------------------------------------------- //
688
695 USDGEOM_API
696 bool ActivateId(int64_t id) const;
697
704 USDGEOM_API
705 bool ActivateIds(VtInt64Array const &ids) const;
706
712 USDGEOM_API
713 bool ActivateAllIds() const;
714
720 USDGEOM_API
721 bool DeactivateId(int64_t id) const;
722
728 USDGEOM_API
729 bool DeactivateIds(VtInt64Array const &ids) const;
730
731
742 USDGEOM_API
743 bool VisId(int64_t id, UsdTimeCode const &time) const;
744
755 USDGEOM_API
756 bool VisIds(VtInt64Array const &ids, UsdTimeCode const &time) const;
757
764 USDGEOM_API
765 bool VisAllIds(UsdTimeCode const &time) const;
766
775 USDGEOM_API
776 bool InvisId(int64_t id, UsdTimeCode const &time) const;
777
786 USDGEOM_API
787 bool InvisIds(VtInt64Array const &ids, UsdTimeCode const &time) const;
788
806 USDGEOM_API
807 std::vector<bool> ComputeMaskAtTime(UsdTimeCode time,
808 VtInt64Array const *ids = nullptr) const;
809
822 template <class T>
823 static bool ApplyMaskToArray(std::vector<bool> const &mask,
824 VtArray<T> *dataArray,
825 const int elementSize = 1);
826
835 USDGEOM_API
836 bool UsesOrientationsf(UsdAttribute &rotationsAttr) const;
837
838 // --------------------------------------------------------------------- //
840 // --------------------------------------------------------------------- //
841
849 };
850
851
860 };
861
862
919 USDGEOM_API
920 bool
922 VtArray<GfMatrix4d>* xforms,
923 const UsdTimeCode time,
924 const UsdTimeCode baseTime,
925 const ProtoXformInclusion doProtoXforms = IncludeProtoXform,
926 const MaskApplication applyMask = ApplyMask) const;
927
935 USDGEOM_API
936 bool
938 std::vector<VtArray<GfMatrix4d>>* xformsArray,
939 const std::vector<UsdTimeCode>& times,
940 const UsdTimeCode baseTime,
941 const ProtoXformInclusion doProtoXforms = IncludeProtoXform,
942 const MaskApplication applyMask = ApplyMask) const;
943
993 USDGEOM_API
994 static bool
996 VtArray<GfMatrix4d>* xforms,
997 UsdStageWeakPtr& stage,
998 UsdTimeCode time,
999 const VtIntArray& protoIndices,
1000 const VtVec3fArray& positions,
1001 const VtVec3fArray& velocities,
1002 UsdTimeCode velocitiesSampleTime,
1003 const VtVec3fArray& accelerations,
1004 const VtVec3fArray& scales,
1005 const VtQuatfArray& orientations,
1006 const VtVec3fArray& angularVelocities,
1007 UsdTimeCode angularVelocitiesSampleTime,
1008 const SdfPathVector& protoPaths,
1009 const std::vector<bool>& mask,
1010 float velocityScale = 1.0);
1011
1016 USDGEOM_API
1017 static bool
1019 VtArray<GfMatrix4d>* xforms,
1020 UsdStageWeakPtr& stage,
1021 UsdTimeCode time,
1022 const VtIntArray& protoIndices,
1023 const VtVec3fArray& positions,
1024 const VtVec3fArray& velocities,
1025 UsdTimeCode velocitiesSampleTime,
1026 const VtVec3fArray& accelerations,
1027 const VtVec3fArray& scales,
1028 const VtQuathArray& orientations,
1029 const VtVec3fArray& angularVelocities,
1030 UsdTimeCode angularVelocitiesSampleTime,
1031 const SdfPathVector& protoPaths,
1032 const std::vector<bool>& mask,
1033 float velocityScale = 1.0);
1034
1035private:
1036
1037 // Get the authored prototype paths. Fail if there are no authored prototype
1038 // paths or the prototype indices are out of bounds.
1039 bool _GetPrototypePathsForInstanceTransforms(
1040 const VtIntArray& protoIndices,
1041 SdfPathVector* protoPaths) const;
1042
1043 // Get the authored prototype indices for instance transform computation.
1044 // Fail if prototype indices are not authored.
1045 bool _GetProtoIndicesForInstanceTransforms(
1046 UsdTimeCode baseTime,
1047 VtIntArray* protoIndices) const;
1048
1049 // Fetches data from attributes specific to UsdGeomPointInstancer
1050 // required for instance transform calculations; this includes
1051 // protoIndices, protoPaths, and the mask.
1052 bool _ComputePointInstancerAttributesPreamble(
1053 const UsdTimeCode baseTime,
1054 const ProtoXformInclusion doProtoXforms,
1055 const MaskApplication applyMask,
1056 VtIntArray* protoIndices,
1057 SdfPathVector* protoPaths,
1058 std::vector<bool>* mask) const;
1059
1065 template<class QuatType>
1066 bool _DoComputeInstanceTransformsAtTimes(
1067 std::vector<VtArray<GfMatrix4d>>* xformsArray,
1068 const std::vector<UsdTimeCode>& times,
1069 const UsdTimeCode baseTime,
1070 const ProtoXformInclusion doProtoXforms,
1071 const MaskApplication applyMask,
1072 const UsdAttribute orientationsAttr) const;
1073
1075 template <class QuatType>
1076 static bool _DoComputeInstanceTransformsAtTime(
1077 VtArray<GfMatrix4d>* xforms,
1078 UsdStageWeakPtr& stage,
1079 UsdTimeCode time,
1080 const VtIntArray& protoIndices,
1081 const VtVec3fArray& positions,
1082 const VtVec3fArray& velocities,
1083 UsdTimeCode velocitiesSampleTime,
1084 const VtVec3fArray& accelerations,
1085 const VtVec3fArray& scales,
1086 const VtArray<QuatType>& orientations,
1087 const VtVec3fArray& angularVelocities,
1088 UsdTimeCode angularVelocitiesSampleTime,
1089 const SdfPathVector& protoPaths,
1090 const std::vector<bool>& mask,
1091 float velocityScale = 1.0);
1092
1093public:
1094
1130 USDGEOM_API
1132 VtVec3fArray* extent,
1133 const UsdTimeCode time,
1134 const UsdTimeCode baseTime) const;
1135
1138 USDGEOM_API
1140 VtVec3fArray* extent,
1141 const UsdTimeCode time,
1142 const UsdTimeCode baseTime,
1143 const GfMatrix4d& transform) const;
1144
1158 USDGEOM_API
1160 std::vector<VtVec3fArray>* extents,
1161 const std::vector<UsdTimeCode>& times,
1162 const UsdTimeCode baseTime) const;
1163
1167 USDGEOM_API
1169 std::vector<VtVec3fArray>* extents,
1170 const std::vector<UsdTimeCode>& times,
1171 const UsdTimeCode baseTime,
1172 const GfMatrix4d& transform) const;
1173
1179 USDGEOM_API
1181
1182private:
1183
1184 bool _ComputeExtentAtTimePreamble(
1185 UsdTimeCode baseTime,
1186 VtIntArray* protoIndices,
1187 std::vector<bool>* mask,
1188 UsdRelationship* prototypes,
1189 SdfPathVector* protoPaths) const;
1190
1191 bool _ComputeExtentFromTransforms(
1192 VtVec3fArray* extent,
1193 const VtIntArray& protoIndices,
1194 const std::vector<bool>& mask,
1195 const UsdRelationship& prototypes,
1196 const SdfPathVector& protoPaths,
1197 const VtMatrix4dArray& instanceTransforms,
1198 UsdTimeCode time,
1199 const GfMatrix4d* transform) const;
1200
1201 bool _ComputeExtentAtTime(
1202 VtVec3fArray* extent,
1203 const UsdTimeCode time,
1204 const UsdTimeCode baseTime,
1205 const GfMatrix4d* transform) const;
1206
1207 bool _ComputeExtentAtTimes(
1208 std::vector<VtVec3fArray>* extent,
1209 const std::vector<UsdTimeCode>& times,
1210 const UsdTimeCode baseTime,
1211 const GfMatrix4d* transform) const;
1212};
1213
1214template <class T>
1215bool
1216UsdGeomPointInstancer::ApplyMaskToArray(std::vector<bool> const &mask,
1217 VtArray<T> *dataArray,
1218 const int elementSize)
1219{
1220 if (!dataArray) {
1221 TF_CODING_ERROR("NULL dataArray.");
1222 return false;
1223 }
1224 size_t maskSize = mask.size();
1225 if (maskSize == 0 || dataArray->size() == (size_t)elementSize){
1226 return true;
1227 }
1228 else if ((maskSize * elementSize) != dataArray->size()){
1229 TF_WARN("Input mask's size (%zu) is not compatible with the "
1230 "input dataArray (%zu) and elementSize (%d).",
1231 maskSize, dataArray->size(), elementSize);
1232 return false;
1233 }
1234
1235 T* beginData = dataArray->data();
1236 T* currData = beginData;
1237 size_t numPreserved = 0;
1238 for (size_t i = 0; i < maskSize; ++i) {
1239 // XXX Could add a fast-path for elementSize == 1 ?
1240 if (mask[i]) {
1241 for (int j = 0; j < elementSize; ++j) {
1242 *currData = beginData[i + j];
1243 ++currData;
1244 }
1245 numPreserved += elementSize;
1246 }
1247 }
1248 if (numPreserved < dataArray->size()) {
1249 dataArray->resize(numPreserved);
1250 }
1251 return true;
1252}
1253
1256USDGEOM_API
1257bool
1259
1263USDGEOM_API
1264bool
1265UsdGeomPointInstancerSetOrMergeOverOp(std::vector<int64_t> const &items,
1266 SdfListOpType op,
1267 UsdPrim const &prim,
1268 TfToken const &metadataName);
1269
1270PXR_NAMESPACE_CLOSE_SCOPE
1271
1272#endif
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:88
Contains an asset path and an optional resolved path.
Definition: assetPath.h:47
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:291
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
TfType represents a dynamic runtime type.
Definition: type.h:65
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:176
Boundable introduces the ability for a prim to persistently cache a rectilinear, local-space,...
Definition: boundable.h:83
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 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 bool UsesOrientationsf(UsdAttribute &rotationsAttr) const
Determines if we should prefer orientationsf over orientations based on whether or not orientationsf ...
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:134
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Definition: relationship.h:128
The base class for all schema types in Usd.
Definition: schemaBase.h:56
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:84
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
Definition: timeCode.h:112
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:228
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:165
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:129
size_t size() const
Return the total number of elements in this array.
Definition: array.h:489
pointer data()
Return a non-const pointer to this array's data.
Definition: array.h:418
void resize(size_t newSize)
Resize this array.
Definition: array.h:558
#define TF_CODING_ERROR(fmt, args)
Issue an internal programming error, but continue execution.
Definition: diagnostic.h:85
#define TF_WARN(...)
Issue a warning, but continue execution.
Definition: diagnostic.h:149
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:457