RavEngine
Loading...
Searching...
No Matches
PxPhysics.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_PHYSICS_H
30#define PX_PHYSICS_H
31
36#include "PxPhysXConfig.h"
37#include "PxDeletionListener.h"
38#include "foundation/PxTransform.h"
39#include "PxShape.h"
40#include "PxAggregate.h"
41#include "PxBuffer.h"
42#include "PxParticleSystem.h"
43#include "foundation/PxPreprocessor.h"
44#if PX_ENABLE_FEATURES_UNDER_CONSTRUCTION
45#include "PxFEMCloth.h"
46#include "PxHairSystem.h"
47#endif
48
49#if !PX_DOXYGEN
50namespace physx
51{
52#endif
53
54class PxScene;
55class PxSceneDesc;
56class PxTolerancesScale;
57class PxPvd;
58class PxOmniPvd;
59class PxInsertionCallback;
60
61class PxRigidActor;
62class PxConstraintConnector;
63struct PxConstraintShaderTable;
64
65class PxGeometry;
66class PxFoundation;
67
68class PxPruningStructure;
69class PxBVH;
74
77
78class PxSoftBodyMesh;
79
91{
92public:
93
97
98 virtual ~PxPhysics() {}
99
118 virtual void release() = 0;
119
125
130 virtual PxOmniPvd* getOmniPvd() = 0;
131
149 virtual PxAggregate* createAggregate(PxU32 maxActor, PxU32 maxShape, PxAggregateFilterHint filterHint) = 0;
150
170 PX_FORCE_INLINE PX_DEPRECATED PxAggregate* createAggregate(PxU32 maxActor, PxAggregateFilterHint filterHint)
171 {
172 return createAggregate(maxActor, PX_MAX_U32, filterHint);
173 }
174
179 virtual const PxTolerancesScale& getTolerancesScale() const = 0;
180
182
185
197
205 virtual PxU32 getNbTriangleMeshes() const = 0;
206
221 virtual PxU32 getTriangleMeshes(PxTriangleMesh** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
222
223
225
228
240
250
258 virtual PxU32 getNbTetrahedronMeshes() const = 0;
259
274 virtual PxU32 getTetrahedronMeshes(PxTetrahedronMesh** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
275
287
295 virtual PxU32 getNbHeightFields() const = 0;
296
311 virtual PxU32 getHeightFields(PxHeightField** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
312
324
332 virtual PxU32 getNbConvexMeshes() const = 0;
333
348 virtual PxU32 getConvexMeshes(PxConvexMesh** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
349
358 virtual PxBVH* createBVH(PxInputStream& stream) = 0;
359
367
375 virtual PxU32 getNbBVHs() const = 0;
376
381 {
382 return getNbBVHs();
383 }
384
399 virtual PxU32 getBVHs(PxBVH** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
400
404 PX_DEPRECATED PX_FORCE_INLINE PxU32 getBVHStructures(PxBVHStructure** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const
405 {
406 return getBVHs(userBuffer, bufferSize, startIndex);
407 }
408
410
413
425 virtual PxScene* createScene(const PxSceneDesc& sceneDesc) = 0;
426
434 virtual PxU32 getNbScenes() const = 0;
435
450 virtual PxU32 getScenes(PxScene** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
451
453
456
465 virtual PxRigidStatic* createRigidStatic(const PxTransform& pose) = 0;
466
476
490 virtual PxPruningStructure* createPruningStructure(PxRigidActor*const* actors, PxU32 nbActors) = 0;
491
493
496
513 const PxMaterial& material,
514 bool isExclusive = false,
516 {
517 PxMaterial* materialPtr = const_cast<PxMaterial*>(&material);
518 return createShape(geometry, &materialPtr, 1, isExclusive, shapeFlags);
519 }
520
537 const PxFEMSoftBodyMaterial& material,
538 bool isExclusive = false,
540 {
541 PxFEMSoftBodyMaterial* materialPtr = const_cast<PxFEMSoftBodyMaterial*>(&material);
542 return createShape(geometry, &materialPtr, 1, isExclusive, shapeFlags);
543 }
544
545#if PX_ENABLE_FEATURES_UNDER_CONSTRUCTION
562 const PxFEMClothMaterial& material,
563 bool isExclusive = false,
565 {
566 PxFEMClothMaterial* materialPtr = const_cast<PxFEMClothMaterial*>(&material);
567 return createShape(geometry, &materialPtr, 1, isExclusive, shapeFlags);
568 }
569#endif
570
588 virtual PxShape* createShape( const PxGeometry& geometry,
589 PxMaterial*const * materials,
590 PxU16 materialCount,
591 bool isExclusive = false,
593
594 virtual PxShape* createShape( const PxGeometry& geometry,
595 PxFEMSoftBodyMaterial*const * materials,
596 PxU16 materialCount,
597 bool isExclusive = false,
599
600 virtual PxShape* createShape( const PxGeometry& geometry,
601 PxFEMClothMaterial*const * materials,
602 PxU16 materialCount,
603 bool isExclusive = false,
605
613 virtual PxU32 getNbShapes() const = 0;
614
629 virtual PxU32 getShapes(PxShape** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
630
632
635
652 virtual PxConstraint* createConstraint(PxRigidActor* actor0, PxRigidActor* actor1, PxConstraintConnector& connector, const PxConstraintShaderTable& shaders, PxU32 dataSize) = 0;
653
662
663
673 virtual PxFEMCloth* createFEMCloth(PxCudaContextManager& cudaContextManager) = 0;
674
683 virtual PxSoftBody* createSoftBody(PxCudaContextManager& cudaContextManager) = 0;
684
694 virtual PxHairSystem* createHairSystem(PxCudaContextManager& cudaContextManager) = 0;
695
708 virtual PxPBDParticleSystem* createPBDParticleSystem(PxCudaContextManager& cudaContextManager, PxU32 maxNeighborhood = 96) = 0;
709
719 virtual PxFLIPParticleSystem* createFLIPParticleSystem(PxCudaContextManager& cudaContextManager) = 0;
720
732 virtual PxMPMParticleSystem* createMPMParticleSystem(PxCudaContextManager& cudaContextManager) = 0;
733
744 virtual PxCustomParticleSystem* createCustomParticleSystem(PxCudaContextManager& cudaContextManager, PxU32 maxNeighborhood) = 0;
745
756 virtual PxBuffer* createBuffer(PxU64 byteSize, PxBufferType::Enum bufferType, PxCudaContextManager* cudaContextManager) = 0;
757
768 virtual PxParticleBuffer* createParticleBuffer(PxU32 maxParticles, PxU32 maxVolumes, PxCudaContextManager* cudaContextManager) = 0;
769
782 virtual PxParticleAndDiffuseBuffer* createParticleAndDiffuseBuffer(PxU32 maxParticles, PxU32 maxVolumes, PxU32 maxDiffuseParticles, PxCudaContextManager* cudaContextManager) = 0;
783
797 virtual PxParticleClothBuffer* createParticleClothBuffer(PxU32 maxParticles, PxU32 maxNumVolumes, PxU32 maxNumCloths, PxU32 maxNumTriangles, PxU32 maxNumSprings, PxCudaContextManager* cudaContextManager) = 0;
798
810 virtual PxParticleRigidBuffer* createParticleRigidBuffer(PxU32 maxParticles, PxU32 maxNumVolumes, PxU32 maxNumRigids, PxCudaContextManager* cudaContextManager) = 0;
811
813
816
828 virtual PxMaterial* createMaterial(PxReal staticFriction, PxReal dynamicFriction, PxReal restitution) = 0;
829
837 virtual PxU32 getNbMaterials() const = 0;
838
853 virtual PxU32 getMaterials(PxMaterial** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
854
866 virtual PxFEMSoftBodyMaterial* createFEMSoftBodyMaterial(PxReal youngs, PxReal poissons, PxReal dynamicFriction) = 0;
867
875 virtual PxU32 getNbFEMSoftBodyMaterials() const = 0;
876
891 virtual PxU32 getFEMSoftBodyMaterials(PxFEMSoftBodyMaterial** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
892
905 virtual PxFEMClothMaterial* createFEMClothMaterial(PxReal youngs, PxReal poissons, PxReal dynamicFriction) = 0;
906
914 virtual PxU32 getNbFEMClothMaterials() const = 0;
915
930 virtual PxU32 getFEMClothMaterials(PxFEMClothMaterial** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
931
950 virtual PxPBDMaterial* createPBDMaterial(PxReal friction, PxReal damping, PxReal adhesion, PxReal viscosity, PxReal vorticityConfinement, PxReal surfaceTension, PxReal cohesion, PxReal lift, PxReal drag, PxReal cflCoefficient = 1.f, PxReal gravityScale = 1.f) = 0;
951
959 virtual PxU32 getNbPBDMaterials() const = 0;
960
975 virtual PxU32 getPBDMaterials(PxPBDMaterial** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
976
990 virtual PxFLIPMaterial* createFLIPMaterial(PxReal friction, PxReal damping, PxReal adhesion, PxReal viscosity, PxReal gravityScale = 1.f) = 0;
991
1000 virtual PxU32 getNbFLIPMaterials() const = 0;
1001
1017 virtual PxU32 getFLIPMaterials(PxFLIPMaterial** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
1018
1040 virtual PxMPMMaterial* createMPMMaterial(PxReal friction, PxReal damping, PxReal adhesion, bool isPlastic, PxReal youngsModulus, PxReal poissons, PxReal hardening, PxReal criticalCompression, PxReal criticalStretch, PxReal tensileDamageSensitivity, PxReal compressiveDamageSensitivity, PxReal attractiveForceResidual, PxReal gravityScale = 1.0f) = 0;
1041
1050 virtual PxU32 getNbMPMMaterials() const = 0;
1051
1067 virtual PxU32 getMPMMaterials(PxMPMMaterial** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
1068
1076 virtual PxCustomMaterial* createCustomMaterial(void* gpuBuffer) = 0;
1077
1086 virtual PxU32 getNbCustomMaterials() const = 0;
1087
1103 virtual PxU32 getCustomMaterials(PxCustomMaterial** userBuffer, PxU32 bufferSize, PxU32 startIndex = 0) const = 0;
1104
1105
1107
1110
1126 virtual void registerDeletionListener(PxDeletionListener& observer, const PxDeletionEventFlags& deletionEvents, bool restrictedObjectSet = false) = 0;
1127
1138
1154 virtual void registerDeletionListenerObjects(PxDeletionListener& observer, const PxBase* const* observables, PxU32 observableCount) = 0;
1155
1171 virtual void unregisterDeletionListenerObjects(PxDeletionListener& observer, const PxBase* const* observables, PxU32 observableCount) = 0;
1172
1182
1184};
1185
1186#if !PX_DOXYGEN
1187} // namespace physx
1188#endif
1189
1199PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterArticulationsReducedCoordinate(physx::PxPhysics& physics);
1200
1220PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterHeightFields(physx::PxPhysics& physics);
1221
1247PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API physx::PxPhysics* PX_CALL_CONV PxCreateBasePhysics( physx::PxU32 version,
1248 physx::PxFoundation& foundation,
1249 const physx::PxTolerancesScale& scale,
1250 bool trackOutstandingAllocations = false,
1251 physx::PxPvd* pvd = NULL,
1252 physx::PxOmniPvd* omniPvd = NULL);
1253
1282 physx::PxFoundation& foundation,
1283 const physx::PxTolerancesScale& scale,
1284 bool trackOutstandingAllocations = false,
1285 physx::PxPvd* pvd = NULL,
1286 physx::PxOmniPvd* omniPvd = NULL)
1287{
1288 physx::PxPhysics* physics = PxCreateBasePhysics(version, foundation, scale, trackOutstandingAllocations, pvd, omniPvd);
1289 if (!physics)
1290 return NULL;
1291
1293 PxRegisterHeightFields(*physics);
1294
1295 return physics;
1296}
1297
1298
1306#ifdef __clang__
1307#pragma clang diagnostic push
1308#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
1309#endif
1310
1311PX_C_EXPORT PX_PHYSX_CORE_API physx::PxPhysics& PX_CALL_CONV PxGetPhysics();
1312
1313#ifdef __clang__
1314#pragma clang diagnostic pop
1315#endif
1316
1318#endif
Class to aggregate actors into a single broad-phase entry.
Definition PxAggregate.h:98
A tree structure of bodies connected by joints that is treated as a unit by the dynamics solver....
Definition PxArticulationReducedCoordinate.h:448
Class representing a bounding volume hierarchy.
Definition PxBVH.h:63
Base class for objects that can be members of a PxCollection.
Definition PxBase.h:73
Buffer for delayed bulk read and write operations supporting host and GPU device memory spaces.
Definition PxBuffer.h:66
This class connects a custom constraint to the SDK.
Definition PxConstraintDesc.h:354
A plugin class for implementing constraints.
Definition PxConstraint.h:100
A convex mesh.
Definition PxConvexMesh.h:83
Definition PxPBDMaterial.h:215
interface to get notification on object deletion
Definition PxDeletionListener.h:72
Material class to represent a set of FEM material properties.
Definition PxFEMClothMaterial.h:48
Material class to represent a set of softbody FEM material properties.
Definition PxFEMSoftBodyMaterial.h:49
Material class to represent a set of FLIP particle material properties.
Definition PxFLIPMaterial.h:49
Foundation SDK singleton class.
Definition PxFoundation.h:57
A geometry object.
Definition PxGeometry.h:79
A height field class.
Definition PxHeightField.h:84
Input stream class for I/O.
Definition PxIO.h:50
Callback interface that permits TriangleMesh, Heightfield, ConvexMesh or BVH to be used directly with...
Definition PxInsertionCallback.h:57
Material class to represent a set of MPM particle material properties.
Definition PxMPMMaterial.h:94
Material class to represent a set of surface properties.
Definition PxMaterial.h:149
Definition PxOmniPvd.h:45
Material class to represent a set of PBD particle material properties.
Definition PxPBDMaterial.h:49
A particle system that uses the position based dynamics(PBD) solver.
Definition PxPBDParticleSystem.h:57
A particle buffer used to simulate diffuse particles.
Definition PxParticleBuffer.h:283
The shared base class for all particle buffers, can be instantiated directly to simulate granular and...
Definition PxParticleBuffer.h:81
A particle buffer used to simulate particle cloth.
Definition PxParticleBuffer.h:429
A particle buffer used to simulate rigid bodies using shape matching with particles.
Definition PxParticleBuffer.h:491
Abstract singleton factory class used for instancing objects in the Physics SDK.
Definition PxPhysics.h:91
virtual PxSoftBodyMesh * createSoftBodyMesh(PxInputStream &stream)=0
Creates a softbody mesh object.
virtual PxU32 getMaterials(PxMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of rigid body material pointers to a user buffer.
virtual PxU32 getNbFEMClothMaterials() const =0
Return the number of FEM cloth materials that currently exist.
virtual PxRigidStatic * createRigidStatic(const PxTransform &pose)=0
Creates a static rigid actor with the specified pose and all other fields initialized to their defaul...
virtual PxFLIPParticleSystem * createFLIPParticleSystem(PxCudaContextManager &cudaContextManager)=0
Creates a particle system with a fluid-implicit particle solver (FLIP).
virtual PxTetrahedronMesh * createTetrahedronMesh(PxInputStream &stream)=0
Creates a tetrahedron mesh object.
virtual void registerDeletionListenerObjects(PxDeletionListener &observer, const PxBase *const *observables, PxU32 observableCount)=0
Register specific objects for deletion events.
virtual void release()=0
Destroys the instance it is called on.
virtual PxConstraint * createConstraint(PxRigidActor *actor0, PxRigidActor *actor1, PxConstraintConnector &connector, const PxConstraintShaderTable &shaders, PxU32 dataSize)=0
Creates a constraint shader.
PX_DEPRECATED PX_FORCE_INLINE PxU32 getBVHStructures(PxBVHStructure **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const
Definition PxPhysics.h:404
virtual PxBuffer * createBuffer(PxU64 byteSize, PxBufferType::Enum bufferType, PxCudaContextManager *cudaContextManager)=0
Create a buffer for reading and writing data across host and device memory spaces.
virtual PxCustomParticleSystem * createCustomParticleSystem(PxCudaContextManager &cudaContextManager, PxU32 maxNeighborhood)=0
Creates a customizable particle system to simulate effects that are not supported by PhysX natively (...
virtual PxU32 getMPMMaterials(PxMPMMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of MPM material pointers to a user buffer.
virtual PxHairSystem * createHairSystem(PxCudaContextManager &cudaContextManager)=0
Creates a hair system with all fields initialized to their default values.
virtual PxFEMCloth * createFEMCloth(PxCudaContextManager &cudaContextManager)=0
Creates a FEM-based cloth with all fields initialized to their default values.
virtual PxU32 getNbHeightFields() const =0
Return the number of heightfields that currently exist.
virtual PxU32 getNbFEMSoftBodyMaterials() const =0
Return the number of FEM soft body materials that currently exist.
PX_DEPRECATED PX_FORCE_INLINE PxU32 getNbBVHStructures() const
Definition PxPhysics.h:380
virtual PxHeightField * createHeightField(PxInputStream &stream)=0
Creates a heightfield object from previously cooked stream.
virtual PxU32 getTriangleMeshes(PxTriangleMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of triangle mesh pointers to a user buffer.
virtual PxU32 getFEMSoftBodyMaterials(PxFEMSoftBodyMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of FEM soft body material pointers to a user buffer.
virtual PxScene * createScene(const PxSceneDesc &sceneDesc)=0
Creates a scene.
virtual PxFEMSoftBodyMaterial * createFEMSoftBodyMaterial(PxReal youngs, PxReal poissons, PxReal dynamicFriction)=0
Creates a new FEM soft body material with certain default properties.
virtual PxU32 getNbPBDMaterials() const =0
Return the number of PBD materials that currently exist.
virtual PxAggregate * createAggregate(PxU32 maxActor, PxU32 maxShape, PxAggregateFilterHint filterHint)=0
Creates an aggregate with the specified maximum size and filtering hint.
virtual void unregisterDeletionListener(PxDeletionListener &observer)=0
Unregister a deletion listener.
virtual PxConvexMesh * createConvexMesh(PxInputStream &stream)=0
Creates a convex mesh object.
virtual PxBVH * createBVH(PxInputStream &stream)=0
Creates a bounding volume hierarchy.
virtual PxMPMMaterial * createMPMMaterial(PxReal friction, PxReal damping, PxReal adhesion, bool isPlastic, PxReal youngsModulus, PxReal poissons, PxReal hardening, PxReal criticalCompression, PxReal criticalStretch, PxReal tensileDamageSensitivity, PxReal compressiveDamageSensitivity, PxReal attractiveForceResidual, PxReal gravityScale=1.0f)=0
Creates a new MPM material with certain default properties.
PX_FORCE_INLINE PxShape * createShape(const PxGeometry &geometry, const PxMaterial &material, bool isExclusive=false, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)
Creates a shape which may be attached to multiple actors.
Definition PxPhysics.h:512
virtual void registerDeletionListener(PxDeletionListener &observer, const PxDeletionEventFlags &deletionEvents, bool restrictedObjectSet=false)=0
Register a deletion listener. Listeners will be called whenever an object is deleted.
virtual PxU32 getBVHs(PxBVH **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of bounding volume hierarchy pointers to a user buffer.
virtual PxParticleRigidBuffer * createParticleRigidBuffer(PxU32 maxParticles, PxU32 maxNumVolumes, PxU32 maxNumRigids, PxCudaContextManager *cudaContextManager)=0
Create a particle buffer to simulate rigid bodies using shape matching with particles.
virtual PxU32 getNbCustomMaterials() const =0
Return the number of custom materials that currently exist.
PX_FORCE_INLINE PX_DEPRECATED PxAggregate * createAggregate(PxU32 maxActor, PxAggregateFilterHint filterHint)
Creates an aggregate with the specified maximum size and filtering hint.
Definition PxPhysics.h:170
PX_FORCE_INLINE PxShape * createShape(const PxGeometry &geometry, const PxFEMSoftBodyMaterial &material, bool isExclusive=false, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)
Creates a shape which may be attached to one or more softbody actors.
Definition PxPhysics.h:536
PX_DEPRECATED PX_FORCE_INLINE PxBVH * createBVHStructure(PxInputStream &stream)
Definition PxPhysics.h:363
virtual PxSoftBody * createSoftBody(PxCudaContextManager &cudaContextManager)=0
Creates a FEM-based soft body with all fields initialized to their default values.
virtual PxU32 getFEMClothMaterials(PxFEMClothMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of FEM cloth material pointers to a user buffer.
virtual PxU32 getNbTetrahedronMeshes() const =0
Return the number of tetrahedron meshes that currently exist.
virtual PxTriangleMesh * createTriangleMesh(PxInputStream &stream)=0
Creates a triangle mesh object.
virtual PxParticleBuffer * createParticleBuffer(PxU32 maxParticles, PxU32 maxVolumes, PxCudaContextManager *cudaContextManager)=0
Create particle buffer to simulate fluid/granular material.
virtual PxU32 getNbTriangleMeshes() const =0
Return the number of triangle meshes that currently exist.
virtual PxShape * createShape(const PxGeometry &geometry, PxMaterial *const *materials, PxU16 materialCount, bool isExclusive=false, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)=0
Creates a shape which may be attached to multiple actors.
virtual const PxTolerancesScale & getTolerancesScale() const =0
Returns the simulation tolerance parameters.
virtual PxU32 getTetrahedronMeshes(PxTetrahedronMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of tetrahedron mesh pointers to a user buffer.
virtual PxMPMParticleSystem * createMPMParticleSystem(PxCudaContextManager &cudaContextManager)=0
Creates a particle system with a material-point-method solver (MPM).
virtual PxCustomMaterial * createCustomMaterial(void *gpuBuffer)=0
Creates a new material for custom particle systems.
virtual PxU32 getFLIPMaterials(PxFLIPMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of FLIP material pointers to a user buffer.
virtual PxU32 getNbShapes() const =0
Return the number of shapes that currently exist.
virtual PxOmniPvd * getOmniPvd()=0
Retrieves the PxOmniPvd instance if there is one registered with PxPhysics.
virtual PxPBDMaterial * createPBDMaterial(PxReal friction, PxReal damping, PxReal adhesion, PxReal viscosity, PxReal vorticityConfinement, PxReal surfaceTension, PxReal cohesion, PxReal lift, PxReal drag, PxReal cflCoefficient=1.f, PxReal gravityScale=1.f)=0
Creates a new PBD material with certain default properties.
virtual PxPruningStructure * createPruningStructure(PxRigidActor *const *actors, PxU32 nbActors)=0
Creates a pruning structure from actors.
virtual PxU32 getHeightFields(PxHeightField **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of heightfield pointers to a user buffer.
virtual PxFLIPMaterial * createFLIPMaterial(PxReal friction, PxReal damping, PxReal adhesion, PxReal viscosity, PxReal gravityScale=1.f)=0
Creates a new FLIP material with certain default properties.
virtual PxFoundation & getFoundation()=0
Retrieves the Foundation instance.
virtual PxParticleClothBuffer * createParticleClothBuffer(PxU32 maxParticles, PxU32 maxNumVolumes, PxU32 maxNumCloths, PxU32 maxNumTriangles, PxU32 maxNumSprings, PxCudaContextManager *cudaContextManager)=0
Create a particle buffer to simulate particle cloth.
virtual PxU32 getPBDMaterials(PxPBDMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of PBD material pointers to a user buffer.
virtual PxU32 getShapes(PxShape **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of shape pointers to a user buffer.
virtual PxU32 getCustomMaterials(PxCustomMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of custom material pointers to a user buffer.
virtual PxFEMClothMaterial * createFEMClothMaterial(PxReal youngs, PxReal poissons, PxReal dynamicFriction)=0
Creates a new FEM cloth material with certain default properties.
virtual PxU32 getNbFLIPMaterials() const =0
Return the number of FLIP materials that currently exist.
virtual PxU32 getScenes(PxScene **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of scene pointers to a user buffer.
virtual PxU32 getNbMPMMaterials() const =0
Return the number of MPM materials that currently exist.
virtual PxU32 getNbBVHs() const =0
Return the number of bounding volume hierarchies that currently exist.
virtual PxMaterial * createMaterial(PxReal staticFriction, PxReal dynamicFriction, PxReal restitution)=0
Creates a new rigid body material with certain default properties.
virtual PxPBDParticleSystem * createPBDParticleSystem(PxCudaContextManager &cudaContextManager, PxU32 maxNeighborhood=96)=0
Creates a particle system with a position-based dynamics (PBD) solver.
virtual PxArticulationReducedCoordinate * createArticulationReducedCoordinate()=0
Creates a reduced-coordinate articulation with all fields initialized to their default values.
virtual PxU32 getNbMaterials() const =0
Return the number of rigid body materials that currently exist.
virtual PxU32 getNbScenes() const =0
Gets number of created scenes.
virtual PxInsertionCallback & getPhysicsInsertionCallback()=0
Gets PxPhysics object insertion interface.
virtual PxParticleAndDiffuseBuffer * createParticleAndDiffuseBuffer(PxU32 maxParticles, PxU32 maxVolumes, PxU32 maxDiffuseParticles, PxCudaContextManager *cudaContextManager)=0
Create a particle buffer for fluid dynamics with diffuse particles. Diffuse particles are used to sim...
virtual PxU32 getConvexMeshes(PxConvexMesh **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
Writes the array of convex mesh pointers to a user buffer.
virtual void unregisterDeletionListenerObjects(PxDeletionListener &observer, const PxBase *const *observables, PxU32 observableCount)=0
Unregister specific objects for deletion events.
virtual PxU32 getNbConvexMeshes() const =0
Return the number of convex meshes that currently exist.
virtual PxRigidDynamic * createRigidDynamic(const PxTransform &pose)=0
Creates a dynamic rigid actor with the specified pose and all other fields initialized to their defau...
A precomputed pruning structure to accelerate scene queries against newly added actors.
Definition PxPruningStructure.h:61
PxPvd is the top-level class for the PVD framework, and the main customer interface for PVD configura...
Definition PxPvd.h:114
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition PxRigidActor.h:53
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK.
Definition PxRigidDynamic.h:82
PxRigidStatic represents a static rigid body simulation object in the physics SDK.
Definition PxRigidStatic.h:58
Descriptor class for scenes. See #PxScene.
Definition PxSceneDesc.h:426
A scene is a collection of bodies and constraints which can interact.
Definition PxScene.h:178
Abstract class for collision shapes.
Definition PxShape.h:146
A softbody mesh, containing structures to store collision shape, simulation shape and deformation sta...
Definition PxTetrahedronMesh.h:214
Represents a FEM softbody including everything to calculate its definition like geometry and material...
Definition PxSoftBody.h:104
A tetramedron mesh, also called a 'tetrahedron soup'.
Definition PxTetrahedronMesh.h:115
Class to define the scale at which simulation runs. Most simulation tolerances are calculated in term...
Definition PxTolerancesScale.h:53
class representing a rigid euclidean transform as a quaternion and a vector
Definition PxTransform.h:49
A triangle mesh, also called a 'polygon soup'.
Definition PxTriangleMesh.h:118
#define PX_CALL_CONV
Definition PxPreprocessor.h:299
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_INLINE
Definition PxPreprocessor.h:320
#define PX_DEPRECATED
Definition PxPreprocessor.h:418
PX_C_EXPORT PX_PHYSX_CORE_API physx::PxPhysics &PX_CALL_CONV PxGetPhysics()
Retrieves the Physics SDK after it has been created.
Definition NpPhysics.cpp:1735
PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API physx::PxPhysics *PX_CALL_CONV PxCreateBasePhysics(physx::PxU32 version, physx::PxFoundation &foundation, const physx::PxTolerancesScale &scale, bool trackOutstandingAllocations=false, physx::PxPvd *pvd=NULL, physx::PxOmniPvd *omniPvd=NULL)
Creates an instance of the physics SDK with minimal additional components registered.
Definition NpPhysics.cpp:1740
PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterHeightFields(physx::PxPhysics &physics)
Enables the usage of the heightfield feature.
Definition NpPhysics.cpp:1759
PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterArticulationsReducedCoordinate(physx::PxPhysics &physics)
Enables the usage of the reduced coordinate articulations feature. This function is called automatica...
Definition NpPhysics.cpp:1752
PX_INLINE physx::PxPhysics * PxCreatePhysics(physx::PxU32 version, physx::PxFoundation &foundation, const physx::PxTolerancesScale &scale, bool trackOutstandingAllocations=false, physx::PxPvd *pvd=NULL, physx::PxOmniPvd *omniPvd=NULL)
Creates an instance of the physics SDK.
Definition PxPhysics.h:1281
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_DEPRECATED PxBVH PxBVHStructure
Definition PxPhysics.h:73
a table of function pointers for a constraint
Definition PxConstraint.h:87
@ 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