|
RavEngine
|
Descriptor class for scenes. See #PxScene. More...
#include <PxSceneDesc.h>
Public Member Functions | |
| PX_INLINE | PxSceneDesc (const PxTolerancesScale &scale) |
| constructor sets to default. | |
| PX_INLINE void | setToDefault (const PxTolerancesScale &scale) |
| (re)sets the structure to the default. | |
| PX_INLINE bool | isValid () const |
| Returns true if the descriptor is valid. | |
Public Member Functions inherited from physx::PxSceneQueryDesc | |
| PX_INLINE | PxSceneQueryDesc () |
| constructor sets to default. | |
| PX_INLINE void | setToDefault () |
| (re)sets the structure to the default. | |
| PX_INLINE bool | isValid () const |
| Returns true if the descriptor is valid. | |
Public Attributes | |
| PxVec3 | gravity |
| Gravity vector. | |
| PxSimulationEventCallback * | simulationEventCallback |
| Possible notification callback. | |
| PxContactModifyCallback * | contactModifyCallback |
| Possible asynchronous callback for contact modification. | |
| PxCCDContactModifyCallback * | ccdContactModifyCallback |
| Possible asynchronous callback for contact modification. | |
| const void * | filterShaderData |
| Shared global filter data which will get passed into the filter shader. | |
| PxU32 | filterShaderDataSize |
| Size (in bytes) of the shared global filter data filterShaderData. | |
| PxSimulationFilterShader | filterShader |
| The custom filter shader to use for collision filtering. | |
| PxSimulationFilterCallback * | filterCallback |
| A custom collision filter callback which can be used to implement more complex filtering operations which need access to the simulation state, for example. | |
| PxPairFilteringMode::Enum | kineKineFilteringMode |
| Filtering mode for kinematic-kinematic pairs in the broadphase. | |
| PxPairFilteringMode::Enum | staticKineFilteringMode |
| Filtering mode for static-kinematic pairs in the broadphase. | |
| PxBroadPhaseType::Enum | broadPhaseType |
| Selects the broad-phase algorithm to use. | |
| PxBroadPhaseCallback * | broadPhaseCallback |
| Broad-phase callback. | |
| PxSceneLimits | limits |
| Expected scene limits. | |
| PxFrictionType::Enum | frictionType |
| Selects the friction algorithm to use for simulation. | |
| PxSolverType::Enum | solverType |
| Selects the solver algorithm to use. | |
| PxReal | bounceThresholdVelocity |
| A contact with a relative velocity below this will not bounce. A typical value for simulation. stability is about 0.2 * gravity. | |
| PxReal | frictionOffsetThreshold |
| A threshold of contact separation distance used to decide if a contact point will experience friction forces. | |
| PxReal | frictionCorrelationDistance |
| Friction correlation distance used to decide whether contacts are close enough to be merged into a single friction anchor point or not. | |
| PxSceneFlags | flags |
| Flags used to select scene options. | |
| PxCpuDispatcher * | cpuDispatcher |
| The CPU task dispatcher for the scene. | |
| PxCudaContextManager * | cudaContextManager |
| The CUDA context manager for the scene. | |
| void * | userData |
| Will be copied to PxScene::userData. | |
| PxU32 | solverBatchSize |
| Defines the number of actors required to spawn a separate rigid body solver island task chain. | |
| PxU32 | solverArticulationBatchSize |
| Defines the number of articulations required to spawn a separate rigid body solver island task chain. | |
| PxU32 | nbContactDataBlocks |
| Setting to define the number of 16K blocks that will be initially reserved to store contact, friction, and contact cache data. This is the number of 16K memory blocks that will be automatically allocated from the user allocator when the scene is instantiated. Further 16k memory blocks may be allocated during the simulation up to maxNbContactDataBlocks. | |
| PxU32 | maxNbContactDataBlocks |
| Setting to define the maximum number of 16K blocks that can be allocated to store contact, friction, and contact cache data. As the complexity of a scene increases, the SDK may require to allocate new 16k blocks in addition to the blocks it has already allocated. This variable controls the maximum number of blocks that the SDK can allocate. | |
| PxReal | maxBiasCoefficient |
| The maximum bias coefficient used in the constraint solver. | |
| PxU32 | contactReportStreamBufferSize |
| Size of the contact report stream (in bytes). | |
| PxU32 | ccdMaxPasses |
| Maximum number of CCD passes. | |
| PxReal | ccdThreshold |
| CCD threshold. | |
| PxReal | ccdMaxSeparation |
| A threshold for speculative CCD. Used to control whether bias, restitution or a combination of the two are used to resolve the contacts. | |
| PxReal | wakeCounterResetValue |
| The wake counter reset value. | |
| PxBounds3 | sanityBounds |
| The bounds used to sanity check user-set positions of actors and articulation links. | |
| PxgDynamicsMemoryConfig | gpuDynamicsConfig |
| The pre-allocations performed in the GPU dynamics pipeline. | |
| PxU32 | gpuMaxNumPartitions |
| Limitation for the partitions in the GPU dynamics pipeline. This variable must be power of 2. A value greater than 32 is currently not supported. Range: (1, 32) | |
| PxU32 | gpuMaxNumStaticPartitions |
| Limitation for the number of static rigid body partitions in the GPU dynamics pipeline. Range: (1, 255) Default: 16. | |
| PxU32 | gpuComputeVersion |
| Defines which compute version the GPU dynamics should target. DO NOT MODIFY. | |
| PxU32 | contactPairSlabSize |
| Defines the size of a contact pool slab. Contact pairs and associated data are allocated using a pool allocator. Increasing the slab size can trade off some performance spikes when a large number of new contacts are found for an increase in overall memory usage. | |
| PxSceneQuerySystem * | sceneQuerySystem |
| The scene query sub-system for the scene. | |
Public Attributes inherited from physx::PxSceneQueryDesc | |
| PxPruningStructureType::Enum | staticStructure |
| Defines the structure used to store static objects (PxRigidStatic actors). | |
| PxPruningStructureType::Enum | dynamicStructure |
| Defines the structure used to store dynamic objects (non-PxRigidStatic actors). | |
| PxU32 | dynamicTreeRebuildRateHint |
| Hint for how much work should be done per simulation frame to rebuild the pruning structures. | |
| PxDynamicTreeSecondaryPruner::Enum | dynamicTreeSecondaryPruner |
| Secondary pruner for dynamic tree. | |
| PxBVHBuildStrategy::Enum | staticBVHBuildStrategy |
| Build strategy for PxSceneQueryDesc::staticStructure. | |
| PxBVHBuildStrategy::Enum | dynamicBVHBuildStrategy |
| Build strategy for PxSceneQueryDesc::dynamicStructure. | |
| PxU32 | staticNbObjectsPerNode |
| Number of objects per node for PxSceneQueryDesc::staticStructure. | |
| PxU32 | dynamicNbObjectsPerNode |
| Number of objects per node for PxSceneQueryDesc::dynamicStructure. | |
| PxSceneQueryUpdateMode::Enum | sceneQueryUpdateMode |
| Defines the scene query update mode. | |
Descriptor class for scenes. See #PxScene.
This struct must be initialized with the same PxTolerancesScale values used to initialize PxPhysics.
| PX_INLINE physx::PxSceneDesc::PxSceneDesc | ( | const PxTolerancesScale & | scale | ) |
constructor sets to default.
| [in] | scale | scale values for the tolerances in the scene, these must be the same values passed into PxCreatePhysics(). The affected tolerances are bounceThresholdVelocity and frictionOffsetThreshold. |
| PX_INLINE bool physx::PxSceneDesc::isValid | ( | ) | const |
Returns true if the descriptor is valid.
| PX_INLINE void physx::PxSceneDesc::setToDefault | ( | const PxTolerancesScale & | scale | ) |
(re)sets the structure to the default.
| [in] | scale | scale values for the tolerances in the scene, these must be the same values passed into PxCreatePhysics(). The affected tolerances are bounceThresholdVelocity and frictionOffsetThreshold. |
| PxReal physx::PxSceneDesc::bounceThresholdVelocity |
A contact with a relative velocity below this will not bounce. A typical value for simulation. stability is about 0.2 * gravity.
Range: (0, PX_MAX_F32)
Default: 0.2 * PxTolerancesScale::speed
| PxBroadPhaseCallback* physx::PxSceneDesc::broadPhaseCallback |
Broad-phase callback.
Default: NULL
| PxBroadPhaseType::Enum physx::PxSceneDesc::broadPhaseType |
Selects the broad-phase algorithm to use.
Default: PxBroadPhaseType::ePABP
| PxCCDContactModifyCallback* physx::PxSceneDesc::ccdContactModifyCallback |
Possible asynchronous callback for contact modification.
Default: NULL
| PxU32 physx::PxSceneDesc::ccdMaxPasses |
Maximum number of CCD passes.
The CCD performs multiple passes, where each pass every object advances to its time of first impact. This value defines how many passes the CCD system should perform.
Default: 1 Range: [1, PX_MAX_U32]
| PxReal physx::PxSceneDesc::ccdMaxSeparation |
A threshold for speculative CCD. Used to control whether bias, restitution or a combination of the two are used to resolve the contacts.
Range: [0, PX_MAX_F32)
Default: 0.04 * PxTolerancesScale::length
| PxReal physx::PxSceneDesc::ccdThreshold |
CCD threshold.
CCD performs sweeps against shapes if and only if the relative motion of the shapes is fast-enough that a collision would be missed by the discrete contact generation. However, in some circumstances, e.g. when the environment is constructed from large convex shapes, this approach may produce undesired simulation artefacts. This parameter defines the minimum relative motion that would be required to force CCD between shapes. The smaller of this value and the sum of the thresholds calculated for the shapes involved will be used.
Default: PX_MAX_F32 Range: [Eps, PX_MAX_F32]
| PxContactModifyCallback* physx::PxSceneDesc::contactModifyCallback |
Possible asynchronous callback for contact modification.
Default: NULL
| PxU32 physx::PxSceneDesc::contactPairSlabSize |
Defines the size of a contact pool slab. Contact pairs and associated data are allocated using a pool allocator. Increasing the slab size can trade off some performance spikes when a large number of new contacts are found for an increase in overall memory usage.
Range:(1, PX_MAX_U32)
Default: 256
| PxU32 physx::PxSceneDesc::contactReportStreamBufferSize |
Size of the contact report stream (in bytes).
The contact report stream buffer is used during the simulation to store all the contact reports. If the size is not sufficient, the buffer will grow by a factor of two. It is possible to disable the buffer growth by setting the flag PxSceneFlag::eDISABLE_CONTACT_REPORT_BUFFER_RESIZE. In that case the buffer will not grow but contact reports not stored in the buffer will not get sent in the contact report callbacks.
Default: 8192
Range: (0, PX_MAX_U32]
| PxCpuDispatcher* physx::PxSceneDesc::cpuDispatcher |
The CPU task dispatcher for the scene.
| PxCudaContextManager* physx::PxSceneDesc::cudaContextManager |
The CUDA context manager for the scene.
Platform specific: Applies to PC GPU only.
| PxSimulationFilterCallback* physx::PxSceneDesc::filterCallback |
A custom collision filter callback which can be used to implement more complex filtering operations which need access to the simulation state, for example.
Default: NULL
| PxSimulationFilterShader physx::PxSceneDesc::filterShader |
The custom filter shader to use for collision filtering.
| const void* physx::PxSceneDesc::filterShaderData |
Shared global filter data which will get passed into the filter shader.
Default: NULL
| PxU32 physx::PxSceneDesc::filterShaderDataSize |
Size (in bytes) of the shared global filter data filterShaderData.
Default: 0
| PxSceneFlags physx::PxSceneDesc::flags |
Flags used to select scene options.
Default: PxSceneFlag::eENABLE_PCM
| PxReal physx::PxSceneDesc::frictionCorrelationDistance |
Friction correlation distance used to decide whether contacts are close enough to be merged into a single friction anchor point or not.
Range: [0, PX_MAX_F32)
Default: 0.025f * PxTolerancesScale::length
| PxReal physx::PxSceneDesc::frictionOffsetThreshold |
A threshold of contact separation distance used to decide if a contact point will experience friction forces.
Range: [0, PX_MAX_F32)
Default: 0.04 * PxTolerancesScale::length
| PxFrictionType::Enum physx::PxSceneDesc::frictionType |
Selects the friction algorithm to use for simulation.
Default: PxFrictionType::ePATCH
| PxVec3 physx::PxSceneDesc::gravity |
Gravity vector.
Range: force vector
Default: Zero
When setting gravity, you should probably also set bounce threshold.
| PxPairFilteringMode::Enum physx::PxSceneDesc::kineKineFilteringMode |
Filtering mode for kinematic-kinematic pairs in the broadphase.
Default: PxPairFilteringMode::eDEFAULT
| PxSceneLimits physx::PxSceneDesc::limits |
Expected scene limits.
| PxReal physx::PxSceneDesc::maxBiasCoefficient |
The maximum bias coefficient used in the constraint solver.
When geometric errors are found in the constraint solver, either as a result of shapes penetrating or joints becoming separated or violating limits, a bias is introduced in the solver position iterations to correct these errors. This bias is proportional to 1/dt, meaning that the bias becomes increasingly strong as the time-step passed to PxScene::simulate(...) becomes smaller. This coefficient allows the application to restrict how large the bias coefficient is, to reduce how violent error corrections are. This can improve simulation quality in cases where either variable time-steps or extremely small time-steps are used.
Default: PX_MAX_F32
Range [0, PX_MAX_F32]
| PxU32 physx::PxSceneDesc::maxNbContactDataBlocks |
Setting to define the maximum number of 16K blocks that can be allocated to store contact, friction, and contact cache data. As the complexity of a scene increases, the SDK may require to allocate new 16k blocks in addition to the blocks it has already allocated. This variable controls the maximum number of blocks that the SDK can allocate.
In the case that the scene is sufficiently complex that all the permitted 16K blocks are used, contacts will be dropped and a warning passed to the error stream.
If a warning is reported to the error stream to indicate the number of 16K blocks is insufficient for the scene complexity then the choices are either (i) re-tune the number of 16K data blocks until a number is found that is sufficient for the scene complexity, (ii) to simplify the scene or (iii) to opt to not increase the memory requirements of physx and accept some dropped contacts.
Default: 65536
Range: [0, PX_MAX_U32]
| PxU32 physx::PxSceneDesc::nbContactDataBlocks |
Setting to define the number of 16K blocks that will be initially reserved to store contact, friction, and contact cache data. This is the number of 16K memory blocks that will be automatically allocated from the user allocator when the scene is instantiated. Further 16k memory blocks may be allocated during the simulation up to maxNbContactDataBlocks.
Default: 0
Range: [0, PX_MAX_U32]
| PxBounds3 physx::PxSceneDesc::sanityBounds |
The bounds used to sanity check user-set positions of actors and articulation links.
These bounds are used to check the position values of rigid actors inserted into the scene, and positions set for rigid actors already within the scene.
Range: any valid PxBounds3
Default: (-PX_MAX_BOUNDS_EXTENTS, PX_MAX_BOUNDS_EXTENTS) on each axis
| PxSceneQuerySystem* physx::PxSceneDesc::sceneQuerySystem |
The scene query sub-system for the scene.
If left to NULL, PxScene will use its usual internal sub-system. If non-NULL, all SQ-related calls will be re-routed to the user-provided implementation. An external SQ implementation is available in the Extensions library (see PxCreateExternalSceneQuerySystem). This can also be fully re-implemented by users if needed.
| PxSimulationEventCallback* physx::PxSceneDesc::simulationEventCallback |
Possible notification callback.
Default: NULL
| PxU32 physx::PxSceneDesc::solverArticulationBatchSize |
Defines the number of articulations required to spawn a separate rigid body solver island task chain.
This parameter defines the minimum number of articulations required to spawn a separate rigid body solver task chain. Setting a low value will potentially cause more task chains to be generated. This may result in the overhead of spawning tasks can become a limiting performance factor. Setting a high value will potentially cause fewer islands to be generated. This may reduce thread scaling (fewer task chains spawned) and may detrimentally affect performance if some bodies in the scene have large solver iteration counts because all constraints in a given island are solved by the maximum number of solver iterations requested by any body in the island.
Note that a rigid body solver task chain is spawned as soon as either a sufficient number of rigid bodies or articulations are batched together.
Default: 16
| PxU32 physx::PxSceneDesc::solverBatchSize |
Defines the number of actors required to spawn a separate rigid body solver island task chain.
This parameter defines the minimum number of actors required to spawn a separate rigid body solver task chain. Setting a low value will potentially cause more task chains to be generated. This may result in the overhead of spawning tasks can become a limiting performance factor. Setting a high value will potentially cause fewer islands to be generated. This may reduce thread scaling (fewer task chains spawned) and may detrimentally affect performance if some bodies in the scene have large solver iteration counts because all constraints in a given island are solved by the maximum number of solver iterations requested by any body in the island.
Note that a rigid body solver task chain is spawned as soon as either a sufficient number of rigid bodies or articulations are batched together.
Default: 128
| PxSolverType::Enum physx::PxSceneDesc::solverType |
Selects the solver algorithm to use.
Default: PxSolverType::ePGS
| PxPairFilteringMode::Enum physx::PxSceneDesc::staticKineFilteringMode |
Filtering mode for static-kinematic pairs in the broadphase.
Default: PxPairFilteringMode::eDEFAULT
| void* physx::PxSceneDesc::userData |
Will be copied to PxScene::userData.
Default: NULL
| PxReal physx::PxSceneDesc::wakeCounterResetValue |
The wake counter reset value.
Calling wakeUp() on objects which support sleeping will set their wake counter value to the specified reset value.
Range: (0, PX_MAX_F32)
Default: 0.4 (which corresponds to 20 frames for a time step of 0.02)