PxSceneDesc Class Reference
[Physics]
Descriptor class for scenes. See PxScene.
More...
#include <PxSceneDesc.h>

Public Member Functions | |
PX_INLINE | PxSceneDesc (const PxTolerancesScale &scale) |
constructor sets to default (no gravity, no ground plane, collision detection on). | |
PX_INLINE void | setToDefault (const PxTolerancesScale &scale) |
(re)sets the structure to the default (no gravity, no ground plane, collision detection on). | |
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. | |
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. | |
PxSceneLimits | limits |
Expected scene limits. | |
PxReal | sweepEpsilonDistance |
A small epsilon value used for swept collision detection. | |
PxReal | contactCorrelationDistance |
Two contacts are considered to be identical if their distance is below this value. | |
PxReal | bounceThresholdVelocity |
A contact with a relative velocity below this will not bounce. A typical value for simulation stability is about 0.2 * gravity. | |
PxSceneFlags | flags |
Flags used to select scene options. | |
pxtask::CpuDispatcher * | cpuDispatcher |
The CPU task dispatcher for the scene. | |
pxtask::GpuDispatcher * | gpuDispatcher |
The GPU task dispatcher for the scene. | |
pxtask::SpuDispatcher * | spuDispatcher |
The SPU task dispatcher for the scene. | |
PxPruningStructure::Enum | staticStructure |
Defines the structure used to store static objects. | |
PxPruningStructure::Enum | dynamicStructure |
Defines the structure used to store dynamic objects. | |
PxU32 | dynamicTreeRebuildRateHint |
Hint for how much work should be done per simulation frame to rebuild the pruning structure. | |
void * | userData |
Will be copied to PxScene::userData. | |
PxU32 | solverBatchSize |
Defines the number of actors required to spawn a separate rigid body solver thread. | |
PxReal | sweptIntegrationLinearSpeedFactor |
Setting to determine how fast an object has to translate to perform swept integration. | |
PxReal | sweptIntegrationAngularSpeedFactor |
Setting to determine how fast an object has to rotate to perform swept integration. | |
PxU32 | nbContactDataBlocks |
Setting to determine how many 16K blocks are initially reserved to store contact, friction, and contact cache data. Memory blocks, each 16K, will be automatically allocated from the user allocator when the scene is instantiated. The initial number of 16K allocations is controlled by nbContactDataBlocks. In the case that the scene is sufficiently complex that all 16K blocks are used, contacts will be dropped and a warning passed to the error stream. | |
PxU32 | maxNbContactDataBlocks |
Setting to determine how many 16K blocks are reserved to store contact, friction, and contact cache data. Memory blocks, each 16K, will be automatically allocated from the user allocator when the scene is instantiated. The maximum number of 16K allocations is controlled by maxNbContactDataBlocks. In the case that the scene is sufficiently complex that all 16K blocks are used, contacts will be dropped and a warning passed to the error stream. | |
PxU32 | contactReportStreamBufferSize |
Size of the contact report stream (in bytes). |
Detailed Description
Descriptor class for scenes. See PxScene.
- See also:
- PxScene PxPhysics.createScene
Member Data Documentation
A contact with a relative velocity below this will not bounce. A typical value for simulation stability is about 0.2 * gravity.
Range: [0, inf)
Default: 2
- See also:
- PxMaterial
Referenced by isValid().
Two contacts are considered to be identical if their distance is below this value.
Making this too small may make contact generation unstable.
Range: [0, inf)
Default: 0.025 * lengthScale
Referenced by isValid().
Possible asynchronous callback for contact modification.
Default: NULL
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, inf)
Referenced by isValid().
The CPU task dispatcher for the scene.
Platform:
- PC SW: Yes
- PS3 : Yes
- XB360: Yes
- WII : Yes
Referenced by isValid().
Defines the structure used to store dynamic objects.
Hint for how much work should be done per simulation frame to rebuild the pruning structure.
This parameter gives a hint on the distribution of the workload for rebuilding the dynamic AABB tree pruning structure PxPruningStructure::eDYNAMIC_AABB_TREE. It specifies the desired number of simulation frames the rebuild process should take. Higher values will decrease the workload per frame but the pruning structure will get more and more outdated the longer the rebuild takes (which can make scene queries less efficient).
- Note:
- Only used for PxPruningStructure::eDYNAMIC_AABB_TREE pruning structure.
This parameter gives only a hint. The rebuild process might still take more or less time depending on the number of objects involved.
Default: 100
Referenced by isValid().
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
- See also:
- PxSimulationFilterCallback
The custom filter shader to use for collision filtering.
- Note:
- This parameter is compulsory. If you don't want to define your own filter shader you can use the default shader PxDefaultSimulationFilterShader which can be found in the PhysX extensions library.
- See also:
- PxSimulationFilterShader
Referenced by isValid().
const void* PxSceneDesc::filterShaderData |
Shared global filter data which will get passed into the filter shader.
- Note:
- The provided data will get copied to internal buffers and this copy will be used for filtering calls.
- See also:
- PxSimulationFilterShader
Referenced by isValid().
Size (in bytes) of the shared global filter data filterShaderData.
Default: 0
- See also:
- PxSimulationFilterShader filterShaderData
Referenced by isValid().
Flags used to select scene options.
Platform:
- PC SW: Yes
- PS3 : Yes
- XB360: Yes
- WII : Yes
- See also:
- PxSceneFlag PxSceneFlags
The GPU task dispatcher for the scene.
Platform:
- PC GPU: Yes
- PC SW : Not applicable
- PS3 : Not applicable
- XB360 : Not applicable
- WII : Not applicable
Gravity vector.
Range: force vector
Default: Zero
- See also:
- PxScene.setGravity()
Setting to determine how many 16K blocks are reserved to store contact, friction, and contact cache data. Memory blocks, each 16K, will be automatically allocated from the user allocator when the scene is instantiated. The maximum number of 16K allocations is controlled by maxNbContactDataBlocks. In the case that the scene is sufficiently complex that all 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 or (ii) to opt to not increase the memory requirements of physx and accept some dropped contacts.
Default: 65536, or 256 on PS3
Range: [0, inf)
Referenced by isValid().
Setting to determine how many 16K blocks are initially reserved to store contact, friction, and contact cache data. Memory blocks, each 16K, will be automatically allocated from the user allocator when the scene is instantiated. The initial number of 16K allocations is controlled by nbContactDataBlocks. In the case that the scene is sufficiently complex that all 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 or (ii) to opt to not increase the memory requirements of physx and accept some dropped contacts.
Default: 0, or 256 on PS3
Range: [0, inf)
Referenced by isValid().
Possible notification callback.
This callback will be associated with the client PX_DEFAULT_CLIENT. Please use PxScene::setSimulationEventCallback() to register callbacks for other clients.
Default: NULL
Defines the number of actors required to spawn a separate rigid body solver thread.
Default: 32
Platform:
- PC SW: Yes
- PS3 : Not applicable
- XB360: Yes
- WII : Yes
The SPU task dispatcher for the scene.
Platform:
- PC SW: Not applicable
- PS3 : Yes
- XB360: Not applicable
- WII : Not applicable
Defines the structure used to store static objects.
- Note:
- Only PxPruningStructure::eSTATIC_AABB_TREE and PxPruningStructure::eDYNAMIC_AABB_TREE are allowed here.
Referenced by isValid().
A small epsilon value used for swept collision detection.
- See also:
- PxTolerancesScale Default: 0.01 * lengthScale
Referenced by isValid().
Setting to determine how fast an object has to rotate to perform swept integration.
Default: 2
- See also:
- sweptIntegrationLinearSpeedFactor
Referenced by isValid().
Setting to determine how fast an object has to translate to perform swept integration.
For a pair of objects for which swept integration is enabled (see PxPairFlag::eSWEPT_INTEGRATION_LINEAR) swept integration will still be skipped if for both objects the below formula evaluates to false:
isMovingFast = smallest < (linearVelocity.magnitude() * a + angularVelocity.magnitude() * b * largest )*dt
Where
smallest = bounds.halfDimensions().smallestDimension() largest = bounds.halfDimensions().largestDimension()
a = sweptIntegrationLinearSpeedFactor b = sweptIntegrationAngularSpeedFactor
a and b default to two because an object must only move half it's size to be considered fast, and this accounts for it.
Default: 2
- See also:
- sweptIntegrationAngularSpeedFactor
Referenced by isValid().
void* PxSceneDesc::userData |
Will be copied to PxScene::userData.
Default: NULL
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com