HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
parseDesc.h
Go to the documentation of this file.
1 //
2 // Copyright 2024 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef USDPHYSICS_PARSE_DESC_H
8 #define USDPHYSICS_PARSE_DESC_H
9 
10 /// \file usdPhysics/parseDesc.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/usd/prim.h"
15 
16 #include "pxr/base/gf/vec3f.h"
17 #include "pxr/base/gf/quatf.h"
18 
20 
21 // -------------------------------------------------------------------------- //
22 // PHYSICSPARSEDESC //
23 // -------------------------------------------------------------------------- //
24 
25 /// Sentinel value for flt max compare
26 const float usdPhysicsSentinelLimit = 0.5e38f;
27 
28 /// \class UsdPhysicsObjectType
29 ///
30 /// Physics object type structure for type enumeration
31 ///
33 {
34  Undefined,
35 
36  Scene,
37 
38  RigidBody,
39 
41  CubeShape,
46  ConeShape,
47  MeshShape,
48  PlaneShape,
51 
52  FixedJoint,
57  D6Joint,
59 
61 
63 
65 
66  Last,
67 };
68 
69 /// \class UsdPhysicsAxis
70 ///
71 /// Physics axis structure for type enumeration
72 ///
73 enum class UsdPhysicsAxis
74 {
75  X,
76  Y,
77  Z
78 };
79 
80 /// \class UsdPhysicsJointDOF
81 ///
82 /// Physics joint degree of freedom structure for type enumeration
83 ///
85 {
86  Distance,
87  TransX,
88  TransY,
89  TransZ,
90  RotX,
91  RotY,
92  RotZ
93 };
94 
95 /// \struct UsdPhysicsObjectDesc
96 ///
97 /// Base physics object descriptor
98 ///
100 {
102  type(inType), isValid(true)
103  {
104  }
105 
106  virtual ~UsdPhysicsObjectDesc() = default;
107 
108  /// Descriptor type
110  /// SdfPath for the prim from which the descriptor was parsed
112  /// Validity of a descriptor, the parsing may succeed, but the descriptor
113  /// might be not valid
114  bool isValid;
115 };
116 
117 /// \struct UsdPhysicsRigidBodyMaterialDesc
118 ///
119 /// Rigid body material descriptor
120 ///
122 {
126  density(-1.0f)
127  {
128  }
129 
130  bool operator == (const UsdPhysicsRigidBodyMaterialDesc& /*desc*/) const
131  {
132  return false;
133  }
134 
135  /// Static friction
137  /// Dynamic friction
139  /// Restitution
140  float restitution;
141  /// Density
142  float density;
143 };
144 
145 /// \struct UsdPhysicsSceneDesc
146 ///
147 /// Scene descriptor
148 ///
150 {
153  gravityDirection(0.0f, 0.0f, 0.0f), gravityMagnitude(-INFINITY)
154  {
155  }
156 
157  bool operator == (const UsdPhysicsSceneDesc& /*desc*/) const
158  {
159  return false;
160  }
161 
162  /// Gravity direction, if default 0,0,0 was used negative upAxis direction
163  /// will be returned
165  /// Gravity magnitude, -inf means Earth gravity adjusted by metersPerUnit
166  /// will be returned
168 };
169 
170 /// \struct UsdPhysicsCollisionGroupDesc
171 ///
172 /// Collision group descriptor
173 ///
175 {
178  {
179  }
180 
181  bool operator == (const UsdPhysicsCollisionGroupDesc& /*desc*/) const
182  {
183  return false;
184  }
185 
187  {
188  return filteredGroups;
189  }
190 
192  {
193  return mergedGroups;
194  }
195 
196  /// If filtering is inverted or not (default does not collide with)
198  /// Filtered groups SdfPath vector
200  /// Merge group name
201  std::string mergeGroupName;
202  /// List of merged collision groups
204 };
205 
206 /// \struct UsdPhysicsShapeDesc
207 ///
208 /// Shape descriptor, base class should not be reported
209 ///
210 /// Note as scale is not supported in most physics engines,
211 /// the collision shape sizes already contain the scale.
212 /// The exception are mesh collisions which do have geometry scale reported.
213 ///
215 {
217  : UsdPhysicsObjectDesc(inType), localPos(0.0f, 0.0f, 0.0f),
218  localRot(1.0f, 0.0f, 0.0f, 0.0f),
219  localScale(1.0f, 1.0f, 1.0f), collisionEnabled(true)
220  {
221  }
222 
224  {
225  return materials;
226  }
227 
229  {
230  return simulationOwners;
231  }
232 
234  {
235  return filteredCollisions;
236  }
237 
239  {
240  return collisionGroups;
241  }
242 
243 
244  /// Rigid body the collision shape belongs to, if not set it's a static
245  /// collider
247  /// Local position of the shape relative to the body world pose
249  /// Local orientation of the shape relative to the body world pose
251  /// Local scale of the shape relative to the body world pose
253  /// Materials assigned to the collision geometry, can be multiple materials
254  /// used on UsdGeomSubset
256  /// Simulation owners list
258  /// Filtered collisions list
260  /// List of collision groups this collision belongs to, note that only
261  /// collision groups that are part of the current range are checked.
263  /// Collision enabled/disabled bool
265 };
266 
267 /// \struct UsdPhysicsSphereShapeDesc
268 ///
269 /// Sphere shape collision descriptor
270 ///
272 {
273  UsdPhysicsSphereShapeDesc(float inRadius = 0.0f) :
275  {
276  }
277 
278  bool operator == (const UsdPhysicsSphereShapeDesc& /*desc*/) const
279  {
280  return false;
281  }
282 
283  /// Sphere radius
284  float radius;
285 };
286 
287 /// \struct UsdPhysicsCapsuleShapeDesc
288 ///
289 /// Capsule shape collision descriptor
290 ///
292 {
293  UsdPhysicsCapsuleShapeDesc(float inRadius = 0.0f, float half_height = 0.0f,
296  radius(inRadius), halfHeight(half_height), axis(cap_axis)
297  {
298  }
299 
300  bool operator == (const UsdPhysicsCapsuleShapeDesc& /*desc*/) const
301  {
302  return false;
303  }
304 
305  /// Capsule radius
306  float radius;
307  /// Capsule half height
308  float halfHeight;
309  /// Capsule axis
311 };
312 
313 /// \struct UsdPhysicsCapsule1ShapeDesc
314 ///
315 /// Capsule1 shape collision descriptor
316 ///
318 {
319  UsdPhysicsCapsule1ShapeDesc(float inTopRadius = 0.0f,
320  float inBottomRadius = 0.0f, float half_height = 0.0f,
323  topRadius(inTopRadius), bottomRadius(inBottomRadius),
324  halfHeight(half_height), axis(cap_axis)
325  {
326  }
327 
328  bool operator == (const UsdPhysicsCapsule1ShapeDesc& /*desc*/) const
329  {
330  return false;
331  }
332 
333  /// Capsule top radius
334  float topRadius;
335  /// Capsule bottom radius
337  /// Capsule half height
338  float halfHeight;
339  /// Capsule axis
341 };
342 
343 /// \struct UsdPhysicsCylinderShapeDesc
344 ///
345 /// Cylinder shape collision descriptor
346 ///
348 {
349  UsdPhysicsCylinderShapeDesc(float inRadius = 0.0f, float half_height = 0.0f,
352  radius(inRadius), halfHeight(half_height), axis(cap_axis)
353  {
354  }
355 
356  bool operator == (const UsdPhysicsCylinderShapeDesc& /*desc*/) const
357  {
358  return false;
359  }
360 
361  /// Cylinder radius
362  float radius;
363  /// Cylinder half height
364  float halfHeight;
365  /// Cylinder axis
367 };
368 
369 /// \struct UsdPhysicsCylinder1ShapeDesc
370 ///
371 /// Cylinder1 shape collision descriptor
372 ///
374 {
375  UsdPhysicsCylinder1ShapeDesc(float inTopRadius = 0.0f,
376  float inBottomRadius = 0.0f, float half_height = 0.0f,
379  topRadius(inTopRadius), bottomRadius(inBottomRadius),
380  halfHeight(half_height), axis(cap_axis)
381  {
382  }
383 
384  bool operator == (const UsdPhysicsCylinder1ShapeDesc& /*desc*/) const
385  {
386  return false;
387  }
388 
389  /// Cylinder top radius
390  float topRadius;
391  /// Cylinder bottom radius
393  /// Cylinder half height
394  float halfHeight;
395  /// Cylinder axis
397 };
398 
399 /// \struct UsdPhysicsConeShapeDesc
400 ///
401 /// Cone shape collision descriptor
402 ///
404 {
405  UsdPhysicsConeShapeDesc(float inRadius = 0.0f, float half_height = 0.0f,
408  halfHeight(half_height), axis(cap_axis)
409  {
410  }
411 
412  bool operator == (const UsdPhysicsConeShapeDesc& /*desc*/) const
413  {
414  return false;
415  }
416 
417  /// Cone radius
418  float radius;
419  /// Cone half height
420  float halfHeight;
421  /// Cone axis
423 };
424 
425 /// \struct UsdPhysicsPlaneShapeDesc
426 ///
427 /// Plane shape collision descriptor
428 ///
430 {
433  {
434  }
435 
436  bool operator == (const UsdPhysicsPlaneShapeDesc& /*desc*/) const
437  {
438  return false;
439  }
440 
441  /// Plane axis
443 };
444 
445 
446 /// \struct UsdPhysicsCustomShapeDesc
447 ///
448 /// Custom shape collision descriptor
449 ///
451 {
454  {
455  }
456 
457  bool operator == (const UsdPhysicsCustomShapeDesc& /*desc*/) const
458  {
459  return false;
460  }
461 
462  /// Custom geometry token for this collision
464 };
465 
466 /// \struct UsdPhysicsCubeShapeDesc
467 ///
468 /// Cube shape collision descriptor
469 ///
471 {
472  UsdPhysicsCubeShapeDesc(const GfVec3f& inHalfExtents = GfVec3f(1.0f))
474  halfExtents(inHalfExtents)
475  {
476  }
477 
478  bool operator == (const UsdPhysicsCubeShapeDesc& /*desc*/) const
479  {
480  return false;
481  }
482 
483  /// Half extents of the cube
485 };
486 
487 /// \struct UsdPhysicsMeshShapeDesc
488 ///
489 /// Mesh shape collision descriptor
490 ///
492 {
495  meshScale(1.0f, 1.0f, 1.0f),
496  doubleSided(false)
497  {
498  }
499 
500  bool operator == (const UsdPhysicsMeshShapeDesc& /*desc*/) const
501  {
502  return false;
503  }
504 
506  {
507  return approximation;
508  }
509 
510  /// Desired approximation for the mesh collision
512  /// Mesh scale
514  /// Defines whether mesh is double sided or not
516 };
517 
518 /// \struct UsdPhysicsSpherePoint
519 ///
520 /// This struct represents a single sphere-point
521 /// which is a position and a radius
522 ///
524 {
525  bool operator == (const UsdPhysicsSpherePoint& /*desc*/) const
526  {
527  return false;
528  }
529 
530  /// Sphere point center
532 
533  /// Sphere point radius
534  float radius;
535 };
536 
537 /// \struct UsdPhysicsSpherePointsShapeDesc
538 ///
539 /// This struct represents a collection of
540 /// sphere points. Basically just an array of
541 /// spheres which has been populated from a
542 /// UsdGeomPoints primitive
543 ///
545 {
548  {
549  }
550 
551  bool operator == (const UsdPhysicsSpherePointsShapeDesc& /*desc*/) const
552  {
553  return false;
554  }
555 
556  /// List of sphere points
557  std::vector<UsdPhysicsSpherePoint> spherePoints;
558 };
559 
560 /// \struct UsdPhysicsRigidBodyDesc
561 ///
562 /// Rigid body descriptor
563 ///
565 {
568  position(0.0f, 0.0f, 0.0f),
569  rotation(1.0f, 0.0f, 0.0f, 0.0f),
570  scale(1.0f, 1.0f, 1.0f), rigidBodyEnabled(true), kinematicBody(false),
571  startsAsleep(false), linearVelocity(0.0f, 0.0f, 0.0f),
572  angularVelocity(0.0f, 0.0f, 0.0f)
573  {
574  }
575 
576  bool operator == (const UsdPhysicsRigidBodyDesc& /*desc*/) const
577  {
578  return false;
579  }
580 
582  {
583  return collisions;
584  }
585 
587  {
588  return filteredCollisions;
589  }
590 
592  {
593  return simulationOwners;
594  }
595 
596  /// List of collision shapes that belong to this rigid body
598  /// Filtered collisions
600  /// Simulation owners list
602  /// Rigid body position in world space
604  /// Rigid body orientation in world space
606  /// Rigid body scale
608 
609  /// Defines whether body is enabled or not, if not enabled it's a static body
611  /// Defines if the body is kinematic or not
613  /// Defines if body starts asleep or awake
615  /// Rigid body initial linear velocity
617  /// Rigid body initial angular velocity
619 };
620 
621 /// \struct UsdPhysicsJointLimit
622 ///
623 /// Joint limit descriptor
624 ///
626 {
627  UsdPhysicsJointLimit() : enabled(false), angle0(90.0), angle1(-90.0)
628  {
629  }
630 
631  bool operator == (const UsdPhysicsJointLimit& /*desc*/) const
632  {
633  return false;
634  }
635 
636  /// Defines whether limit is enabled or not
637  bool enabled;
638 
639  /// Min, lower, initial angle
640  union
641  {
642  float angle0;
643  float lower;
644  float minDist;
645  };
646 
647  /// Max, upper, final angle
648  union
649  {
650  float angle1;
651  float upper;
652  float maxDist;
653  };
654 };
655 
656 /// \struct UsdPhysicsJointDrive
657 ///
658 /// Joint drive descriptor
659 /// The expected drive formula:
660 /// force =
661 /// spring * (target position - position) + damping * (targetVelocity - velocity)
662 ///
664 {
666  : enabled(false), targetPosition(0.0f), targetVelocity(0.0f),
667  forceLimit(FLT_MAX), stiffness(0.0f), damping(0.0f), acceleration(false)
668  {
669  }
670 
671  bool operator == (const UsdPhysicsJointDrive& /*desc*/) const
672  {
673  return false;
674  }
675 
676  /// Defines whether drive is enabled or not
677  bool enabled;
678  /// Drive target position
680  /// Drive target velocity
682  /// force limit
683  float forceLimit;
684  /// Drive stiffness
685  float stiffness;
686  /// Drive damping
687  float damping;
688  /// Drive mode is acceleration or force
690 };
691 
692 
693 /// \struct UsdPhysicsArticulationDesc
694 ///
695 /// Articulation description
696 ///
698 {
701  {
702  }
703 
704  bool operator == (const UsdPhysicsArticulationDesc& /*desc*/) const
705  {
706  return false;
707  }
708 
710  {
711  return rootPrims;
712  }
713 
715  {
716  return filteredCollisions;
717  }
718 
720  {
721  return articulatedJoints;
722  }
723 
725  {
726  return articulatedBodies;
727  }
728 
729  /// List of articulation roots, this defines where the articulation
730  /// topology starts
732  /// Filtered collisions
734  /// List of joints that can be part of this articulation
736  /// List of bodies that can be part of this articulation
738 };
739 
740 using JointLimits = std::vector<
741  std::pair<
743 using JointDrives = std::vector<
744  std::pair<
746 
747 /// \struct UsdPhysicsJointDesc
748 ///
749 /// Base UsdPhysics joint descriptor
750 ///
752 {
754  : UsdPhysicsObjectDesc(inType), localPose0Position(0.0f, 0.0f, 0.0f),
755  localPose0Orientation(1.0f, 0.0f, 0.0f, 0.0f),
756  localPose1Position(0.0f, 0.0f, 0.0f),
757  localPose1Orientation(1.0f, 0.0f, 0.0f, 0.0f), jointEnabled(true),
758  breakForce(FLT_MAX), // USD default is none, which is not a float...
759  breakTorque(FLT_MAX), excludeFromArticulation(false)
760  {
761  }
762 
763  bool operator == (const UsdPhysicsJointDesc& /*desc*/) const
764  {
765  return false;
766  }
767 
768  /// UsdPrim relationship 0 for the joint
770  /// UsdPrim relationship 1 for the joint
772  /// Rigid body 0 that the joint is connected, does not have to match the
773  /// rel0
775  /// Rigid body 1 that the joint is connected, does not have to match the
776  /// rel1
778  /// Relative local position against the body0 world frame
780  /// Relative local orientation against the body0 world frame
782  /// Relative local position against the body1 world frame
784  /// Relative local orientation against the body1 world frame
786  /// Defines if joint is enabled or disabled
788  /// Joint break force
789  float breakForce;
790  /// Joint break torque
791  float breakTorque;
792  /// Defines if joint belongs to an articulation or if it's a maximum
793  /// coordinate joint
795  /// Defines if collision is enabled or disabled between the jointed bodies
797 };
798 
799 /// \struct UsdPhysicsCustomJointDesc
800 ///
801 /// Custom joint descriptor
802 ///
804 {
807  {
808  }
809 
810  bool operator == (const UsdPhysicsCustomJointDesc& /*desc*/) const
811  {
812  return false;
813  }
814 
815 };
816 
817 /// \struct UsdPhysicsFixedJointDesc
818 ///
819 /// Fixed joint descriptor
820 ///
822 {
825  {
826  }
827 
828  bool operator == (const UsdPhysicsFixedJointDesc& /*desc*/) const
829  {
830  return false;
831  }
832 };
833 
834 /// \struct UsdPhysicsD6JointDesc
835 ///
836 /// Generic D6 joint descriptor
837 ///
839 {
842  {
843  }
844 
845  bool operator == (const UsdPhysicsD6JointDesc& /*desc*/) const
846  {
847  return false;
848  }
849 
850  /// List of joint limit's
852  /// List of joint drives
854 };
855 
856 /// \struct UsdPhysicsPrismaticJointDesc
857 ///
858 /// Prismatic joint descriptor
859 ///
861 {
865  {
866  }
867 
868  bool operator == (const UsdPhysicsPrismaticJointDesc& /*desc*/) const
869  {
870  return false;
871  }
872 
873  /// The joints axis
875  /// Joint linear limit
876  UsdPhysicsJointLimit limit;
877  /// Joint linear drive
878  UsdPhysicsJointDrive drive;
879 };
880 
881 /// \struct UsdPhysicsSphericalJointDesc
882 ///
883 /// Spherical joint descriptor
884 ///
886 {
890  {
891  }
892 
893  bool operator == (const UsdPhysicsSphericalJointDesc& /*desc*/) const
894  {
895  return false;
896  }
897 
898  /// The joints axis
900  /// The join spherical limit
901  UsdPhysicsJointLimit limit;
902 };
903 
904 /// \struct UsdPhysicsRevoluteJointDesc
905 ///
906 /// Revolute joint descriptor
907 ///
909 {
913  {
914  }
915 
916  bool operator == (const UsdPhysicsRevoluteJointDesc& /*desc*/) const
917  {
918  return false;
919  }
920 
921  /// The joints axis
923  /// The angular limit
924  UsdPhysicsJointLimit limit;
925  /// The angular drive
926  UsdPhysicsJointDrive drive;
927 };
928 
929 /// \struct UsdPhysicsDistanceJointDesc
930 ///
931 /// Distance joint descriptor
932 ///
934 {
937  minEnabled(false), maxEnabled(false)
938  {
939  }
940 
941  bool operator == (const UsdPhysicsDistanceJointDesc& /*desc*/) const
942  {
943  return false;
944  }
945 
946  /// Defines if minimum limit is enabled
948  /// Defines if maximum limit is enabled
950  /// The distance limit
951  UsdPhysicsJointLimit limit;
952 };
953 
954 
956 
957 #endif
bool operator==(const UsdPhysicsJointDrive &) const
Definition: parseDesc.h:671
bool operator==(const UsdPhysicsJointDesc &) const
Definition: parseDesc.h:763
bool maxEnabled
Defines if maximum limit is enabled.
Definition: parseDesc.h:949
float breakForce
Joint break force.
Definition: parseDesc.h:789
float staticFriction
Static friction.
Definition: parseDesc.h:136
GfVec3f halfExtents
Half extents of the cube.
Definition: parseDesc.h:484
float radius
Sphere radius.
Definition: parseDesc.h:284
const SdfPathVector & GetCollisions() const
Definition: parseDesc.h:581
SdfPathVector filteredCollisions
Filtered collisions list.
Definition: parseDesc.h:259
bool collisionEnabled
Defines if collision is enabled or disabled between the jointed bodies.
Definition: parseDesc.h:796
UsdPhysicsJointDOF
Definition: parseDesc.h:84
bool operator==(const UsdPhysicsSceneDesc &) const
Definition: parseDesc.h:157
float restitution
Restitution.
Definition: parseDesc.h:140
const SdfPathVector & GetRootPrims() const
Definition: parseDesc.h:709
bool acceleration
Drive mode is acceleration or force.
Definition: parseDesc.h:689
bool operator==(const UsdPhysicsCustomJointDesc &) const
Definition: parseDesc.h:810
UsdPhysicsCylinder1ShapeDesc(float inTopRadius=0.0f, float inBottomRadius=0.0f, float half_height=0.0f, UsdPhysicsAxis cap_axis=UsdPhysicsAxis::X)
Definition: parseDesc.h:375
bool enabled
Defines whether limit is enabled or not.
Definition: parseDesc.h:637
float halfHeight
Cone half height.
Definition: parseDesc.h:420
GfQuatf localPose0Orientation
Relative local orientation against the body0 world frame.
Definition: parseDesc.h:781
float breakTorque
Joint break torque.
Definition: parseDesc.h:791
std::string mergeGroupName
Merge group name.
Definition: parseDesc.h:201
const SdfPathVector & GetArticulatedJoints() const
Definition: parseDesc.h:719
float bottomRadius
Capsule bottom radius.
Definition: parseDesc.h:336
SdfPathVector rootPrims
Definition: parseDesc.h:731
GfVec3f gravityDirection
Definition: parseDesc.h:164
UsdPhysicsJointLimit limit
The angular limit.
Definition: parseDesc.h:924
const SdfPathVector & GetSimulationOwners() const
Definition: parseDesc.h:228
const SdfPathVector & GetFilteredCollisions() const
Definition: parseDesc.h:233
UsdPhysicsAxis axis
The joints axis.
Definition: parseDesc.h:874
UsdPhysicsAxis axis
The joints axis.
Definition: parseDesc.h:899
UsdPhysicsAxis axis
Cone axis.
Definition: parseDesc.h:422
bool operator==(const UsdPhysicsFixedJointDesc &) const
Definition: parseDesc.h:828
float targetVelocity
Drive target velocity.
Definition: parseDesc.h:681
TfToken GetApproximation() const
Definition: parseDesc.h:505
SdfPathVector simulationOwners
Simulation owners list.
Definition: parseDesc.h:601
UsdPhysicsCapsule1ShapeDesc(float inTopRadius=0.0f, float inBottomRadius=0.0f, float half_height=0.0f, UsdPhysicsAxis cap_axis=UsdPhysicsAxis::X)
Definition: parseDesc.h:319
Definition: vec3f.h:45
bool minEnabled
Defines if minimum limit is enabled.
Definition: parseDesc.h:947
bool startsAsleep
Defines if body starts asleep or awake.
Definition: parseDesc.h:614
const SdfPathVector & GetFilteredGroups() const
Definition: parseDesc.h:186
bool operator==(const UsdPhysicsSphereShapeDesc &) const
Definition: parseDesc.h:278
UsdPhysicsObjectType type
Descriptor type.
Definition: parseDesc.h:109
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glcorearb.h:2539
SdfPathVector filteredCollisions
Filtered collisions.
Definition: parseDesc.h:733
bool operator==(const UsdPhysicsCubeShapeDesc &) const
Definition: parseDesc.h:478
UsdPhysicsJointDrive drive
Joint linear drive.
Definition: parseDesc.h:878
GfVec3f scale
Rigid body scale.
Definition: parseDesc.h:607
float stiffness
Drive stiffness.
Definition: parseDesc.h:685
Definition: quatf.h:42
float halfHeight
Capsule half height.
Definition: parseDesc.h:308
float halfHeight
Capsule half height.
Definition: parseDesc.h:338
float radius
Cylinder radius.
Definition: parseDesc.h:362
UsdPhysicsAxis axis
Plane axis.
Definition: parseDesc.h:442
bool kinematicBody
Defines if the body is kinematic or not.
Definition: parseDesc.h:612
float topRadius
Capsule top radius.
Definition: parseDesc.h:334
bool rigidBodyEnabled
Defines whether body is enabled or not, if not enabled it's a static body.
Definition: parseDesc.h:610
SdfPathVector filteredGroups
Filtered groups SdfPath vector.
Definition: parseDesc.h:199
UsdPhysicsJointLimit limit
The join spherical limit.
Definition: parseDesc.h:901
bool collisionEnabled
Collision enabled/disabled bool.
Definition: parseDesc.h:264
UsdPhysicsShapeDesc(UsdPhysicsObjectType inType)
Definition: parseDesc.h:216
bool operator==(const UsdPhysicsCylinder1ShapeDesc &) const
Definition: parseDesc.h:384
SdfPathVector mergedGroups
List of merged collision groups.
Definition: parseDesc.h:203
UsdPhysicsJointDrive drive
The angular drive.
Definition: parseDesc.h:926
SdfPath primPath
SdfPath for the prim from which the descriptor was parsed.
Definition: parseDesc.h:111
GLfloat f
Definition: glcorearb.h:1926
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
Definition: token.h:70
float forceLimit
force limit
Definition: parseDesc.h:683
GfQuatf localRot
Local orientation of the shape relative to the body world pose.
Definition: parseDesc.h:250
SdfPathVector articulatedBodies
List of bodies that can be part of this articulation.
Definition: parseDesc.h:737
const SdfPathVector & GetFilteredCollisions() const
Definition: parseDesc.h:714
GfVec3f position
Rigid body position in world space.
Definition: parseDesc.h:603
UsdPhysicsCubeShapeDesc(const GfVec3f &inHalfExtents=GfVec3f(1.0f))
Definition: parseDesc.h:472
UsdPhysicsJointDesc(UsdPhysicsObjectType inType)
Definition: parseDesc.h:753
bool invertFilteredGroups
If filtering is inverted or not (default does not collide with)
Definition: parseDesc.h:197
UsdPhysicsCylinderShapeDesc(float inRadius=0.0f, float half_height=0.0f, UsdPhysicsAxis cap_axis=UsdPhysicsAxis::X)
Definition: parseDesc.h:349
bool jointEnabled
Defines if joint is enabled or disabled.
Definition: parseDesc.h:787
std::vector< class SdfPath > SdfPathVector
bool operator==(const UsdPhysicsCollisionGroupDesc &) const
Definition: parseDesc.h:181
TfToken customGeometryToken
Custom geometry token for this collision.
Definition: parseDesc.h:463
GfQuatf localPose1Orientation
Relative local orientation against the body1 world frame.
Definition: parseDesc.h:785
float topRadius
Cylinder top radius.
Definition: parseDesc.h:390
virtual ~UsdPhysicsObjectDesc()=default
JointLimits jointLimits
List of joint limit's.
Definition: parseDesc.h:851
UsdPhysicsObjectDesc(UsdPhysicsObjectType inType)
Definition: parseDesc.h:101
bool operator==(const UsdPhysicsDistanceJointDesc &) const
Definition: parseDesc.h:941
const SdfPathVector & GetArticulatedBodies() const
Definition: parseDesc.h:724
UsdPhysicsAxis axis
Cylinder axis.
Definition: parseDesc.h:366
UsdPhysicsJointLimit limit
The distance limit.
Definition: parseDesc.h:951
const SdfPathVector & GetFilteredCollisions() const
Definition: parseDesc.h:586
GfVec3f localPose1Position
Relative local position against the body1 world frame.
Definition: parseDesc.h:783
SdfPathVector collisions
List of collision shapes that belong to this rigid body.
Definition: parseDesc.h:597
float radius
Cone radius.
Definition: parseDesc.h:418
std::vector< std::pair< UsdPhysicsJointDOF, UsdPhysicsJointLimit >> JointLimits
Definition: parseDesc.h:742
SdfPath rel0
UsdPrim relationship 0 for the joint.
Definition: parseDesc.h:769
bool operator==(const UsdPhysicsSpherePointsShapeDesc &) const
Definition: parseDesc.h:551
SdfPathVector materials
Definition: parseDesc.h:255
GfVec3f linearVelocity
Rigid body initial linear velocity.
Definition: parseDesc.h:616
UsdPhysicsAxis axis
Cylinder axis.
Definition: parseDesc.h:396
UsdPhysicsCapsuleShapeDesc(float inRadius=0.0f, float half_height=0.0f, UsdPhysicsAxis cap_axis=UsdPhysicsAxis::X)
Definition: parseDesc.h:293
bool operator==(const UsdPhysicsCylinderShapeDesc &) const
Definition: parseDesc.h:356
bool operator==(const UsdPhysicsSphericalJointDesc &) const
Definition: parseDesc.h:893
GfVec3f localPose0Position
Relative local position against the body0 world frame.
Definition: parseDesc.h:779
Definition: path.h:273
const SdfPathVector & GetMaterials() const
Definition: parseDesc.h:223
bool operator==(const UsdPhysicsD6JointDesc &) const
Definition: parseDesc.h:845
bool operator==(const UsdPhysicsMeshShapeDesc &) const
Definition: parseDesc.h:500
bool operator==(const UsdPhysicsCapsule1ShapeDesc &) const
Definition: parseDesc.h:328
SdfPathVector simulationOwners
Simulation owners list.
Definition: parseDesc.h:257
PXR_NAMESPACE_OPEN_SCOPE const float usdPhysicsSentinelLimit
Sentinel value for flt max compare.
Definition: parseDesc.h:26
SdfPathVector filteredCollisions
Filtered collisions.
Definition: parseDesc.h:599
bool operator==(const UsdPhysicsRevoluteJointDesc &) const
Definition: parseDesc.h:916
const SdfPathVector & GetMergedGroups() const
Definition: parseDesc.h:191
bool operator==(const UsdPhysicsCapsuleShapeDesc &) const
Definition: parseDesc.h:300
bool operator==(const UsdPhysicsCustomShapeDesc &) const
Definition: parseDesc.h:457
GfVec3f localScale
Local scale of the shape relative to the body world pose.
Definition: parseDesc.h:252
bool operator==(const UsdPhysicsSpherePoint &) const
Definition: parseDesc.h:525
float damping
Drive damping.
Definition: parseDesc.h:687
const SdfPathVector & GetCollisionGroups() const
Definition: parseDesc.h:238
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
float radius
Capsule radius.
Definition: parseDesc.h:306
bool operator==(const UsdPhysicsRigidBodyDesc &) const
Definition: parseDesc.h:576
bool enabled
Defines whether drive is enabled or not.
Definition: parseDesc.h:677
float targetPosition
Drive target position.
Definition: parseDesc.h:679
GfVec3f angularVelocity
Rigid body initial angular velocity.
Definition: parseDesc.h:618
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
UsdPhysicsJointLimit limit
Joint linear limit.
Definition: parseDesc.h:876
std::vector< UsdPhysicsSpherePoint > spherePoints
List of sphere points.
Definition: parseDesc.h:557
bool operator==(const UsdPhysicsRigidBodyMaterialDesc &) const
Definition: parseDesc.h:130
float halfHeight
Cylinder half height.
Definition: parseDesc.h:364
GfQuatf rotation
Rigid body orientation in world space.
Definition: parseDesc.h:605
float halfHeight
Cylinder half height.
Definition: parseDesc.h:394
GfVec3f meshScale
Mesh scale.
Definition: parseDesc.h:513
UsdPhysicsConeShapeDesc(float inRadius=0.0f, float half_height=0.0f, UsdPhysicsAxis cap_axis=UsdPhysicsAxis::X)
Definition: parseDesc.h:405
UsdPhysicsPlaneShapeDesc(UsdPhysicsAxis up_axis=UsdPhysicsAxis::X)
Definition: parseDesc.h:431
bool operator==(const UsdPhysicsArticulationDesc &) const
Definition: parseDesc.h:704
float dynamicFriction
Dynamic friction.
Definition: parseDesc.h:138
const SdfPathVector & GetSimulationOwners() const
Definition: parseDesc.h:591
GfVec3f center
Sphere point center.
Definition: parseDesc.h:531
GfVec3f localPos
Local position of the shape relative to the body world pose.
Definition: parseDesc.h:248
UsdPhysicsSphereShapeDesc(float inRadius=0.0f)
Definition: parseDesc.h:273
std::vector< std::pair< UsdPhysicsJointDOF, UsdPhysicsJointDrive >> JointDrives
Definition: parseDesc.h:745
UsdPhysicsAxis axis
The joints axis.
Definition: parseDesc.h:922
SdfPathVector articulatedJoints
List of joints that can be part of this articulation.
Definition: parseDesc.h:735
JointDrives jointDrives
List of joint drives.
Definition: parseDesc.h:853
float radius
Sphere point radius.
Definition: parseDesc.h:534
bool operator==(const UsdPhysicsConeShapeDesc &) const
Definition: parseDesc.h:412
bool doubleSided
Defines whether mesh is double sided or not.
Definition: parseDesc.h:515
bool excludeFromArticulation
Definition: parseDesc.h:794
TfToken approximation
Desired approximation for the mesh collision.
Definition: parseDesc.h:511
bool operator==(const UsdPhysicsJointLimit &) const
Definition: parseDesc.h:631
SdfPathVector collisionGroups
Definition: parseDesc.h:262
bool operator==(const UsdPhysicsPlaneShapeDesc &) const
Definition: parseDesc.h:436
float bottomRadius
Cylinder bottom radius.
Definition: parseDesc.h:392
SdfPath rel1
UsdPrim relationship 1 for the joint.
Definition: parseDesc.h:771
bool operator==(const UsdPhysicsPrismaticJointDesc &) const
Definition: parseDesc.h:868
UsdPhysicsAxis axis
Capsule axis.
Definition: parseDesc.h:340
UsdPhysicsAxis axis
Capsule axis.
Definition: parseDesc.h:310