RavEngine
Loading...
Searching...
No Matches
PxMetaDataObjects.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef PX_METADATAOBJECTS_H
30#define PX_METADATAOBJECTS_H
31#include "foundation/PxMemory.h"
32#include "foundation/PxPhysicsVersion.h"
33
34// include the base headers instead of the PxPhysicsAPI.h
35//Geometry Library
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"
59
60// PhysX Core SDK
61#include "PxActor.h"
62#include "PxAggregate.h"
63#include "PxArticulationReducedCoordinate.h"
64#include "PxArticulationJointReducedCoordinate.h"
65#include "PxArticulationLink.h"
66#include "PxClient.h"
67#include "PxConstraint.h"
68#include "PxConstraintDesc.h"
69#include "PxContact.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"
81#include "PxPhysics.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"
89#include "PxScene.h"
90#include "PxSceneDesc.h"
91#include "PxSceneLock.h"
92#include "PxShape.h"
93#include "PxSimulationEventCallback.h"
94#include "PxSimulationStatistics.h"
95#include "PxVisualizationParameter.h"
96#include "PxPruningStructure.h"
97
98#if PX_LINUX && PX_CLANG
99#pragma clang diagnostic push
100#pragma clang diagnostic ignored "-Wreserved-identifier"
101#endif
102
107namespace physx
108{
109
110class PxArticulationLink;
111class PxArticulationJointReducedCoordinate;
112
114{
115 enum Enum
116 {
117 Unnamed = 0,
118#include "PxAutoGeneratedMetaDataObjectNames.h"
119 LastPxPropertyInfoName
120 };
121};
122
124{
125 const char* mName;
126 PxU32 mValue;
127};
128
130{
131 const char* mName;
132 PxU32 mKey;
133 PxPropertyInfoBase( const char* n, PxU32 inKey )
134 : mName( n )
135 , mKey( inKey )
136 {
137 }
138};
139
140template<PxU32 TKey>
142{
143 PxPropertyInfoParameterizedBase( const char* inName )
144 : PxPropertyInfoBase( inName, TKey ) {}
145};
146
147template<PxU32 TKey, typename TObjType, typename TPropertyType>
149{
150 typedef TPropertyType (*TGetterType)( const TObjType* );
151 TGetterType mGetter;
152 PxReadOnlyPropertyInfo( const char* inName, TGetterType inGetter )
154 , mGetter( inGetter ) {}
155 TPropertyType get( const TObjType* inObj ) const { return mGetter( inObj ); }
156};
157
158template<PxU32 TKey, typename TObjType, typename TPropertyType>
160{
161 typedef void(*TSetterType)( TObjType*, TPropertyType inArg );
162 TSetterType mSetter;
163 PxWriteOnlyPropertyInfo( const char* inName, TSetterType inSetter )
165 , mSetter( inSetter ) {}
166 void set( TObjType* inObj, TPropertyType inArg ) const { mSetter( inObj, inArg ); }
167};
168
169
170//Define the property types on the auto-generated objects.
171template<PxU32 TKey, typename TObjType, typename TSetPropType, typename TGetPropType>
172struct PxPropertyInfo : public PxReadOnlyPropertyInfo<TKey, TObjType, TGetPropType>
173{
175 typedef void(*TSetterType)( TObjType*, TSetPropType inArg );
176 TSetterType mSetter;
177
178 PxPropertyInfo( const char* inName, TSetterType inSetter, TGetterType inGetter )
180 , mSetter( inSetter ) {}
181 void set( TObjType* inObj, TSetPropType inArg ) const { mSetter( inObj, inArg ); }
182};
183
184template<PxU32 TKey, typename TObjType, typename TPropertyType>
186{
187 typedef void (*TSetterType)( TObjType*,TPropertyType,TPropertyType);
188 typedef void (*TGetterType)( const TObjType*,TPropertyType&,TPropertyType&);
189
190 const char* mArg0Name;
191 const char* mArg1Name;
192
193 TSetterType mSetter;
194 TGetterType mGetter;
195
196 PxRangePropertyInfo( const char* name, const char* arg0Name, const char* arg1Name
197 , TSetterType setter, TGetterType getter )
199 , mArg0Name( arg0Name )
200 , mArg1Name( arg1Name )
201 , mSetter( setter )
202 , mGetter( getter )
203 {
204 }
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 ); }
207};
208
209template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
211{
212 typedef void (*TSetterType)( TObjType*, TIndexType, TPropertyType );
213 typedef TPropertyType (*TGetterType)( const TObjType* inObj, TIndexType );
214
215 TSetterType mSetter;
216 TGetterType mGetter;
217
218 PxIndexedPropertyInfo( const char* name, TSetterType setter, TGetterType getter )
220 , mSetter( setter )
221 , mGetter( getter )
222 {
223 }
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 ); }
226};
227
228template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
230{
231 typedef PxU32 (*TNbObjectsMember)( const TObjType* );
232 typedef void (*TSetterType)( TObjType*, TIndexType, TPropertyType );
233 typedef TPropertyType (*TGetterType)( const TObjType* inObj, TIndexType );
234
235 TSetterType mSetter;
236 TGetterType mGetter;
237 PxU32 mCount;
238 TNbObjectsMember mNbObjectsMember;
239
240 PxExtendedIndexedPropertyInfo( const char* name, TGetterType getter, TNbObjectsMember inNb, TSetterType setter)
242 , mSetter( setter )
243 , mGetter( getter )
244 , mNbObjectsMember( inNb )
245 {
246 }
247
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 ); }
251};
252
253template<PxU32 TKey, typename TObjType, typename TIndex1Type, typename TIndex2Type, typename TPropertyType>
255{
256 typedef void (*TSetterType)( TObjType*, TIndex1Type, TIndex2Type, TPropertyType );
257 typedef TPropertyType (*TGetterType)( const TObjType* inObj, TIndex1Type, TIndex2Type );
258
259 TSetterType mSetter;
260 TGetterType mGetter;
261
262 PxDualIndexedPropertyInfo( const char* name, TSetterType setter, TGetterType getter )
264 , mSetter( setter )
265 , mGetter( getter )
266 {
267 }
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 ); }
270};
271
272template<PxU32 TKey, typename TObjType, typename TIndex1Type, typename TIndex2Type, typename TPropertyType>
274{
275 typedef void (*TSetterType)( TObjType*, TIndex1Type, TIndex2Type, TPropertyType );
276 typedef TPropertyType (*TGetterType)( const TObjType* inObj, TIndex1Type, TIndex2Type );
277
278 TSetterType mSetter;
279 TGetterType mGetter;
280 PxU32 mId0Count;
281 PxU32 mId1Count;
282
283 PxExtendedDualIndexedPropertyInfo( const char* name, TSetterType setter, TGetterType getter, PxU32 id0Count, PxU32 id1Count )
285 , mSetter( setter )
286 , mGetter( getter )
287 , mId0Count( id0Count )
288 , mId1Count( id1Count )
289 {
290 }
291
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 ); }
294};
295
296template<PxU32 TKey, typename TObjType, typename TCollectionType>
298{
299 typedef PxU32 (*TNbObjectsMember)( const TObjType* );
300 typedef PxU32 (*TGetObjectsMember)( const TObjType*, TCollectionType*, PxU32 );
301 typedef void (*TSetObjectsMember)( TObjType*, TCollectionType*, PxU32 );
302
303 TGetObjectsMember mGetObjectsMember;
304 TNbObjectsMember mNbObjectsMember;
305 TSetObjectsMember mSetObjectsMember;
306
307 PxBufferCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TSetObjectsMember inSet )
309 , mGetObjectsMember( inGetter )
310 , mNbObjectsMember( inNb )
311 , mSetObjectsMember( inSet )
312 {
313 }
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); }
317};
318
319template<PxU32 TKey, typename TObjType, typename TIndexType, typename TPropertyType>
321{
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* );
327
328 TGetXMember mGetXMember;
329 TGetYMember mGetYMember;
330 TNbObjectsMember mNbObjectsMember;
331 TAddPairMember mAddPairMember;
332 TClearMember mClearMember;
333
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 )
341
342 {
343 }
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 ); }
349};
350
351template<PxU32 TKey, typename TObjType, typename TCollectionType>
353{
354 typedef PxU32 (*TNbObjectsMember)( const TObjType* );
355 typedef PxU32 (*TGetObjectsMember)( const TObjType*, TCollectionType*, PxU32 );
356
357 TGetObjectsMember mGetObjectsMember;
358 TNbObjectsMember mNbObjectsMember;
359
360 PxReadOnlyCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
362 , mGetObjectsMember( inGetter )
363 , mNbObjectsMember( inNb )
364 {
365 }
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); }
368};
369
370
371template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TFilterType>
373{
374 typedef PxU32 (*TNbObjectsMember)( const TObjType*, TFilterType );
375 typedef PxU32 (*TGetObjectsMember)( const TObjType*, TFilterType, TCollectionType*, PxU32 );
376
377 TGetObjectsMember mGetObjectsMember;
378 TNbObjectsMember mNbObjectsMember;
379
380 PxReadOnlyFilteredCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
382 , mGetObjectsMember( inGetter )
383 , mNbObjectsMember( inNb )
384 {
385 }
386
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); }
389};
390
391template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TCreateArg>
392struct PxFactoryCollectionPropertyInfo : public PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >
393{
396 typedef TCollectionType (*TCreateMember)( TObjType*, TCreateArg );
397
398 TCreateMember mCreateMember;
399 PxFactoryCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TCreateMember inMember )
401 , mCreateMember( inMember )
402 {
403 }
404 TCollectionType create( TObjType* inObj, TCreateArg inArg ) const { return mCreateMember( inObj, inArg ); }
405};
406
407
408template<PxU32 TKey, typename TObjType, typename TCollectionType>
409struct PxCollectionPropertyInfo : public PxReadOnlyCollectionPropertyInfo< TKey, TObjType, TCollectionType >
410{
413 typedef void (*TAddMember)(TObjType*, TCollectionType&);
414 typedef void (*TRemoveMember)(TObjType*, TCollectionType&);
415
416 TAddMember mAddMember;
417 TRemoveMember mRemoveMember;
418
419 PxCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TAddMember inMember, TRemoveMember inRemoveMember )
421 , mAddMember( inMember )
422 , mRemoveMember( inRemoveMember )
423 {
424 }
425 void add( TObjType* inObj, TCollectionType& inArg ) const { mAddMember(inObj, inArg ); }
426 void remove( TObjType* inObj, TCollectionType& inArg ) const { mRemoveMember( inObj, inArg ); }
427};
428
429template<PxU32 TKey, typename TObjType, typename TCollectionType, typename TFilterType>
430struct PxFilteredCollectionPropertyInfo : public PxReadOnlyFilteredCollectionPropertyInfo<TKey, TObjType, TCollectionType, TFilterType>
431{
434 typedef void (*TAddMember)(TObjType*, TCollectionType&);
435 typedef void (*TRemoveMember)(TObjType*, TCollectionType&);
436
437 TAddMember mAddMember;
438 TRemoveMember mRemoveMember;
439
440 PxFilteredCollectionPropertyInfo( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb, TAddMember inMember, TRemoveMember inRemoveMember )
442 , mAddMember( inMember )
443 , mRemoveMember( inRemoveMember )
444 {
445 }
446 void add( TObjType* inObj, TCollectionType& inArg ) const { mAddMember(inObj, inArg ); }
447 void remove( TObjType* inObj, TCollectionType& inArg ) const { mRemoveMember( inObj, inArg ); }
448};
449
450//create a default info class for when we can't match
451//the type correctly.
453{
454 static const char* getClassName() { return "__unknown_class"; }
455 template<typename TReturnType, typename TOperator>
456 TReturnType visitType( TOperator )
457 {
458 return TReturnType();
459 }
460 template<typename TOperator>
461 void visitBases( TOperator )
462 {
463 }
464 template<typename TOperator>
465 PxU32 visitBaseProperties( TOperator, PxU32 inStartIndex = 0 ) const
466 {
467 return inStartIndex;
468 }
469 template<typename TOperator>
470 PxU32 visitInstanceProperties( TOperator, PxU32 inStartIndex = 0 ) const
471 {
472 return inStartIndex;
473 }
474};
475
476template<typename TDataType>
478{
480 static bool getInfo() { return false;}
481};
482
483//move the bool typedef to the global namespace.
484typedef bool _Bool;
485
486
487template<PxU32 TPropertyName>
489{
490 bool Offset;
491};
492
493
494#define DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP( type, prop, valueStruct ) \
495 template<> struct PxPropertyToValueStructMemberMap< PxPropertyInfoName::type##_##prop > \
496 { \
497 PxU32 Offset; \
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 ); } \
500 };
501
502
503
505{
506 PX_PHYSX_CORE_API PxGeometryType::Enum getGeometryType(const PxShape* inShape) const;
507 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxBoxGeometry& geometry) const;
508 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxSphereGeometry& geometry) const;
509 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxCapsuleGeometry& geometry) const;
510 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxPlaneGeometry& geometry) const;
511 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxConvexMeshGeometry& geometry) const;
512 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxTetrahedronMeshGeometry& geometry) const;
513 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxParticleSystemGeometry& geometry) const;
514 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxTriangleMeshGeometry& geometry) const;
515 PX_PHYSX_CORE_API bool getGeometry(const PxShape* inShape, PxHeightFieldGeometry& geometry) const;
516};
517
518struct PxShapeGeomProperty : public PxWriteOnlyPropertyInfo< PxPropertyInfoName::PxShape_Geom, PxShape, const PxGeometry & >
520{
521
522 static void setPxShape_Geom( PxShape* inObj, const PxGeometry& inArg){ inObj->setGeometry( inArg ); }
523 static PxGeometryHolder getPxShape_Geom( const PxShape* inObj ) { return PxGeometryHolder(inObj->getGeometry()); }
524
526 typedef PxGeometryHolder (*TGetterType)( const PxShape* inObj );
527 PxShapeGeomProperty( const char* inName="Geometry", TSetterType inSetter=setPxShape_Geom, TGetterType=getPxShape_Geom )
529 {
530 }
531};
532
534{
535 PX_PHYSX_CORE_API void setMaterials(PxShape* inShape, PxMaterial*const* materials, PxU16 materialCount) const;
536};
537
538struct PxShapeMaterialsProperty : public PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxShape_Materials, PxShape, PxMaterial*>
540{
543 PxShapeMaterialsProperty( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
545 {
546 }
547};
548
550
552{
553 PX_PHYSX_CORE_API PxShape* createShape(PxRigidActor* inActor, const PxGeometry& geometry, PxMaterial& material, PxShapeFlags shapeFlags = PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSCENE_QUERY_SHAPE | PxShapeFlag::eSIMULATION_SHAPE) const;
554 PX_PHYSX_CORE_API PxShape* createShape(PxRigidActor* inActor, const PxGeometry& geometry, PxMaterial *const* materials, PxU16 materialCount, PxShapeFlags shapeFlags = PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSCENE_QUERY_SHAPE | PxShapeFlag::eSIMULATION_SHAPE) const;
555};
556
567
569{
570 PX_PHYSX_CORE_API PxArticulationLink* createLink(PxArticulationReducedCoordinate* inArticulation, PxArticulationLink* parent, const PxTransform& pose) const;
571};
572
573struct PxArticulationLinkCollectionProp : public PxReadOnlyCollectionPropertyInfo<PxPropertyInfoName::PxArticulationReducedCoordinate_Links, PxArticulationReducedCoordinate, PxArticulationLink*>
575{
576 PxArticulationLinkCollectionProp( const char* inName, TGetObjectsMember inGetter, TNbObjectsMember inNb )
578 {
579 }
580};
581
582template<typename TDataType>
583struct PxEnumTraits { PxEnumTraits() : NameConversion( false ) {} bool NameConversion; };
584
585struct NbShapesProperty : public PxIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbShapes, PxSimulationStatistics, PxGeometryType::Enum, PxU32>
586{
587 PX_PHYSX_CORE_API NbShapesProperty();
588};
589
590
591struct NbDiscreteContactPairsProperty : public PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbDiscreteContactPairs
592 , PxSimulationStatistics
593 , PxGeometryType::Enum
594 , PxGeometryType::Enum
595 , PxU32>
596{
597 PX_PHYSX_CORE_API NbDiscreteContactPairsProperty();
598};
599struct NbModifiedContactPairsProperty : public PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbModifiedContactPairs
600 , PxSimulationStatistics
601 , PxGeometryType::Enum
602 , PxGeometryType::Enum
603 , PxU32>
604{
605 PX_PHYSX_CORE_API NbModifiedContactPairsProperty();
606};
607
608struct NbCCDPairsProperty : public PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbCCDPairs
609 , PxSimulationStatistics
610 , PxGeometryType::Enum
611 , PxGeometryType::Enum
612 , PxU32>
613{
614 PX_PHYSX_CORE_API NbCCDPairsProperty();
615};
616
617struct NbTriggerPairsProperty : public PxDualIndexedPropertyInfo<PxPropertyInfoName::PxSimulationStatistics_NbTriggerPairs
618 , PxSimulationStatistics
619 , PxGeometryType::Enum
620 , PxGeometryType::Enum
621 , PxU32>
622{
623 PX_PHYSX_CORE_API NbTriggerPairsProperty();
624};
625
626
627struct SimulationStatisticsProperty : public PxReadOnlyPropertyInfo<PxPropertyInfoName::PxScene_SimulationStatistics, PxScene, PxSimulationStatistics>
628{
629 PX_PHYSX_CORE_API SimulationStatisticsProperty();
630};
631
632struct PxCustomGeometryCustomTypeProperty : public PxReadOnlyPropertyInfo<PxPropertyInfoName::PxCustomGeometry_CustomType, PxCustomGeometry, PxU32>
633{
634 PX_PHYSX_CORE_API PxCustomGeometryCustomTypeProperty();
635};
636
638{
639 PxVec3 normal;
640 PxReal distance;
641 PxMetaDataPlane( PxVec3 n = PxVec3( 0, 0, 0 ), PxReal d = 0 )
642 : normal( n )
643 , distance( d )
644 {
645 }
646};
647
648#include "PxAutoGeneratedMetaDataObjects.h"
649
650#undef DEFINE_PROPERTY_TO_VALUE_STRUCT_MAP
651
652static PxU32ToName g_physx__PxQueryFlag__EnumConversion[] = {
653 { "eSTATIC", static_cast<PxU32>( PxQueryFlag::eSTATIC ) },
654 { "eDYNAMIC", static_cast<PxU32>( PxQueryFlag::eDYNAMIC ) },
655 { "ePREFILTER", static_cast<PxU32>( PxQueryFlag::ePREFILTER ) },
656 { "ePOSTFILTER", static_cast<PxU32>( PxQueryFlag::ePOSTFILTER ) },
657 { NULL, 0 }
658 };
659
660template<> struct PxEnumTraits<PxQueryFlag::Enum > { PxEnumTraits() : NameConversion( g_physx__PxQueryFlag__EnumConversion ) {} const PxU32ToName* NameConversion; };
661
662
663template<typename TObjType, typename TOperator>
664inline PxU32 visitAllProperties( TOperator inOperator )
665{
666 PxU32 thePropCount = PxClassInfoTraits<TObjType>().Info.visitBaseProperties( inOperator );
667 return PxClassInfoTraits<TObjType>().Info.visitInstanceProperties( inOperator, thePropCount );
668}
669
670template<typename TObjType, typename TOperator>
671inline void visitInstanceProperties( TOperator inOperator )
672{
673 PxClassInfoTraits<TObjType>().Info.visitInstanceProperties( inOperator, 0 );
674}
675
676}
677
678#if PX_LINUX && PX_CLANG
679#pragma clang diagnostic pop
680#endif
681
683#endif
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
class representing a rigid euclidean transform as a quaternion and a vector
Definition PxTransform.h:49
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:596
Definition PxMetaDataObjects.h:604
Definition PxMetaDataObjects.h:586
Definition PxMetaDataObjects.h:622
Definition PxMetaDataObjects.h:575
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:638
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