29#ifndef PX_SCENE_DESC_H
30#define PX_SCENE_DESC_H
35#include "PxSceneQueryDesc.h"
36#include "PxPhysXConfig.h"
37#include "foundation/PxFlags.h"
38#include "foundation/PxBounds3.h"
39#include "foundation/PxBitUtils.h"
40#include "PxFiltering.h"
41#include "PxBroadPhase.h"
42#include "common/PxTolerancesScale.h"
43#include "task/PxTask.h"
50 class PxBroadPhaseCallback;
51 class PxCudaContextManager;
240 eENABLE_GPU_DYNAMICS = (1 << 13),
285 eSUPPRESS_READBACK = (1<<16),
290 eFORCE_READBACK = (1 << 17),
349 maxNbStaticShapes (0),
350 maxNbDynamicShapes (0),
352 maxNbConstraints (0),
354 maxNbBroadPhaseOverlaps (0)
385 PxU32 maxSoftBodyContacts;
386 PxU32 maxFemClothContacts;
387 PxU32 maxParticleContacts;
388 PxU32 collisionStackSize;
389 PxU32 maxHairContacts;
399 maxSoftBodyContacts(1 * 1024 * 1024),
400 maxFemClothContacts(1 * 1024 * 1024),
401 maxParticleContacts(1*1024*1024),
402 collisionStackSize(64*1024*1024),
403 maxHairContacts(1 * 1024 * 1024)
407 PX_PHYSX_CORE_API
bool isValid()
const;
410PX_INLINE bool PxgDynamicsMemoryConfig::isValid()
const
913 simulationEventCallback (NULL),
914 contactModifyCallback (NULL),
915 ccdContactModifyCallback (NULL),
917 filterShaderData (NULL),
918 filterShaderDataSize (0),
920 filterCallback (NULL),
926 broadPhaseCallback (NULL),
930 bounceThresholdVelocity (0.2f * scale.speed),
931 frictionOffsetThreshold (0.04f * scale.length),
932 frictionCorrelationDistance (0.025f * scale.length),
936 cpuDispatcher (NULL),
937 cudaContextManager (NULL),
941 solverBatchSize (128),
942 solverArticulationBatchSize (16),
944 nbContactDataBlocks (0),
945 maxNbContactDataBlocks (1<<16),
946 maxBiasCoefficient (PX_MAX_F32),
947 contactReportStreamBufferSize (8192),
949 ccdThreshold (PX_MAX_F32),
950 ccdMaxSeparation (0.04f * scale.length),
951 wakeCounterResetValue (20.0f*0.02f),
953 gpuMaxNumPartitions (8),
954 gpuMaxNumStaticPartitions (16),
955 gpuComputeVersion (0),
956 contactPairSlabSize (256),
957 sceneQuerySystem (NULL),
958 tolerancesScale (scale)
1014#if PX_SUPPORT_GPU_PHYSX
1024 if (
flags & PxSceneFlag::eSUPPRESS_READBACK)
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
PX_CUDA_CALLABLE PX_FORCE_INLINE bool isValid() const
Definition PxBounds3.h:482
Broad-phase callback to receive broad-phase related events.
Definition PxScene.h:144
A CpuDispatcher is responsible for scheduling the execution of tasks passed to it by the SDK.
Definition PxCpuDispatcher.h:50
Container for bitfield flag variables associated with a specific enum type.
Definition PxFlags.h:73
Descriptor class for scenes. See #PxScene.
Definition PxSceneDesc.h:426
PX_INLINE bool isValid() const
Returns true if the descriptor is valid.
Definition PxSceneDesc.h:967
PxU32 gpuMaxNumStaticPartitions
Limitation for the number of static rigid body partitions in the GPU dynamics pipeline....
Definition PxSceneDesc.h:835
PxSceneQuerySystem * sceneQuerySystem
The scene query sub-system for the scene.
Definition PxSceneDesc.h:862
PxCCDContactModifyCallback * ccdContactModifyCallback
Possible asynchronous callback for contact modification.
Definition PxSceneDesc.h:466
PxBroadPhaseType::Enum broadPhaseType
Selects the broad-phase algorithm to use.
Definition PxSceneDesc.h:534
PxPairFilteringMode::Enum kineKineFilteringMode
Filtering mode for kinematic-kinematic pairs in the broadphase.
Definition PxSceneDesc.h:516
PxU32 maxNbContactDataBlocks
Setting to define the maximum number of 16K blocks that can be allocated to store contact,...
Definition PxSceneDesc.h:713
PxSimulationEventCallback * simulationEventCallback
Possible notification callback.
Definition PxSceneDesc.h:448
PxReal ccdThreshold
CCD threshold.
Definition PxSceneDesc.h:780
void * userData
Will be copied to PxScene::userData.
Definition PxSceneDesc.h:644
PxU32 gpuComputeVersion
Defines which compute version the GPU dynamics should target. DO NOT MODIFY.
Definition PxSceneDesc.h:840
PxgDynamicsMemoryConfig gpuDynamicsConfig
The pre-allocations performed in the GPU dynamics pipeline.
Definition PxSceneDesc.h:820
PxContactModifyCallback * contactModifyCallback
Possible asynchronous callback for contact modification.
Definition PxSceneDesc.h:457
const void * filterShaderData
Shared global filter data which will get passed into the filter shader.
Definition PxSceneDesc.h:477
PxVec3 gravity
Gravity vector.
Definition PxSceneDesc.h:439
PxU32 contactReportStreamBufferSize
Size of the contact report stream (in bytes).
Definition PxSceneDesc.h:748
PxReal frictionCorrelationDistance
Friction correlation distance used to decide whether contacts are close enough to be merged into a si...
Definition PxSceneDesc.h:612
PxU32 ccdMaxPasses
Maximum number of CCD passes.
Definition PxSceneDesc.h:763
PxSolverType::Enum solverType
Selects the solver algorithm to use.
Definition PxSceneDesc.h:570
PxU32 filterShaderDataSize
Size (in bytes) of the shared global filter data filterShaderData.
Definition PxSceneDesc.h:486
PxSimulationFilterShader filterShader
The custom filter shader to use for collision filtering.
Definition PxSceneDesc.h:497
PxSimulationFilterCallback * filterCallback
A custom collision filter callback which can be used to implement more complex filtering operations w...
Definition PxSceneDesc.h:507
PxBroadPhaseCallback * broadPhaseCallback
Broad-phase callback.
Definition PxSceneDesc.h:543
PxReal wakeCounterResetValue
The wake counter reset value.
Definition PxSceneDesc.h:804
PxU32 nbContactDataBlocks
Setting to define the number of 16K blocks that will be initially reserved to store contact,...
Definition PxSceneDesc.h:693
PxBounds3 sanityBounds
The bounds used to sanity check user-set positions of actors and articulation links.
Definition PxSceneDesc.h:815
PxReal bounceThresholdVelocity
A contact with a relative velocity below this will not bounce. A typical value for simulation....
Definition PxSceneDesc.h:581
PX_INLINE PxSceneDesc(const PxTolerancesScale &scale)
constructor sets to default.
Definition PxSceneDesc.h:911
PxCpuDispatcher * cpuDispatcher
The CPU task dispatcher for the scene.
Definition PxSceneDesc.h:628
PxSceneLimits limits
Expected scene limits.
Definition PxSceneDesc.h:550
PxFrictionType::Enum frictionType
Selects the friction algorithm to use for simulation.
Definition PxSceneDesc.h:561
PxU32 solverArticulationBatchSize
Defines the number of articulations required to spawn a separate rigid body solver island task chain.
Definition PxSceneDesc.h:678
PxPairFilteringMode::Enum staticKineFilteringMode
Filtering mode for static-kinematic pairs in the broadphase.
Definition PxSceneDesc.h:525
PxCudaContextManager * cudaContextManager
The CUDA context manager for the scene.
Definition PxSceneDesc.h:637
PxReal maxBiasCoefficient
The maximum bias coefficient used in the constraint solver.
Definition PxSceneDesc.h:732
PxU32 contactPairSlabSize
Defines the size of a contact pool slab. Contact pairs and associated data are allocated using a pool...
Definition PxSceneDesc.h:851
PxU32 solverBatchSize
Defines the number of actors required to spawn a separate rigid body solver island task chain.
Definition PxSceneDesc.h:661
PxU32 gpuMaxNumPartitions
Limitation for the partitions in the GPU dynamics pipeline. This variable must be power of 2....
Definition PxSceneDesc.h:828
PxSceneFlags flags
Flags used to select scene options.
Definition PxSceneDesc.h:621
PxReal ccdMaxSeparation
A threshold for speculative CCD. Used to control whether bias, restitution or a combination of the tw...
Definition PxSceneDesc.h:792
PxReal frictionOffsetThreshold
A threshold of contact separation distance used to decide if a contact point will experience friction...
Definition PxSceneDesc.h:598
Class used to retrieve limits(e.g. maximum number of bodies) for a scene. The limits are used as a hi...
Definition PxSceneDesc.h:318
PxU32 maxNbConstraints
Expected maximum number of constraint shaders.
Definition PxSceneDesc.h:325
PX_INLINE PxSceneLimits()
constructor sets to default
Definition PxSceneDesc.h:346
PxU32 maxNbStaticShapes
Expected maximum number of static shapes.
Definition PxSceneDesc.h:322
PxU32 maxNbDynamicShapes
Expected maximum number of dynamic shapes.
Definition PxSceneDesc.h:323
PX_INLINE bool isValid() const
Returns true if the descriptor is valid.
Definition PxSceneDesc.h:363
PxU32 maxNbRegions
Expected maximum number of broad-phase regions.
Definition PxSceneDesc.h:326
PxU32 maxNbActors
Expected maximum number of actors.
Definition PxSceneDesc.h:320
PxU32 maxNbBroadPhaseOverlaps
Expected maximum number of broad-phase overlaps.
Definition PxSceneDesc.h:327
PxU32 maxNbBodies
Expected maximum number of dynamic rigid bodies.
Definition PxSceneDesc.h:321
PX_INLINE void setToDefault()
(re)sets the structure to the default
Definition PxSceneDesc.h:358
PxU32 maxNbAggregates
Expected maximum number of aggregates.
Definition PxSceneDesc.h:324
Descriptor class for scene query system. See #PxSceneQuerySystem.
Definition PxSceneQueryDesc.h:145
PX_INLINE bool isValid() const
Returns true if the descriptor is valid.
Definition PxSceneQueryDesc.h:312
PX_INLINE void setToDefault()
(re)sets the structure to the default.
Definition PxSceneQueryDesc.h:307
Scene-queries external sub-system for PxScene-based objects.
Definition PxSceneQuerySystem.h:421
An interface class that the user can implement in order to receive simulation events.
Definition PxSimulationEventCallback.h:792
Filter callback to specify handling of collision pairs.
Definition PxFiltering.h:633
Class to define the scale at which simulation runs. Most simulation tolerances are calculated in term...
Definition PxTolerancesScale.h:53
3 Element vector class.
Definition PxVec3.h:50
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxFlags< PxSceneFlag::Enum, PxU32 > PxSceneFlags
collection of set bits defined in PxSceneFlag.
Definition PxSceneDesc.h:301
PxFilterFlags(* PxSimulationFilterShader)(PxFilterObjectAttributes attributes0, PxFilterData filterData0, PxFilterObjectAttributes attributes1, PxFilterData filterData1, PxPairFlags &pairFlags, const void *constantBlock, PxU32 constantBlockSize)
Filter method to specify how a pair of potentially colliding objects should be processed.
Definition PxFiltering.h:604
Broad phase algorithm used in the simulation.
Definition PxBroadPhase.h:77
Enum
Definition PxBroadPhase.h:79
@ eGPU
GPU broad phase.
Definition PxBroadPhase.h:84
Enum for selecting the friction algorithm used for simulation.
Definition PxSceneDesc.h:69
Enum
Definition PxSceneDesc.h:71
@ eFRICTION_COUNT
The total number of friction models supported by the SDK.
Definition PxSceneDesc.h:75
@ ePATCH
Select default patch-friction model.
Definition PxSceneDesc.h:72
@ eTWO_DIRECTIONAL
Select two directional per-contact friction model.
Definition PxSceneDesc.h:74
@ eONE_DIRECTIONAL
Select one directional per-contact friction model.
Definition PxSceneDesc.h:73
Definition PxFiltering.h:715
Enum
Definition PxFiltering.h:717
flags for configuring properties of the scene
Definition PxSceneDesc.h:101
Enum
Definition PxSceneDesc.h:103
@ eENABLE_AVERAGE_POINT
Enables average points in contact manifolds.
Definition PxSceneDesc.h:218
@ eENABLE_ACTIVE_ACTORS
Enable Active Actors Notification.
Definition PxSceneDesc.h:116
@ eENABLE_ENHANCED_DETERMINISM
Provides improved determinism at the expense of performance.
Definition PxSceneDesc.h:263
@ eDISABLE_CONTACT_REPORT_BUFFER_RESIZE
Disable contact report buffer resize. Once the contact buffer is full, the rest of the contact report...
Definition PxSceneDesc.h:170
@ eDISABLE_CONTACT_CACHE
Disable contact cache.
Definition PxSceneDesc.h:182
@ eENABLE_STABILIZATION
Enables additional stabilization pass in solver.
Definition PxSceneDesc.h:208
@ eENABLE_FRICTION_EVERY_ITERATION
Controls processing friction in all solver iterations.
Definition PxSceneDesc.h:279
@ eDISABLE_CCD_RESWEEP
Enables a simplified swept integration strategy, which sacrifices some accuracy for improved performa...
Definition PxSceneDesc.h:151
@ eENABLE_PCM
Enable GJK-based distance collision detection system.
Definition PxSceneDesc.h:160
@ eENABLE_CCD
Enables a second broad phase check after integration that makes it possible to prevent objects from t...
Definition PxSceneDesc.h:130
@ eREQUIRE_RW_LOCK
Require scene-level locking.
Definition PxSceneDesc.h:199
@ eEXCLUDE_KINEMATICS_FROM_ACTIVE_ACTORS
Do not report kinematics in list of active actors.
Definition PxSceneDesc.h:232
Enum for selecting the type of solver used for the simulation.
Definition PxSceneDesc.h:87
Enum
Definition PxSceneDesc.h:89
@ eTGS
Default Temporal Gauss-Seidel solver.
Definition PxSceneDesc.h:91
@ ePGS
Projected Gauss-Seidel iterative solver.
Definition PxSceneDesc.h:90
Sizes of pre-allocated buffers use for GPU dynamics.
Definition PxSceneDesc.h:377
PxU32 heapCapacity
Initial capacity of the GPU and pinned host memory heaps. Additional memory will be allocated if more...
Definition PxSceneDesc.h:381
PxU32 maxRigidContactCount
Size of contact stream buffer allocated in pinned host memory. This is double-buffered so total alloc...
Definition PxSceneDesc.h:379
PxU32 foundLostAggregatePairsCapacity
Capacity of found and lost buffers in aggregate system allocated in GPU global memory....
Definition PxSceneDesc.h:383
PxU32 totalAggregatePairsCapacity
Capacity of total number of aggregate pairs allocated in GPU global memory.
Definition PxSceneDesc.h:384
PxU32 maxRigidPatchCount
Size of the contact patch stream buffer allocated in pinned host memory. This is double-buffered so t...
Definition PxSceneDesc.h:380
PxU32 foundLostPairsCapacity
Capacity of found and lost buffers allocated in GPU global memory. This is used for the found/lost pa...
Definition PxSceneDesc.h:382
PxU32 tempBufferCapacity
Capacity of temp buffer allocated in pinned host memory.
Definition PxSceneDesc.h:378