29#ifndef PX_METADATAOBJECTS_H
30#define PX_METADATAOBJECTS_H
31#include "foundation/PxMemory.h"
32#include "foundation/PxPhysicsVersion.h"
36#include "geometry/PxBoxGeometry.h"
37#include "geometry/PxCapsuleGeometry.h"
38#include "geometry/PxConvexMesh.h"
39#include "geometry/PxConvexMeshGeometry.h"
40#include "geometry/PxGeometry.h"
41#include "geometry/PxGeometryHelpers.h"
42#include "geometry/PxGeometryQuery.h"
43#include "geometry/PxHeightField.h"
44#include "geometry/PxHeightFieldDesc.h"
45#include "geometry/PxHeightFieldFlag.h"
46#include "geometry/PxHeightFieldGeometry.h"
47#include "geometry/PxHeightFieldSample.h"
48#include "geometry/PxMeshQuery.h"
49#include "geometry/PxMeshScale.h"
50#include "geometry/PxPlaneGeometry.h"
51#include "geometry/PxSimpleTriangleMesh.h"
52#include "geometry/PxSphereGeometry.h"
53#include "geometry/PxTriangle.h"
54#include "geometry/PxTriangleMesh.h"
55#include "geometry/PxTriangleMeshGeometry.h"
56#include "geometry/PxTetrahedron.h"
57#include "geometry/PxTetrahedronMesh.h"
58#include "geometry/PxTetrahedronMeshGeometry.h"
62#include "PxAggregate.h"
63#include "PxArticulationReducedCoordinate.h"
64#include "PxArticulationJointReducedCoordinate.h"
65#include "PxArticulationLink.h"
67#include "PxConstraint.h"
68#include "PxConstraintDesc.h"
70#include "PxContactModifyCallback.h"
71#include "PxDeletionListener.h"
72#include "PxFiltering.h"
73#include "PxForceMode.h"
74#include "PxLockedData.h"
75#include "PxMaterial.h"
76#include "PxFEMSoftBodyMaterial.h"
77#include "PxFEMClothMaterial.h"
78#include "PxPBDMaterial.h"
79#include "PxFLIPMaterial.h"
80#include "PxMPMMaterial.h"
82#include "PxPhysXConfig.h"
83#include "PxQueryFiltering.h"
84#include "PxQueryReport.h"
85#include "PxRigidActor.h"
86#include "PxRigidBody.h"
87#include "PxRigidDynamic.h"
88#include "PxRigidStatic.h"
90#include "PxSceneDesc.h"
91#include "PxSceneLock.h"
93#include "PxSimulationEventCallback.h"
94#include "PxSimulationStatistics.h"
95#include "PxVisualizationParameter.h"
96#include "PxPruningStructure.h"
98#if PX_LINUX && PX_CLANG
99#pragma clang diagnostic push
100#pragma clang diagnostic ignored "-Wreserved-identifier"
110class PxArticulationLink;
111class PxArticulationJointReducedCoordinate;
118#include "PxAutoGeneratedMetaDataObjectNames.h"
119 LastPxPropertyInfoName
147template<PxU32 TKey,
typename TObjType,
typename TPropertyType>
150 typedef TPropertyType (*TGetterType)(
const TObjType* );
154 , mGetter( inGetter ) {}
155 TPropertyType get(
const TObjType* inObj )
const {
return mGetter( inObj ); }
158template<PxU32 TKey,
typename TObjType,
typename TPropertyType>
161 typedef void(*TSetterType)( TObjType*, TPropertyType inArg );
165 , mSetter( inSetter ) {}
166 void set( TObjType* inObj, TPropertyType inArg )
const { mSetter( inObj, inArg ); }
171template<PxU32 TKey,
typename TObjType,
typename TSetPropType,
typename TGetPropType>
175 typedef void(*TSetterType)( TObjType*, TSetPropType inArg );
178 PxPropertyInfo(
const char* inName, TSetterType inSetter, TGetterType inGetter )
180 , mSetter( inSetter ) {}
181 void set( TObjType* inObj, TSetPropType inArg )
const { mSetter( inObj, inArg ); }
184template<PxU32 TKey,
typename TObjType,
typename TPropertyType>
187 typedef void (*TSetterType)( TObjType*,TPropertyType,TPropertyType);
188 typedef void (*TGetterType)(
const TObjType*,TPropertyType&,TPropertyType&);
190 const char* mArg0Name;
191 const char* mArg1Name;
197 , TSetterType setter, TGetterType getter )
199 , mArg0Name( arg0Name )
200 , mArg1Name( arg1Name )
205 void set( TObjType* inObj, TPropertyType arg0, TPropertyType arg1 )
const { mSetter( inObj, arg0, arg1 ); }
206 void get(
const TObjType* inObj, TPropertyType& arg0, TPropertyType& arg1 )
const { mGetter( inObj, arg0, arg1 ); }
209template<PxU32 TKey,
typename TObjType,
typename TIndexType,
typename TPropertyType>
212 typedef void (*TSetterType)( TObjType*, TIndexType, TPropertyType );
213 typedef TPropertyType (*TGetterType)(
const TObjType* inObj, TIndexType );
224 void set( TObjType* inObj, TIndexType inIndex, TPropertyType arg )
const { mSetter( inObj, inIndex, arg ); }
225 TPropertyType get(
const TObjType* inObj, TIndexType inIndex )
const {
return mGetter( inObj, inIndex ); }
228template<PxU32 TKey,
typename TObjType,
typename TIndexType,
typename TPropertyType>
231 typedef PxU32 (*TNbObjectsMember)(
const TObjType* );
232 typedef void (*TSetterType)( TObjType*, TIndexType, TPropertyType );
233 typedef TPropertyType (*TGetterType)(
const TObjType* inObj, TIndexType );
238 TNbObjectsMember mNbObjectsMember;
244 , mNbObjectsMember( inNb )
248 PxU32 size(
const TObjType* inObj )
const {
return mNbObjectsMember( inObj ); }
249 void set( TObjType* inObj, TIndexType inIndex, TPropertyType arg )
const { mSetter( inObj, inIndex, arg ); }
250 TPropertyType get(
const TObjType* inObj, TIndexType inIndex )
const {
return mGetter( inObj, inIndex ); }
253template<PxU32 TKey,
typename TObjType,
typename TIndex1Type,
typename TIndex2Type,
typename TPropertyType>
256 typedef void (*TSetterType)( TObjType*, TIndex1Type, TIndex2Type, TPropertyType );
257 typedef TPropertyType (*TGetterType)(
const TObjType* inObj, TIndex1Type, TIndex2Type );
268 void set( TObjType* inObj, TIndex1Type inIdx1, TIndex2Type inIdx2, TPropertyType arg )
const { mSetter( inObj, inIdx1, inIdx2, arg ); }
269 TPropertyType get(
const TObjType* inObj, TIndex1Type inIdx1, TIndex2Type inIdx2 )
const {
return mGetter( inObj, inIdx1, inIdx2 ); }
272template<PxU32 TKey,
typename TObjType,
typename TIndex1Type,
typename TIndex2Type,
typename TPropertyType>
275 typedef void (*TSetterType)( TObjType*, TIndex1Type, TIndex2Type, TPropertyType );
276 typedef TPropertyType (*TGetterType)(
const TObjType* inObj, TIndex1Type, TIndex2Type );
287 , mId0Count( id0Count )
288 , mId1Count( id1Count )
292 void set( TObjType* inObj, TIndex1Type inIdx1, TIndex2Type inIdx2, TPropertyType arg )
const { mSetter( inObj, inIdx1, inIdx2, arg ); }
293 TPropertyType get(
const TObjType* inObj, TIndex1Type inIdx1, TIndex2Type inIdx2 )
const {
return mGetter( inObj, inIdx1, inIdx2 ); }
296template<PxU32 TKey,
typename TObjType,
typename TCollectionType>
299 typedef PxU32 (*TNbObjectsMember)(
const TObjType* );
300 typedef PxU32 (*TGetObjectsMember)(
const TObjType*, TCollectionType*, PxU32 );
301 typedef void (*TSetObjectsMember)( TObjType*, TCollectionType*, PxU32 );
303 TGetObjectsMember mGetObjectsMember;
304 TNbObjectsMember mNbObjectsMember;
305 TSetObjectsMember mSetObjectsMember;
309 , mGetObjectsMember( inGetter )
310 , mNbObjectsMember( inNb )
311 , mSetObjectsMember( inSet )
314 PxU32 size(
const TObjType* inObj )
const {
return mNbObjectsMember( inObj ); }
315 PxU32 get(
const TObjType* inObj, TCollectionType* inBuffer, PxU32 inNumItems )
const {
return mGetObjectsMember( inObj, inBuffer, inNumItems ); }
316 void set( TObjType* inObj, TCollectionType* inBuffer, PxU32 inNumItems )
const { mSetObjectsMember( inObj, inBuffer, inNumItems); }
319template<PxU32 TKey,
typename TObjType,
typename TIndexType,
typename TPropertyType>
322 typedef PxU32 (*TNbObjectsMember)(
const TObjType* );
323 typedef PxReal (*TGetXMember)(
const TObjType*, PxU32 );
324 typedef PxReal (*TGetYMember)(
const TObjType*, PxU32 );
325 typedef void (*TAddPairMember)( TObjType*, PxReal, PxReal );
326 typedef void (*TClearMember)( TObjType* );
328 TGetXMember mGetXMember;
329 TGetYMember mGetYMember;
330 TNbObjectsMember mNbObjectsMember;
331 TAddPairMember mAddPairMember;
332 TClearMember mClearMember;
334 PxFixedSizeLookupTablePropertyInfo(
const char* inName, TGetXMember inGetterX, TGetYMember inGetterY, TNbObjectsMember inNb, TAddPairMember inAddPair, TClearMember inClear )
336 , mGetXMember( inGetterX )
337 , mGetYMember( inGetterY )
338 , mNbObjectsMember( inNb )
339 , mAddPairMember( inAddPair )
340 , mClearMember( inClear )
344 PxU32 size(
const TObjType* inObj )
const {
return mNbObjectsMember( inObj ); }
345 PxReal getX(
const TObjType* inObj,
const PxU32 index )
const {
return mGetXMember( inObj, index ); }
346 PxReal getY(
const TObjType* inObj,
const PxU32 index )
const {
return mGetYMember( inObj, index ); }
347 void addPair( TObjType* inObj,
const PxReal x,
const PxReal y ) { mAddPairMember( inObj, x, y ); }
348 void clear( TObjType* inObj ) { mClearMember( inObj ); }
351template<PxU32 TKey,
typename TObjType,
typename TCollectionType>
354 typedef PxU32 (*TNbObjectsMember)(
const TObjType* );
355 typedef PxU32 (*TGetObjectsMember)(
const TObjType*, TCollectionType*, PxU32 );
357 TGetObjectsMember mGetObjectsMember;
358 TNbObjectsMember mNbObjectsMember;
362 , mGetObjectsMember( inGetter )
363 , mNbObjectsMember( inNb )
366 PxU32 size(
const TObjType* inObj )
const {
return mNbObjectsMember( inObj ); }
367 PxU32 get(
const TObjType* inObj, TCollectionType* inBuffer, PxU32 inBufSize )
const {
return mGetObjectsMember( inObj, inBuffer, inBufSize); }
371template<PxU32 TKey,
typename TObjType,
typename TCollectionType,
typename TFilterType>
374 typedef PxU32 (*TNbObjectsMember)(
const TObjType*, TFilterType );
375 typedef PxU32 (*TGetObjectsMember)(
const TObjType*, TFilterType, TCollectionType*, PxU32 );
377 TGetObjectsMember mGetObjectsMember;
378 TNbObjectsMember mNbObjectsMember;
382 , mGetObjectsMember( inGetter )
383 , mNbObjectsMember( inNb )
387 PxU32 size(
const TObjType* inObj, TFilterType inFilter )
const {
return mNbObjectsMember( inObj, inFilter ); }
388 PxU32 get(
const TObjType* inObj, TFilterType inFilter, TCollectionType* inBuffer, PxU32 inBufSize )
const {
return mGetObjectsMember( inObj, inFilter, inBuffer, inBufSize); }
391template<PxU32 TKey,
typename TObjType,
typename TCollectionType,
typename TCreateArg>
396 typedef TCollectionType (*TCreateMember)( TObjType*, TCreateArg );
398 TCreateMember mCreateMember;
401 , mCreateMember( inMember )
404 TCollectionType create( TObjType* inObj, TCreateArg inArg )
const {
return mCreateMember( inObj, inArg ); }
408template<PxU32 TKey,
typename TObjType,
typename TCollectionType>
413 typedef void (*TAddMember)(TObjType*, TCollectionType&);
414 typedef void (*TRemoveMember)(TObjType*, TCollectionType&);
416 TAddMember mAddMember;
417 TRemoveMember mRemoveMember;
419 PxCollectionPropertyInfo(
const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TAddMember inMember, TRemoveMember inRemoveMember )
421 , mAddMember( inMember )
422 , mRemoveMember( inRemoveMember )
425 void add( TObjType* inObj, TCollectionType& inArg )
const { mAddMember(inObj, inArg ); }
426 void remove( TObjType* inObj, TCollectionType& inArg )
const { mRemoveMember( inObj, inArg ); }
429template<PxU32 TKey,
typename TObjType,
typename TCollectionType,
typename TFilterType>
434 typedef void (*TAddMember)(TObjType*, TCollectionType&);
435 typedef void (*TRemoveMember)(TObjType*, TCollectionType&);
437 TAddMember mAddMember;
438 TRemoveMember mRemoveMember;
440 PxFilteredCollectionPropertyInfo(
const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TAddMember inMember, TRemoveMember inRemoveMember )
442 , mAddMember( inMember )
443 , mRemoveMember( inRemoveMember )
446 void add( TObjType* inObj, TCollectionType& inArg )
const { mAddMember(inObj, inArg ); }
447 void remove( TObjType* inObj, TCollectionType& inArg )
const { mRemoveMember( inObj, inArg ); }
454 static const char* getClassName() {
return "__unknown_class"; }
455 template<
typename TReturnType,
typename TOperator>
456 TReturnType visitType( TOperator )
458 return TReturnType();
460 template<
typename TOperator>
461 void visitBases( TOperator )
464 template<
typename TOperator>
465 PxU32 visitBaseProperties( TOperator, PxU32 inStartIndex = 0 )
const
469 template<
typename TOperator>
470 PxU32 visitInstanceProperties( TOperator, PxU32 inStartIndex = 0 )
const
476template<
typename TDataType>
480 static bool getInfo() {
return false;}
487template<PxU32 TPropertyName>
494#define DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP( type, prop, valueStruct ) \
495 template<> struct PxPropertyToValueStructMemberMap< PxPropertyInfoName::type##_##prop > \
498 PxPropertyToValueStructMemberMap< PxPropertyInfoName::type##_##prop >() : Offset( PX_OFFSET_OF_RT( valueStruct, prop ) ) {} \
499 template<typename TOperator> void visitProp( TOperator inOperator, valueStruct& inStruct ) { inOperator( inStruct.prop ); } \
527 PxShapeGeomProperty(
const char* inName=
"Geometry", TSetterType inSetter=setPxShape_Geom, TGetterType=getPxShape_Geom )
535 PX_PHYSX_CORE_API
void setMaterials(
PxShape* inShape,
PxMaterial*
const* materials, PxU16 materialCount)
const;
582template<
typename TDataType>
592 , PxSimulationStatistics
593 , PxGeometryType::Enum
594 , PxGeometryType::Enum
600 , PxSimulationStatistics
601 , PxGeometryType::Enum
602 , PxGeometryType::Enum
609 , PxSimulationStatistics
610 , PxGeometryType::Enum
611 , PxGeometryType::Enum
618 , PxSimulationStatistics
619 , PxGeometryType::Enum
620 , PxGeometryType::Enum
648#include "PxAutoGeneratedMetaDataObjects.h"
650#undef DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP
652static PxU32ToName g_physx__PxQueryFlag__EnumConversion[] = {
663template<
typename TObjType,
typename TOperator>
664inline PxU32 visitAllProperties( TOperator inOperator )
670template<
typename TObjType,
typename TOperator>
671inline void visitInstanceProperties( TOperator inOperator )
673 PxClassInfoTraits<TObjType>().Info.visitInstanceProperties( inOperator, 0 );
678#if PX_LINUX && PX_CLANG
679#pragma clang diagnostic pop
A component of an articulation that represents a rigid body.
Definition PxArticulationLink.h:54
A tree structure of bodies connected by joints that is treated as a unit by the dynamics solver....
Definition PxArticulationReducedCoordinate.h:448
Class representing the geometry of a box.
Definition PxBoxGeometry.h:49
Class representing the geometry of a capsule.
Definition PxCapsuleGeometry.h:54
Convex mesh geometry class.
Definition PxConvexMeshGeometry.h:79
Geometry holder class.
Definition PxGeometryHelpers.h:66
A geometry object.
Definition PxGeometry.h:79
Height field geometry class.
Definition PxHeightFieldGeometry.h:55
Material class to represent a set of surface properties.
Definition PxMaterial.h:149
Particle system geometry class.
Definition PxParticleSystemGeometry.h:51
Class describing a plane geometry.
Definition PxPlaneGeometry.h:56
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition PxRigidActor.h:53
Abstract class for collision shapes.
Definition PxShape.h:146
virtual void setGeometry(const PxGeometry &geometry)=0
Adjust the geometry of the shape.
virtual const PxGeometry & getGeometry() const =0
Retrieve a reference to the shape's geometry.
A class representing the geometry of a sphere.
Definition PxSphereGeometry.h:48
Tetrahedron mesh geometry class.
Definition PxTetrahedronMeshGeometry.h:50
Triangle mesh geometry class.
Definition PxTriangleMeshGeometry.h:81
3 Element vector class.
Definition PxVec3.h:50
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition PxMetaDataObjects.h:613
Definition PxMetaDataObjects.h:586
Definition PxMetaDataObjects.h:622
Definition PxMetaDataObjects.h:575
Definition PxMetaDataObjects.h:569
Definition PxMetaDataObjects.h:298
Definition PxMetaDataObjects.h:478
Definition PxMetaDataObjects.h:410
Definition PxMetaDataObjects.h:633
Definition PxMetaDataObjects.h:255
Definition PxMetaDataObjects.h:583
Definition PxMetaDataObjects.h:274
Definition PxMetaDataObjects.h:230
Definition PxMetaDataObjects.h:393
Definition PxMetaDataObjects.h:431
Definition PxMetaDataObjects.h:321
Enum
Definition PxGeometry.h:52
Definition PxMetaDataObjects.h:211
Definition PxMetaDataObjects.h:130
Definition PxMetaDataObjects.h:114
Definition PxMetaDataObjects.h:142
Definition PxMetaDataObjects.h:173
Definition PxMetaDataObjects.h:489
Filtering flags for scene queries.
Definition PxQueryFiltering.h:55
@ eSTATIC
Traverse static shapes.
Definition PxQueryFiltering.h:58
@ ePREFILTER
Run the pre-intersection-test filter (see PxQueryFilterCallback::preFilter())
Definition PxQueryFiltering.h:62
@ ePOSTFILTER
Run the post-intersection-test filter (see PxQueryFilterCallback::postFilter())
Definition PxQueryFiltering.h:64
@ eDYNAMIC
Traverse dynamic shapes.
Definition PxQueryFiltering.h:60
Definition PxMetaDataObjects.h:186
Definition PxMetaDataObjects.h:353
Definition PxMetaDataObjects.h:373
Definition PxMetaDataObjects.h:149
Definition PxMetaDataObjects.h:552
Definition PxMetaDataObjects.h:559
@ eSIMULATION_SHAPE
The shape will partake in collision in the physical simulation.
Definition PxShape.h:83
@ eVISUALIZATION
Enable debug renderer for this shape.
Definition PxShape.h:117
@ eSCENE_QUERY_SHAPE
The shape will partake in scene queries (ray casts, overlap tests, sweeps, ...).
Definition PxShape.h:88
Definition PxMetaDataObjects.h:505
Definition PxMetaDataObjects.h:520
Definition PxMetaDataObjects.h:534
Definition PxMetaDataObjects.h:540
Definition PxMetaDataObjects.h:124
Definition PxMetaDataObjects.h:453
Definition PxMetaDataObjects.h:160
Definition PxMetaDataObjects.h:628