Public Member Functions | Public Attributes | List of all members
PxScene Class Referenceabstract

A scene is a collection of bodies, particle systems and constraints which can interact. More...

#include <PxScene.h>

Public Member Functions

virtual PxReal getWakeCounterResetValue () const =0
 Returns the wake counter reset value. More...
 
virtual void shiftOrigin (const PxVec3 &shift)=0
 Shift the scene origin by the specified vector. More...
 
Add/Remove Contained Objects
virtual void addArticulation (PxArticulation &articulation)=0
 Adds an articulation to this scene. More...
 
virtual void removeArticulation (PxArticulation &articulation, bool wakeOnLostTouch=true)=0
 Removes an articulation from this scene. More...
 
virtual void addActor (PxActor &actor)=0
 Adds an actor to this scene. More...
 
virtual void addActors (PxActor *const *actors, PxU32 nbActors)=0
 Adds actors to this scene. More...
 
virtual void removeActor (PxActor &actor, bool wakeOnLostTouch=true)=0
 Removes an actor from this scene. More...
 
virtual void removeActors (PxActor *const *actors, PxU32 nbActors, bool wakeOnLostTouch=true)=0
 Removes actors from this scene. More...
 
virtual void addAggregate (PxAggregate &aggregate)=0
 Adds an aggregate to this scene. More...
 
virtual void removeAggregate (PxAggregate &aggregate, bool wakeOnLostTouch=true)=0
 Removes an aggregate from this scene. More...
 
virtual void addCollection (const PxCollection &collection)=0
 Adds objects in the collection to this scene. More...
 
Contained Object Retrieval
virtual PxU32 getNbActors (PxActorTypeFlags types) const =0
 Retrieve the number of actors of certain types in the scene. More...
 
virtual PxU32 getActors (PxActorTypeFlags types, PxActor **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve an array of all the actors of certain types in the scene. More...
 
virtual const PxActiveTransformgetActiveTransforms (PxU32 &nbTransformsOut, PxClientID client=PX_DEFAULT_CLIENT)=0
 Queries the PxScene for a list of the PxActors whose transforms have been updated during the previous simulation step. More...
 
virtual PxU32 getNbArticulations () const =0
 Returns the number of articulations in the scene. More...
 
virtual PxU32 getArticulations (PxArticulation **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve all the articulations in the scene. More...
 
virtual PxU32 getNbConstraints () const =0
 Returns the number of constraint shaders in the scene. More...
 
virtual PxU32 getConstraints (PxConstraint **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve all the constraint shaders in the scene. More...
 
virtual PxU32 getNbAggregates () const =0
 Returns the number of aggregates in the scene. More...
 
virtual PxU32 getAggregates (PxAggregate **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve all the aggregates in the scene. More...
 
Dominance
virtual void setDominanceGroupPair (PxDominanceGroup group1, PxDominanceGroup group2, const PxDominanceGroupPair &dominance)=0
 Specifies the dominance behavior of contacts between two actors with two certain dominance groups. More...
 
virtual PxDominanceGroupPair getDominanceGroupPair (PxDominanceGroup group1, PxDominanceGroup group2) const =0
 Samples the dominance matrix. More...
 
Dispatcher
virtual PxCpuDispatchergetCpuDispatcher () const =0
 Return the cpu dispatcher that was set in PxScene::PxCpuDispatcher when creating the scene with PxPhysics::createScene. More...
 
virtual PxGpuDispatchergetGpuDispatcher () const =0
 Return the gpu dispatcher that was set in PxScene::PxGpuDispatcher when creating the scene with PxPhysics::createScene. More...
 
virtual PxSpuDispatchergetSpuDispatcher () const =0
 Return the spu dispatcher that was set in PxScene::PxSpuDispatcher when creating the scene with PxPhysics::createScene. More...
 
Multiclient
virtual PxClientID createClient ()=0
 Reserves a new client ID. More...
 
virtual void setClientBehaviorFlags (PxClientID client, PxClientBehaviorFlags clientBehaviorFlags)=0
 Sets behavior bits for a client. More...
 
virtual PxClientBehaviorFlags getClientBehaviorFlags (PxClientID client) const =0
 Retrieves behavior bits for a client. More...
 
Cloth
virtual void setClothInterCollisionDistance (PxF32 distance)=0
 Sets the minimum separation distance for cloth inter-collision. More...
 
virtual PxF32 getClothInterCollisionDistance () const =0
 Retrieves distance used for cloth inter-collision. More...
 
virtual void setClothInterCollisionStiffness (PxF32 stiffness)=0
 Sets the cloth inter-collision stiffness. More...
 
virtual PxF32 getClothInterCollisionStiffness () const =0
 Retrieves the stiffness coefficient used for cloth inter-collision. More...
 
virtual void setClothInterCollisionNbIterations (PxU32 nbIterations)=0
 Sets the number of inter-collision separation iterations to perform. More...
 
virtual PxU32 getClothInterCollisionNbIterations () const =0
 Retrieves the number of iterations used for cloth inter-collision. More...
 
Callbacks
virtual void setSimulationEventCallback (PxSimulationEventCallback *callback, PxClientID client=PX_DEFAULT_CLIENT)=0
 Sets a user notify object which receives special simulation events when they occur. More...
 
virtual PxSimulationEventCallbackgetSimulationEventCallback (PxClientID client=PX_DEFAULT_CLIENT) const =0
 Retrieves the simulationEventCallback pointer set with setSimulationEventCallback(). More...
 
virtual void setContactModifyCallback (PxContactModifyCallback *callback)=0
 Sets a user callback object, which receives callbacks on all contacts generated for specified actors. More...
 
virtual void setCCDContactModifyCallback (PxCCDContactModifyCallback *callback)=0
 Sets a user callback object, which receives callbacks on all CCD contacts generated for specified actors. More...
 
virtual PxContactModifyCallbackgetContactModifyCallback () const =0
 Retrieves the PxContactModifyCallback pointer set with setContactModifyCallback(). More...
 
virtual
PxCCDContactModifyCallback
getCCDContactModifyCallback () const =0
 Retrieves the PxCCDContactModifyCallback pointer set with setContactModifyCallback(). More...
 
virtual void setBroadPhaseCallback (PxBroadPhaseCallback *callback, PxClientID client=PX_DEFAULT_CLIENT)=0
 Sets a broad-phase user callback object. More...
 
virtual PxBroadPhaseCallbackgetBroadPhaseCallback (PxClientID client=PX_DEFAULT_CLIENT) const =0
 Retrieves the PxBroadPhaseCallback pointer set with setBroadPhaseCallback(). More...
 
Collision Filtering
virtual const void * getFilterShaderData () const =0
 Gets the shared global filter data in use for this scene. More...
 
virtual PxU32 getFilterShaderDataSize () const =0
 Gets the size of the shared global filter data (PxSceneDesc.filterShaderData) More...
 
virtual PxSimulationFilterShader getFilterShader () const =0
 Gets the custom collision filter shader in use for this scene. More...
 
virtual
PxSimulationFilterCallback
getFilterCallback () const =0
 Gets the custom collision filter callback in use for this scene. More...
 
virtual void resetFiltering (PxActor &actor)=0
 Marks the object to reset interactions and re-run collision filters in the next simulation step. More...
 
virtual void resetFiltering (PxRigidActor &actor, PxShape *const *shapes, PxU32 shapeCount)=0
 Marks the object to reset interactions and re-run collision filters for specified shapes in the next simulation step. More...
 
Simulation
virtual void simulate (PxReal elapsedTime, physx::PxBaseTask *completionTask=NULL, void *scratchMemBlock=0, PxU32 scratchMemBlockSize=0, bool controlSimulation=true)=0
 Advances the simulation by an elapsedTime time. More...
 
virtual void solve (PxReal elapsedTime, physx::PxBaseTask *completionTask=0, void *scratchMemBlock=0, PxU32 scratchMemBlockSize=0, bool controlSimulation=true)=0
 Advances the simulation by an elapsedTime time. More...
 
virtual void collide (PxReal elapsedTime, physx::PxBaseTask *completionTask=0, void *scratchMemBlock=0, PxU32 scratchMemBlockSize=0)=0
 Performs collision detection for the scene over elapsedTime. More...
 
virtual bool checkResults (bool block=false)=0
 This checks to see if the simulation run has completed. More...
 
virtual bool fetchResults (bool block=false, PxU32 *errorState=0)=0
 
virtual PX_DEPRECATED void flush (bool sendPendingReports=false)=0
 This method has been deprecated and will be removed in a future update. More...
 
virtual void flushSimulation (bool sendPendingReports=false)=0
 Clear internal buffers and free memory. More...
 
virtual void setGravity (const PxVec3 &vec)=0
 Sets a constant gravity for the entire scene. More...
 
virtual PxVec3 getGravity () const =0
 Retrieves the current gravity setting. More...
 
virtual void setBounceThresholdVelocity (const PxReal t)=0
 Set the bounce threshold velocity. Collision speeds below this threshold will not cause a bounce. More...
 
virtual PxReal getBounceThresholdVelocity () const =0
 Return the bounce threshold velocity. More...
 
virtual void setCCDMaxPasses (PxU32 ccdMaxPasses)=0
 Sets the maximum number of CCD passes. More...
 
virtual PxU32 getCCDMaxPasses () const =0
 Gets the maximum number of CCD passes. More...
 
virtual PxReal getContactCorrelationDistance () const =0
 Return the value of PxSceneDesc::contactCorrelationDistance that was set when creating the scene with PxPhysics::createScene. More...
 
virtual PxReal getFrictionOffsetThreshold () const =0
 Return the value of frictionOffsetThreshold that was set in PxSceneDesc when creating the scene with PxPhysics::createScene. More...
 
virtual PX_DEPRECATED PxReal getMeshContactMargin () const =0
 Return the value of PxSceneDesc::meshContactMargin that was set when creating the scene with PxPhysics::createScene. More...
 
virtual void setFrictionType (PxFrictionType::Enum frictionType)=0
 Set the friction model. More...
 
virtual PxFrictionType::Enum getFrictionType () const =0
 Return the friction model. More...
 
Visualization and Statistics
virtual bool setVisualizationParameter (PxVisualizationParameter::Enum param, PxReal value)=0
 Function that lets you set debug visualization parameters. More...
 
virtual PxReal getVisualizationParameter (PxVisualizationParameter::Enum paramEnum) const =0
 Function that lets you query debug visualization parameters. More...
 
virtual void setVisualizationCullingBox (const PxBounds3 &box)=0
 Defines a box in world space to which visualization geometry will be (conservatively) culled. More...
 
virtual const PxBounds3getVisualizationCullingBox () const =0
 Retrieves the visualization culling box. More...
 
virtual const PxRenderBuffergetRenderBuffer ()=0
 Retrieves the render buffer. More...
 
virtual void getSimulationStatistics (PxSimulationStatistics &stats) const =0
 Call this method to retrieve statistics for the current simulation step. More...
 
Scene Query
virtual PxPruningStructure::Enum getStaticStructure () const =0
 Return the value of PxSceneDesc::staticStructure that was set when creating the scene with PxPhysics::createScene. More...
 
virtual PxPruningStructure::Enum getDynamicStructure () const =0
 Return the value of PxSceneDesc::dynamicStructure that was set when creating the scene with PxPhysics::createScene. More...
 
virtual void flushQueryUpdates ()=0
 Flushes any changes in the simulation to the scene query representation. More...
 
virtual PxBatchQuerycreateBatchQuery (const PxBatchQueryDesc &desc)=0
 Creates a BatchQuery object. More...
 
virtual PxVolumeCachecreateVolumeCache (PxU32 maxStaticShapes=32, PxU32 maxDynamicShapes=8)=0
 Creates a volume cache. See the Guide, "Scene Queries" section, "Volume Caching" subsection for more information. More...
 
virtual void setDynamicTreeRebuildRateHint (PxU32 dynamicTreeRebuildRateHint)=0
 Sets the rebuild rate of the dynamic tree pruning structures. More...
 
virtual PxU32 getDynamicTreeRebuildRateHint () const =0
 Retrieves the rebuild rate of the dynamic tree pruning structures. More...
 
virtual void forceDynamicTreeRebuild (bool rebuildStaticStructure, bool rebuildDynamicStructure)=0
 Forces dynamic trees to be immediately rebuilt. More...
 
virtual bool raycast (const PxVec3 &origin, const PxVec3 &unitDir, const PxReal distance, PxRaycastCallback &hitCall, PxHitFlags hitFlags=PxHitFlags(PxHitFlag::eDEFAULT), const PxQueryFilterData &filterData=PxQueryFilterData(), PxQueryFilterCallback *filterCall=NULL, const PxQueryCache *cache=NULL) const =0
 Performs a raycast against objects in the scene, returns results in a PxRaycastBuffer object or via a custom user callback implementation inheriting from PxRaycastCallback. More...
 
virtual bool sweep (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, PxSweepCallback &hitCall, PxHitFlags hitFlags=PxHitFlags(PxHitFlag::eDEFAULT), const PxQueryFilterData &filterData=PxQueryFilterData(), PxQueryFilterCallback *filterCall=NULL, const PxQueryCache *cache=NULL, const PxReal inflation=0.f) const =0
 Performs a sweep test against objects in the scene, returns results in a PxSweepBuffer object or via a custom user callback implementation inheriting from PxSweepCallback. More...
 
virtual bool overlap (const PxGeometry &geometry, const PxTransform &pose, PxOverlapCallback &hitCall, const PxQueryFilterData &filterData=PxQueryFilterData(), PxQueryFilterCallback *filterCall=NULL) const =0
 Performs an overlap test of a given geometry against objects in the scene, returns results in a PxOverlapBuffer object or via a custom user callback implementation inheriting from PxOverlapCallback. More...
 
PX_DEPRECATED PX_INLINE bool raycastAny (const PxVec3 &origin, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryHit &hit, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFilterCallback *filterCall=NULL, const PxSceneQueryCache *cache=NULL, PxClientID queryClient=PX_DEFAULT_CLIENT) const
 
PX_DEPRECATED PX_INLINE bool raycastSingle (const PxVec3 &origin, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFlags outputFlags, PxRaycastHit &hit, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFilterCallback *filterCall=NULL, const PxSceneQueryCache *cache=NULL, PxClientID queryClient=PX_DEFAULT_CLIENT)
 
PX_DEPRECATED PX_INLINE PxI32 raycastMultiple (const PxVec3 &origin, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFlags outputFlags, PxRaycastHit *hitBuffer, PxU32 hitBufferSize, bool &blockingHit, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFilterCallback *filterCall=NULL, const PxSceneQueryCache *cache=NULL, PxClientID queryClient=PX_DEFAULT_CLIENT)
 
PX_DEPRECATED PX_INLINE bool sweepAny (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFlags queryFlags, PxSceneQueryHit &hit, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFilterCallback *filterCall=NULL, const PxSceneQueryCache *cache=NULL, PxClientID queryClient=PX_DEFAULT_CLIENT, const PxReal inflation=0.f)
 
PX_DEPRECATED PX_INLINE bool sweepSingle (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFlags outputFlags, PxSweepHit &hit, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFilterCallback *filterCall=NULL, const PxSceneQueryCache *cache=NULL, PxClientID queryClient=PX_DEFAULT_CLIENT, const PxReal inflation=0.f)
 
PX_DEPRECATED PX_INLINE PxI32 sweepMultiple (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, PxSceneQueryFlags outputFlags, PxSweepHit *hitBuffer, PxU32 hitBufferSize, bool &blockingHit, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFilterCallback *filterCall=NULL, const PxSceneQueryCache *cache=NULL, PxClientID queryClient=PX_DEFAULT_CLIENT, const PxReal inflation=0.f)
 
PX_DEPRECATED PX_INLINE PxI32 overlapMultiple (const PxGeometry &geometry, const PxTransform &pose, PxOverlapHit *hitBuffer, PxU32 hitBufferSize, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFilterCallback *filterCall=NULL, PxClientID queryClient=PX_DEFAULT_CLIENT)
 
PX_DEPRECATED PX_INLINE bool overlapAny (const PxGeometry &geometry, const PxTransform &pose, PxOverlapHit &hit, const PxSceneQueryFilterData &filterData=PxSceneQueryFilterData(), PxSceneQueryFilterCallback *filterCall=NULL, PxClientID queryClient=PX_DEFAULT_CLIENT)
 
virtual PxU32 getSceneQueryStaticTimestamp () const =0
 Retrieves the scene's internal scene query timestamp, increased each time a change to the static scene query structure is performed. More...
 
Broad-phase
virtual PxBroadPhaseType::Enum getBroadPhaseType () const =0
 Returns broad-phase type. More...
 
virtual bool getBroadPhaseCaps (PxBroadPhaseCaps &caps) const =0
 Gets broad-phase caps. More...
 
virtual PxU32 getNbBroadPhaseRegions () const =0
 Returns number of regions currently registered in the broad-phase. More...
 
virtual PxU32 getBroadPhaseRegions (PxBroadPhaseRegionInfo *userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Gets broad-phase regions. More...
 
virtual PxU32 addBroadPhaseRegion (const PxBroadPhaseRegion &region, bool populateRegion=false)=0
 Adds a new broad-phase region. More...
 
virtual bool removeBroadPhaseRegion (PxU32 handle)=0
 Removes a new broad-phase region. More...
 
Threads and Memory
virtual physx::PxTaskManager * getTaskManager () const =0
 Get the task manager associated with this scene. More...
 
virtual void lockRead (const char *file=NULL, PxU32 line=0)=0
 Lock the scene for reading from the calling thread. More...
 
virtual void unlockRead ()=0
 Unlock the scene from reading. More...
 
virtual void lockWrite (const char *file=NULL, PxU32 line=0)=0
 Lock the scene for writing from this thread. More...
 
virtual void unlockWrite ()=0
 Unlock the scene from writing. More...
 
virtual void setNbContactDataBlocks (PxU32 numBlocks)=0
 set the cache blocks that can be used during simulate(). More...
 
virtual PxU32 getNbContactDataBlocksUsed () const =0
 get the number of cache blocks currently used by the scene More...
 
virtual PxU32 getMaxNbContactDataBlocksUsed () const =0
 get the maximum number of cache blocks used by the scene More...
 
virtual PxU32 getContactReportStreamBufferSize () const =0
 Return the value of PxSceneDesc::contactReportStreamBufferSize that was set when creating the scene with PxPhysics::createScene. More...
 
virtual void setSolverBatchSize (PxU32 solverBatchSize)=0
 Sets the number of actors required to spawn a separate rigid body solver thread. More...
 
virtual PxU32 getSolverBatchSize () const =0
 Retrieves the number of actors required to spawn a separate rigid body solver thread. More...
 

Public Attributes

void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object. More...
 

Basics

 PxScene ()
 
virtual ~PxScene ()
 
virtual void release ()=0
 Deletes the scene. More...
 
virtual void setFlag (PxSceneFlag::Enum flag, bool value)=0
 Sets a scene flag. You can only set one flag at a time. More...
 
virtual PxSceneFlags getFlags () const =0
 Get the scene flags. More...
 
virtual void setLimits (const PxSceneLimits &limits)=0
 Set new scene limits. More...
 
virtual PxSceneLimits getLimits () const =0
 Get current scene limits. More...
 
virtual PxPhysicsgetPhysics ()=0
 Call this method to retrieve the Physics SDK. More...
 
virtual PxU32 getTimestamp () const =0
 Retrieves the scene's internal timestamp, increased each time a simulation step is completed. More...
 

Detailed Description

A scene is a collection of bodies, particle systems and constraints which can interact.

The scene simulates the behavior of these objects over time. Several scenes may exist at the same time, but each body, particle system or constraint is specific to a scene – they may not be shared.

See Also
PxSceneDesc PxPhysics.createScene() release()

Constructor & Destructor Documentation

PxScene::PxScene ( )
inlineprotected
virtual PxScene::~PxScene ( )
inlineprotectedvirtual

Member Function Documentation

virtual void PxScene::addActor ( PxActor actor)
pure virtual

Adds an actor to this scene.

Note
If the actor is already assigned to a scene (see PxActor::getScene), the call is ignored and an error is issued.
If the actor has an invalid constraint, in checked builds the call is ignored and an error is issued.
You can not add individual articulation links (see PxArticulationLink) to the scene. Use addArticulation() instead.
If the actor is a PxRigidActor then each assigned PxConstraint object will get added to the scene automatically if it connects to another actor that is part of the scene already.
Parameters
[in]actorActor to add to scene.
See Also
PxActor, PxConstraint::isValid()
virtual void PxScene::addActors ( PxActor *const *  actors,
PxU32  nbActors 
)
pure virtual

Adds actors to this scene.

Note
If one of the actors is already assigned to a scene (see PxActor::getScene), the call is ignored and an error is issued.
You can not add individual articulation links (see PxArticulationLink) to the scene. Use addArticulation() instead.
If an actor in the array contains an invalid constraint, in checked builds the call is ignored and an error is issued.
If an actor in the array is a PxRigidActor then each assigned PxConstraint object will get added to the scene automatically if it connects to another actor that is part of the scene already.
this method is optimized for high performance, and does not support buffering. It may not be called during simulation.
Parameters
[in]actorsArray of actors to add to scene.
[in]nbActorsNumber of actors in the array.
See Also
PxActor, PxConstraint::isValid()
virtual void PxScene::addAggregate ( PxAggregate aggregate)
pure virtual

Adds an aggregate to this scene.

Note
If the aggregate is already assigned to a scene (see PxAggregate::getScene), the call is ignored and an error is issued.
If the aggregate contains an actor with an invalid constraint, in checked builds the call is ignored and an error is issued.
If the aggregate already contains actors, those actors are added to the scene as well.
Parameters
[in]aggregateAggregate to add to scene.
See Also
PxAggregate, PxConstraint::isValid()
virtual void PxScene::addArticulation ( PxArticulation articulation)
pure virtual

Adds an articulation to this scene.

Note
If the articulation is already assigned to a scene (see PxArticulation::getScene), the call is ignored and an error is issued.
Parameters
[in]articulationArticulation to add to scene. See PxArticulation
See Also
PxArticulation
virtual PxU32 PxScene::addBroadPhaseRegion ( const PxBroadPhaseRegion region,
bool  populateRegion = false 
)
pure virtual

Adds a new broad-phase region.

Note that by default, objects already existing in the SDK that might touch this region will not be automatically added to the region. In other words the newly created region will be empty, and will only be populated with new objects when they are added to the simulation, or with already existing objects when they are updated.

It is nonetheless possible to override this default behavior and let the SDK populate the new region automatically with already existing objects overlapping the incoming region. This has a cost though, and it should only be used when the game can not guarantee that all objects within the new region will be added to the simulation after the region itself.

Parameters
[in]regionUser-provided region data
[in]populateRegionAutomatically populate new region with already existing objects overlapping it
Returns
Handle for newly created region, or 0xffffffff in case of failure.
virtual void PxScene::addCollection ( const PxCollection collection)
pure virtual

Adds objects in the collection to this scene.

This function adds the following types of objects to this scene: PxActor, PxAggregate, PxArticulation. This method is typically used after deserializing the collection in order to populate the scene with deserialized objects.

Note
If the collection contains an actor with an invalid constraint, in checked builds the call is ignored and an error is issued.
Parameters
[in]collectionObjects to add to this scene. See PxCollection
See Also
PxCollection, PxConstraint::isValid()
virtual bool PxScene::checkResults ( bool  block = false)
pure virtual

This checks to see if the simulation run has completed.

This does not cause the data available for reading to be updated with the results of the simulation, it is simply a status check. The bool will allow it to either return immediately or block waiting for the condition to be met so that it can return true

Parameters
[in]blockWhen set to true will block until the condition is met.
Returns
True if the results are available.
See Also
simulate() fetchResults()
virtual void PxScene::collide ( PxReal  elapsedTime,
physx::PxBaseTask *  completionTask = 0,
void *  scratchMemBlock = 0,
PxU32  scratchMemBlockSize = 0 
)
pure virtual

Performs collision detection for the scene over elapsedTime.

Note
Not implemented in this release!
virtual PxBatchQuery* PxScene::createBatchQuery ( const PxBatchQueryDesc desc)
pure virtual

Creates a BatchQuery object.

Scene queries like raycasts, overlap tests and sweeps are batched in this object and are then executed at once. See PxBatchQuery.

Parameters
[in]descThe descriptor of scene query. Scene Queries need to register a callback. See PxBatchQueryDesc.
See Also
PxBatchQuery PxBatchQueryDesc
virtual PxClientID PxScene::createClient ( )
pure virtual

Reserves a new client ID.

PX_DEFAULT_CLIENT is always available as the default clientID. Additional clients are returned by this function. Clients cannot be released once created. An error is reported when more than a supported number of clients (currently 128) are created.

See Also
PxClientBehaviorFlag PxClientID setClientBehaviorFlags() PxActor::setClientBehaviorFlags()
virtual PxVolumeCache* PxScene::createVolumeCache ( PxU32  maxStaticShapes = 32,
PxU32  maxDynamicShapes = 8 
)
pure virtual

Creates a volume cache. See the Guide, "Scene Queries" section, "Volume Caching" subsection for more information.

See Also
PxVolumeCache PxVolumeCache.release()
virtual bool PxScene::fetchResults ( bool  block = false,
PxU32 errorState = 0 
)
pure virtual

This is the big brother to checkResults() it basically does the following:

if ( checkResults(block) )
{
fire appropriate callbacks
swap buffers
return true
}
else
return false
Parameters
[in]blockWhen set to true will block until the condition is met.
[out]errorStateUsed to retrieve hardware error codes. A non zero value indicates an error.
Returns
True if the results have been fetched.
See Also
simulate() checkResults()
virtual PX_DEPRECATED void PxScene::flush ( bool  sendPendingReports = false)
pure virtual

This method has been deprecated and will be removed in a future update.

Deprecated:
See Also
flushSimulation()
virtual void PxScene::flushQueryUpdates ( )
pure virtual

Flushes any changes in the simulation to the scene query representation.

This method updates the state of the scene query representation to match changes in the scene state.

By default, these changes are buffered until the next query is submitted. Calling this function will not change the results from scene queries, but can be used to ensure that a query will not perform update work in the course of its execution.

A thread performing updates will hold a write lock on the query structure, and thus stall other querying threads. In multithread scenarios it can be useful to explicitly schedule the period where this lock may be held for a significant period, so that subsequent queries issued from multiple threads will not block.

virtual void PxScene::flushSimulation ( bool  sendPendingReports = false)
pure virtual

Clear internal buffers and free memory.

This method can be used to clear buffers and free internal memory without having to destroy the scene. Can be useful if the physics data gets streamed in and a checkpoint with a clean state should be created.

Note
It is not allowed to call this method while the simulation is running. The call will fail.
Parameters
[in]sendPendingReportsWhen set to true pending reports will be sent out before the buffers get cleaned up (for instance lost touch contact/trigger reports due to deleted objects).
virtual void PxScene::forceDynamicTreeRebuild ( bool  rebuildStaticStructure,
bool  rebuildDynamicStructure 
)
pure virtual

Forces dynamic trees to be immediately rebuilt.

Parameters
[in]rebuildStaticStructureTrue to rebuild the dynamic tree containing static objects
[in]rebuildDynamicStructureTrue to rebuild the dynamic tree containing dynamic objects
See Also
PxSceneDesc.dynamicTreeRebuildRateHint setDynamicTreeRebuildRateHint() getDynamicTreeRebuildRateHint()
virtual const PxActiveTransform* PxScene::getActiveTransforms ( PxU32 nbTransformsOut,
PxClientID  client = PX_DEFAULT_CLIENT 
)
pure virtual

Queries the PxScene for a list of the PxActors whose transforms have been updated during the previous simulation step.

Note: PxSceneFlag::eENABLE_ACTIVETRANSFORMS must be set. Multiclient behavior: Active transforms now return only the list of active actors owned by the specified client.

Note
Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored and NULL will be returned.
Parameters
[out]nbTransformsOutThe number of transforms returned.
[in]clientThe client whose actors the caller is interested in.
Returns
A pointer to the list of PxActiveTransforms generated during the last call to fetchResults().
See Also
PxActiveTransform
virtual PxU32 PxScene::getActors ( PxActorTypeFlags  types,
PxActor **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Retrieve an array of all the actors of certain types in the scene.

Parameters
[in]typesCombination of actor types to retrieve.
[out]userBufferThe buffer to receive actor pointers.
[in]bufferSizeSize of provided user buffer.
[in]startIndexIndex of first actor pointer to be retrieved
Returns
Number of actors written to the buffer.
See Also
getNbActors()
virtual PxU32 PxScene::getAggregates ( PxAggregate **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Retrieve all the aggregates in the scene.

Parameters
[out]userBufferThe buffer to receive aggregates pointers.
[in]bufferSizeSize of provided user buffer.
[in]startIndexIndex of first aggregate pointer to be retrieved
Returns
Number of aggregates written to the buffer.
See Also
getNbAggregates()
virtual PxU32 PxScene::getArticulations ( PxArticulation **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Retrieve all the articulations in the scene.

Parameters
[out]userBufferThe buffer to receive articulations pointers.
[in]bufferSizeSize of provided user buffer.
[in]startIndexIndex of first articulations pointer to be retrieved
Returns
Number of articulations written to the buffer.
See Also
getNbArticulations()
virtual PxReal PxScene::getBounceThresholdVelocity ( ) const
pure virtual

Return the bounce threshold velocity.

See Also
PxSceneDesc.bounceThresholdVelocity, setBounceThresholdVelocity
virtual PxBroadPhaseCallback* PxScene::getBroadPhaseCallback ( PxClientID  client = PX_DEFAULT_CLIENT) const
pure virtual

Retrieves the PxBroadPhaseCallback pointer set with setBroadPhaseCallback().

Parameters
[in]clientThe client whose callback object is to be returned.
Returns
The current broad-phase callback pointer. See PxBroadPhaseCallback.
See Also
PxBroadPhaseCallback setBroadPhaseCallback()
virtual bool PxScene::getBroadPhaseCaps ( PxBroadPhaseCaps caps) const
pure virtual

Gets broad-phase caps.

Parameters
[out]capsBroad-phase caps
Returns
True if success
virtual PxU32 PxScene::getBroadPhaseRegions ( PxBroadPhaseRegionInfo userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Gets broad-phase regions.

Parameters
[out]userBufferReturned broad-phase regions
[in]bufferSizeSize of userBuffer
[in]startIndexIndex of first desired region, in [0 ; getNbRegions()[
Returns
Number of written out regions
virtual PxBroadPhaseType::Enum PxScene::getBroadPhaseType ( ) const
pure virtual

Returns broad-phase type.

Returns
Broad-phase type
virtual PxCCDContactModifyCallback* PxScene::getCCDContactModifyCallback ( ) const
pure virtual

Retrieves the PxCCDContactModifyCallback pointer set with setContactModifyCallback().

Returns
The current user contact modify callback pointer. See PxContactModifyCallback.
See Also
PxContactModifyCallback setContactModifyCallback()
virtual PxU32 PxScene::getCCDMaxPasses ( ) const
pure virtual

Gets the maximum number of CCD passes.

Returns
The maximum number of CCD passes.
See Also
PxSceneDesc::ccdMaxPasses setCCDMaxPasses()
virtual PxClientBehaviorFlags PxScene::getClientBehaviorFlags ( PxClientID  client) const
pure virtual

Retrieves behavior bits for a client.

See Also
PxClientBehaviorFlag PxClientID setClientBehaviorFlags() createClient()
virtual PxF32 PxScene::getClothInterCollisionDistance ( ) const
pure virtual

Retrieves distance used for cloth inter-collision.

Returns
The distance used for cloth inter-collision.
virtual PxU32 PxScene::getClothInterCollisionNbIterations ( ) const
pure virtual

Retrieves the number of iterations used for cloth inter-collision.

Returns
The number of iterations used for cloth inter-collision.
virtual PxF32 PxScene::getClothInterCollisionStiffness ( ) const
pure virtual

Retrieves the stiffness coefficient used for cloth inter-collision.

Returns
The the stiffness coefficient used for cloth inter-collision.
virtual PxU32 PxScene::getConstraints ( PxConstraint **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Retrieve all the constraint shaders in the scene.

Parameters
[out]userBufferThe buffer to receive constraint shader pointers.
[in]bufferSizeSize of provided user buffer.
[in]startIndexIndex of first constraint pointer to be retrieved
Returns
Number of constraint shaders written to the buffer.
See Also
getNbConstraints()
virtual PxReal PxScene::getContactCorrelationDistance ( ) const
pure virtual
virtual PxContactModifyCallback* PxScene::getContactModifyCallback ( ) const
pure virtual

Retrieves the PxContactModifyCallback pointer set with setContactModifyCallback().

Returns
The current user contact modify callback pointer. See PxContactModifyCallback.
See Also
PxContactModifyCallback setContactModifyCallback()
virtual PxU32 PxScene::getContactReportStreamBufferSize ( ) const
pure virtual
virtual PxCpuDispatcher* PxScene::getCpuDispatcher ( ) const
pure virtual

Return the cpu dispatcher that was set in PxScene::PxCpuDispatcher when creating the scene with PxPhysics::createScene.

See Also
PxSceneDesc::PxCpuDispatcher, PxPhysics::createScene
virtual PxDominanceGroupPair PxScene::getDominanceGroupPair ( PxDominanceGroup  group1,
PxDominanceGroup  group2 
) const
pure virtual
virtual PxPruningStructure::Enum PxScene::getDynamicStructure ( ) const
pure virtual

Return the value of PxSceneDesc::dynamicStructure that was set when creating the scene with PxPhysics::createScene.

See Also
PxSceneDesc::dynamicStructure, PxPhysics::createScene
virtual PxU32 PxScene::getDynamicTreeRebuildRateHint ( ) const
pure virtual

Retrieves the rebuild rate of the dynamic tree pruning structures.

Returns
The rebuild rate of the dynamic tree pruning structures.
See Also
PxSceneDesc.dynamicTreeRebuildRateHint setDynamicTreeRebuildRateHint() forceDynamicTreeRebuild()
virtual PxSimulationFilterCallback* PxScene::getFilterCallback ( ) const
pure virtual

Gets the custom collision filter callback in use for this scene.

Returns
Filter callback class that defines the collision pair filtering.
See Also
PxSceneDesc.filterCallback PxSimulationFilterCallback
virtual PxSimulationFilterShader PxScene::getFilterShader ( ) const
pure virtual

Gets the custom collision filter shader in use for this scene.

Returns
Filter shader class that defines the collision pair filtering.
See Also
PxSceneDesc.filterShader PxSimulationFilterShader
virtual const void* PxScene::getFilterShaderData ( ) const
pure virtual

Gets the shared global filter data in use for this scene.

Note
The reference points to a copy of the original filter data specified in PxSceneDesc.filterShaderData.
Returns
Shared filter data for filter shader.
See Also
getFilterShaderDataSize() PxSceneDesc.filterShaderData PxSimulationFilterShader
virtual PxU32 PxScene::getFilterShaderDataSize ( ) const
pure virtual

Gets the size of the shared global filter data (PxSceneDesc.filterShaderData)

Returns
Size of shared filter data [bytes].
See Also
getFilterShaderData() PxSceneDesc.filterShaderDataSize PxSimulationFilterShader
virtual PxSceneFlags PxScene::getFlags ( ) const
pure virtual

Get the scene flags.

Returns
The scene flags. See PxSceneFlag
See Also
PxSceneFlag
virtual PxReal PxScene::getFrictionOffsetThreshold ( ) const
pure virtual

Return the value of frictionOffsetThreshold that was set in PxSceneDesc when creating the scene with PxPhysics::createScene.

See Also
PxSceneDesc::frictionOffsetThreshold, PxPhysics::createScene
virtual PxFrictionType::Enum PxScene::getFrictionType ( ) const
pure virtual

Return the friction model.

See Also
PxFrictionType, PxSceneDesc::frictionType
virtual PxGpuDispatcher* PxScene::getGpuDispatcher ( ) const
pure virtual

Return the gpu dispatcher that was set in PxScene::PxGpuDispatcher when creating the scene with PxPhysics::createScene.

Platform specific: Applies to PC GPU only.

See Also
PxSceneDesc::PxGpuDispatcher, PxPhysics::createScene
virtual PxVec3 PxScene::getGravity ( ) const
pure virtual

Retrieves the current gravity setting.

Returns
The current gravity for the scene.
See Also
setGravity() PxSceneDesc.gravity
virtual PxSceneLimits PxScene::getLimits ( ) const
pure virtual

Get current scene limits.

Returns
Current scene limits.
See Also
PxSceneLimits
virtual PxU32 PxScene::getMaxNbContactDataBlocksUsed ( ) const
pure virtual

get the maximum number of cache blocks used by the scene

This function may not be called while the scene is simulating

Returns
the maximum number of cache blocks everused by the scene
See Also
PxSceneDesc.nbContactDataBlocks PxSceneDesc.maxNbContactDataBlocks flushSimulation() setNbContactDataBlocks() getNbContactDataBlocksUsed()
virtual PX_DEPRECATED PxReal PxScene::getMeshContactMargin ( ) const
pure virtual

Return the value of PxSceneDesc::meshContactMargin that was set when creating the scene with PxPhysics::createScene.

Deprecated:
See Also
PxSceneDesc::meshContactMargin, PxPhysics::createScene
virtual PxU32 PxScene::getNbActors ( PxActorTypeFlags  types) const
pure virtual

Retrieve the number of actors of certain types in the scene.

Parameters
[in]typesCombination of actor types.
Returns
the number of actors.
See Also
getActors()
virtual PxU32 PxScene::getNbAggregates ( ) const
pure virtual

Returns the number of aggregates in the scene.

Returns
the number of aggregates in this scene.
See Also
getAggregates()
virtual PxU32 PxScene::getNbArticulations ( ) const
pure virtual

Returns the number of articulations in the scene.

Returns
the number of articulations in this scene.
See Also
getArticulations()
virtual PxU32 PxScene::getNbBroadPhaseRegions ( ) const
pure virtual

Returns number of regions currently registered in the broad-phase.

Returns
Number of regions
virtual PxU32 PxScene::getNbConstraints ( ) const
pure virtual

Returns the number of constraint shaders in the scene.

Returns
the number of constraint shaders in this scene.
See Also
getConstraints()
virtual PxU32 PxScene::getNbContactDataBlocksUsed ( ) const
pure virtual

get the number of cache blocks currently used by the scene

This function may not be called while the scene is simulating

Returns
the number of cache blocks currently used by the scene
See Also
PxSceneDesc.nbContactDataBlocks PxSceneDesc.maxNbContactDataBlocks flushSimulation() setNbContactDataBlocks() getMaxNbContactDataBlocksUsed()
virtual PxPhysics& PxScene::getPhysics ( )
pure virtual

Call this method to retrieve the Physics SDK.

Returns
The physics SDK this scene is associated with.
See Also
PxPhysics
virtual const PxRenderBuffer& PxScene::getRenderBuffer ( )
pure virtual

Retrieves the render buffer.

This will contain the results of any active visualization for this scene.

Note
Do not use this method while the simulation is running. Calls to this method while result in undefined behaviour.
Returns
The render buffer.
See Also
PxRenderBuffer
virtual PxU32 PxScene::getSceneQueryStaticTimestamp ( ) const
pure virtual

Retrieves the scene's internal scene query timestamp, increased each time a change to the static scene query structure is performed.

Returns
scene query static timestamp
virtual PxSimulationEventCallback* PxScene::getSimulationEventCallback ( PxClientID  client = PX_DEFAULT_CLIENT) const
pure virtual

Retrieves the simulationEventCallback pointer set with setSimulationEventCallback().

Parameters
[in]clientThe client whose callback object is to be returned.
Returns
The current user notify pointer. See PxSimulationEventCallback.
See Also
PxSimulationEventCallback setSimulationEventCallback()
virtual void PxScene::getSimulationStatistics ( PxSimulationStatistics stats) const
pure virtual

Call this method to retrieve statistics for the current simulation step.

Note
Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored.
Parameters
[out]statsUsed to retrieve statistics for the current simulation step.
See Also
PxSimulationStatistics
virtual PxU32 PxScene::getSolverBatchSize ( ) const
pure virtual

Retrieves the number of actors required to spawn a separate rigid body solver thread.

Returns
Current number of actors required to spawn a separate rigid body solver thread.

Platform specific: Not applicable on PS3.

See Also
PxSceneDesc.solverBatchSize setSolverBatchSize()
virtual PxSpuDispatcher* PxScene::getSpuDispatcher ( ) const
pure virtual

Return the spu dispatcher that was set in PxScene::PxSpuDispatcher when creating the scene with PxPhysics::createScene.

Platform specific: Applies to PS3 only.

See Also
PxSceneDesc::PxSpuDispatcher, PxPhysics::createScene
virtual PxPruningStructure::Enum PxScene::getStaticStructure ( ) const
pure virtual

Return the value of PxSceneDesc::staticStructure that was set when creating the scene with PxPhysics::createScene.

See Also
PxSceneDesc::staticStructure, PxPhysics::createScene
virtual physx::PxTaskManager* PxScene::getTaskManager ( ) const
pure virtual

Get the task manager associated with this scene.

Returns
the task manager associated with the scene
virtual PxU32 PxScene::getTimestamp ( ) const
pure virtual

Retrieves the scene's internal timestamp, increased each time a simulation step is completed.

Returns
scene timestamp
virtual const PxBounds3& PxScene::getVisualizationCullingBox ( ) const
pure virtual

Retrieves the visualization culling box.

Returns
the box to which the geometry will be culled.
See Also
setVisualizationParameter setVisualizationCullingBox
virtual PxReal PxScene::getVisualizationParameter ( PxVisualizationParameter::Enum  paramEnum) const
pure virtual

Function that lets you query debug visualization parameters.

Parameters
[in]paramEnumThe Parameter to retrieve.
Returns
The value of the parameter.
See Also
setVisualizationParameter PxVisualizationParameter
virtual PxReal PxScene::getWakeCounterResetValue ( ) const
pure virtual

Returns the wake counter reset value.

Returns
Wake counter reset value
See Also
PxSceneDesc.wakeCounterResetValue
virtual void PxScene::lockRead ( const char *  file = NULL,
PxU32  line = 0 
)
pure virtual

Lock the scene for reading from the calling thread.

When the PxSceneFlag::eREQUIRE_RW_LOCK flag is enabled lockRead() must be called before any read calls are made on the scene.

Multiple threads may read at the same time, no threads may read while a thread is writing. If a call to lockRead() is made while another thread is holding a write lock then the calling thread will be blocked until the writing thread calls unlockWrite().

Note
Lock upgrading is not supported, that means it is an error to call lockRead() followed by lockWrite().
Recursive locking is supported but each lockRead() call must be paired with an unlockRead().
Parameters
fileString representing the calling file, for debug purposes
lineThe source file line number, for debug purposes
virtual void PxScene::lockWrite ( const char *  file = NULL,
PxU32  line = 0 
)
pure virtual

Lock the scene for writing from this thread.

When the PxSceneFlag::eREQUIRE_RW_LOCK flag is enabled lockWrite() must be called before any write calls are made on the scene.

Only one thread may write at a time and no threads may read while a thread is writing. If a call to lockWrite() is made and there are other threads reading then the calling thread will be blocked until the readers complete.

Writers have priority. If a thread is blocked waiting to write then subsequent calls to lockRead() from other threads will be blocked until the writer completes.

Note
If multiple threads are waiting to write then the thread that is first granted access depends on OS scheduling.
Recursive locking is supported but each lockWrite() call must be paired with an unlockWrite().
If a thread has already locked the scene for writing then it may call lockRead().
Parameters
fileString representing the calling file, for debug purposes
lineThe source file line number, for debug purposes
virtual bool PxScene::overlap ( const PxGeometry geometry,
const PxTransform pose,
PxOverlapCallback hitCall,
const PxQueryFilterData filterData = PxQueryFilterData(),
PxQueryFilterCallback filterCall = NULL 
) const
pure virtual

Performs an overlap test of a given geometry against objects in the scene, returns results in a PxOverlapBuffer object or via a custom user callback implementation inheriting from PxOverlapCallback.

Note
Filtering: returning eBLOCK from user filter for overlap queries will cause a warning (see PxQueryHitType).
Parameters
[in]geometryGeometry of object to check for overlap (supported types are: box, sphere, capsule, convex).
[in]posePose of the object.
[out]hitCallOverlap hit buffer or callback object used to report overlap hits.
[in]filterDataFiltering data and simple logic. See PxQueryFilterData PxQueryFilterCallback
[in]filterCallCustom filtering logic (optional). Only used if the corresponding PxQueryFlag flags are set. If NULL, all hits are assumed to overlap.
Returns
True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
Note
eBLOCK should not be returned from user filters for overlap(). Doing so will result in undefined behavior, and a warning will be issued.
If the PxQueryFlag::eNO_BLOCK flag is set, the eBLOCK will instead be automatically converted to an eTOUCH and the warning suppressed.
See Also
PxOverlapCallback PxOverlapBuffer PxHitFlags PxQueryFilterData PxQueryFilterCallback
PX_DEPRECATED PX_INLINE bool PxScene::overlapAny ( const PxGeometry geometry,
const PxTransform pose,
PxOverlapHit hit,
const PxSceneQueryFilterData filterData = PxSceneQueryFilterData(),
PxSceneQueryFilterCallback filterCall = NULL,
PxClientID  queryClient = PX_DEFAULT_CLIENT 
)
inline
PX_DEPRECATED PX_INLINE PxI32 PxScene::overlapMultiple ( const PxGeometry geometry,
const PxTransform pose,
PxOverlapHit hitBuffer,
PxU32  hitBufferSize,
const PxSceneQueryFilterData filterData = PxSceneQueryFilterData(),
PxSceneQueryFilterCallback filterCall = NULL,
PxClientID  queryClient = PX_DEFAULT_CLIENT 
)
inline
virtual bool PxScene::raycast ( const PxVec3 origin,
const PxVec3 unitDir,
const PxReal  distance,
PxRaycastCallback hitCall,
PxHitFlags  hitFlags = PxHitFlags(PxHitFlag::eDEFAULT),
const PxQueryFilterData filterData = PxQueryFilterData(),
PxQueryFilterCallback filterCall = NULL,
const PxQueryCache cache = NULL 
) const
pure virtual

Performs a raycast against objects in the scene, returns results in a PxRaycastBuffer object or via a custom user callback implementation inheriting from PxRaycastCallback.

Note
Touching hits are not ordered.
Shooting a ray from within an object leads to different results depending on the shape type. Please check the details in user guide article SceneQuery. User can ignore such objects by employing one of the provided filter mechanisms.
Parameters
[in]originOrigin of the ray.
[in]unitDirNormalized direction of the ray.
[in]distanceLength of the ray. Has to be in the [0, inf) range.
[out]hitCallRaycast hit buffer or callback object used to report raycast hits.
[in]hitFlagsSpecifies which properties per hit should be computed and returned via the hit callback.
[in]filterDataFiltering data passed to the filer shader. See PxQueryFilterData PxBatchQueryPreFilterShader, PxBatchQueryPostFilterShader
[in]filterCallCustom filtering logic (optional). Only used if the corresponding PxQueryFlag flags are set. If NULL, all hits are assumed to be blocking.
[in]cacheCached hit shape (optional). Ray is tested against cached shape first. If no hit is found the ray gets queried against the scene. Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit. Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
Returns
True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
See Also
PxRaycastCallback PxRaycastBuffer PxQueryFilterData PxQueryFilterCallback PxQueryCache PxRaycastHit PxQueryFlag PxQueryFlag::eANY_HIT
PX_DEPRECATED PX_INLINE bool PxScene::raycastAny ( const PxVec3 origin,
const PxVec3 unitDir,
const PxReal  distance,
PxSceneQueryHit hit,
const PxSceneQueryFilterData filterData = PxSceneQueryFilterData(),
PxSceneQueryFilterCallback filterCall = NULL,
const PxSceneQueryCache cache = NULL,
PxClientID  queryClient = PX_DEFAULT_CLIENT 
) const
inline
PX_DEPRECATED PX_INLINE PxI32 PxScene::raycastMultiple ( const PxVec3 origin,
const PxVec3 unitDir,
const PxReal  distance,
PxSceneQueryFlags  outputFlags,
PxRaycastHit hitBuffer,
PxU32  hitBufferSize,
bool &  blockingHit,
const PxSceneQueryFilterData filterData = PxSceneQueryFilterData(),
PxSceneQueryFilterCallback filterCall = NULL,
const PxSceneQueryCache cache = NULL,
PxClientID  queryClient = PX_DEFAULT_CLIENT 
)
inline
PX_DEPRECATED PX_INLINE bool PxScene::raycastSingle ( const PxVec3 origin,
const PxVec3 unitDir,
const PxReal  distance,
PxSceneQueryFlags  outputFlags,
PxRaycastHit hit,
const PxSceneQueryFilterData filterData = PxSceneQueryFilterData(),
PxSceneQueryFilterCallback filterCall = NULL,
const PxSceneQueryCache cache = NULL,
PxClientID  queryClient = PX_DEFAULT_CLIENT 
)
inline
virtual void PxScene::release ( )
pure virtual

Deletes the scene.

Removes any actors, particle systems, and constraint shaders from this scene (if the user hasn't already done so).

Be sure to not keep a reference to this object after calling release. Avoid release calls while the scene is simulating (in between simulate() and fetchResults() calls).

See Also
PxPhysics.createScene()
virtual void PxScene::removeActor ( PxActor actor,
bool  wakeOnLostTouch = true 
)
pure virtual

Removes an actor from this scene.

Note
If the actor is not part of this scene (see PxActor::getScene), the call is ignored and an error is issued.
You can not remove individual articulation links (see PxArticulationLink) from the scene. Use removeArticulation() instead.
If the actor is a PxRigidActor then all assigned PxConstraint objects will get removed from the scene automatically.
If the actor is in an aggregate it will be removed from the aggregate.
Parameters
[in]actorActor to remove from scene.
[in]wakeOnLostTouchSpecifies whether touching objects from the previous frame should get woken up in the next frame. Only applies to PxArticulation and PxRigidActor types.
See Also
PxActor, PxAggregate
virtual void PxScene::removeActors ( PxActor *const *  actors,
PxU32  nbActors,
bool  wakeOnLostTouch = true 
)
pure virtual

Removes actors from this scene.

Note
If some actor is not part of this scene (see PxActor::getScene), the actor remove is ignored and an error is issued.
You can not remove individual articulation links (see PxArticulationLink) from the scene. Use removeArticulation() instead.
If the actor is a PxRigidActor then all assigned PxConstraint objects will get removed from the scene automatically.
Parameters
[in]actorsArray of actors to add to scene.
[in]nbActorsNumber of actors in the array.
[in]wakeOnLostTouchSpecifies whether touching objects from the previous frame should get woken up in the next frame. Only applies to PxArticulation and PxRigidActor types.
See Also
PxActor
virtual void PxScene::removeAggregate ( PxAggregate aggregate,
bool  wakeOnLostTouch = true 
)
pure virtual

Removes an aggregate from this scene.

Note
If the aggregate is not part of this scene (see PxAggregate::getScene), the call is ignored and an error is issued.
If the aggregate contains actors, those actors are removed from the scene as well.
Parameters
[in]aggregateAggregate to remove from scene.
[in]wakeOnLostTouchSpecifies whether touching objects from the previous frame should get woken up in the next frame. Only applies to PxArticulation and PxRigidActor types.
See Also
PxAggregate
virtual void PxScene::removeArticulation ( PxArticulation articulation,
bool  wakeOnLostTouch = true 
)
pure virtual

Removes an articulation from this scene.

Note
If the articulation is not part of this scene (see PxArticulation::getScene), the call is ignored and an error is issued.
If the articulation is in an aggregate it will be removed from the aggregate.
Parameters
[in]articulationArticulation to remove from scene. See PxArticulation
[in]wakeOnLostTouchSpecifies whether touching objects from the previous frame should get woken up in the next frame. Only applies to PxArticulation and PxRigidActor types.
See Also
PxArticulation, PxAggregate
virtual bool PxScene::removeBroadPhaseRegion ( PxU32  handle)
pure virtual

Removes a new broad-phase region.

If the region still contains objects, and if those objects do not overlap any region any more, they are not automatically removed from the simulation. Instead, the PxBroadPhaseCallback::onObjectOutOfBounds notification is used for each object. Users are responsible for removing the objects from the simulation if this is the desired behavior.

If the handle is invalid, or if a valid handle is removed twice, an error message is sent to the error stream.

Parameters
[in]handleRegion's handle, as returned by PxScene::addBroadPhaseRegion.
Returns
True if success
virtual void PxScene::resetFiltering ( PxActor actor)
pure virtual

Marks the object to reset interactions and re-run collision filters in the next simulation step.

This call forces the object to remove all existing collision interactions, to search anew for existing contact pairs and to run the collision filters again for found collision pairs.

Note
The operation is supported for PxParticleBase and PxRigidActor objects only.
All persistent state of existing interactions will be lost and can not be retrieved even if the same collison pair is found again in the next step. This will mean, for example, that you will not get notified about persistent contact for such an interaction (see PxPairFlag::eNOTIFY_TOUCH_PERSISTS), the contact pair will be interpreted as newly found instead.
Lost touch contact reports will be sent for every collision pair which includes this shape, if they have been requested through PxPairFlag::eNOTIFY_TOUCH_LOST or PxPairFlag::eNOTIFY_THRESHOLD_FORCE_LOST.
This is an expensive operation, don't use it if you don't have to.
Can be used to retrieve collision pairs that were killed by the collision filters (see PxFilterFlag::eKILL)
It is invalid to use this method if the actor has not been added to a scene already.
It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.

Sleeping: Does wake up the actor.

Parameters
[in]actorThe actor for which to re-evaluate interactions.
See Also
PxSimulationFilterShader PxSimulationFilterCallback
virtual void PxScene::resetFiltering ( PxRigidActor actor,
PxShape *const *  shapes,
PxU32  shapeCount 
)
pure virtual

Marks the object to reset interactions and re-run collision filters for specified shapes in the next simulation step.

This is a specialization of the resetFiltering(PxActor& actor) method and allows to reset interactions for specific shapes of a PxRigidActor.

Sleeping: Does wake up the actor.

Parameters
[in]actorThe actor for which to re-evaluate interactions.
[in]shapesThe shapes for which to re-evaluate interactions.
[in]shapeCountNumber of shapes in the list.
See Also
PxSimulationFilterShader PxSimulationFilterCallback
virtual void PxScene::setBounceThresholdVelocity ( const PxReal  t)
pure virtual

Set the bounce threshold velocity. Collision speeds below this threshold will not cause a bounce.

See Also
PxSceneDesc::bounceThresholdVelocity, getBounceThresholdVelocity
virtual void PxScene::setBroadPhaseCallback ( PxBroadPhaseCallback callback,
PxClientID  client = PX_DEFAULT_CLIENT 
)
pure virtual

Sets a broad-phase user callback object.

Multiclient behavior: unlike the PxBroadPhaseCallback that can be specified in the PxSceneDesc, this method lets the user associate additional callbacks with clients other than PX_DEFAULT_CLIENT. This way each client can register its own callback class. Each callback function has a somewhat different way of determining which clients' callbacks will be called in a certain event. Refer to the documentation of particular callback functions inside PxBroadPhaseCallback for this information.

Note
Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
Parameters
[in]callbackAsynchronous broad-phase callback. See PxBroadPhaseCallback.
[in]clientThe client to be associated with this callback.
virtual void PxScene::setCCDContactModifyCallback ( PxCCDContactModifyCallback callback)
pure virtual

Sets a user callback object, which receives callbacks on all CCD contacts generated for specified actors.

Note
Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
Parameters
[in]callbackAsynchronous user contact modification callback. See PxCCDContactModifyCallback.
virtual void PxScene::setCCDMaxPasses ( PxU32  ccdMaxPasses)
pure virtual

Sets the maximum number of CCD passes.

Parameters
[in]ccdMaxPassesMaximum number of CCD passes
See Also
PxSceneDesc.ccdMaxPasses getCCDMaxPasses()
virtual void PxScene::setClientBehaviorFlags ( PxClientID  client,
PxClientBehaviorFlags  clientBehaviorFlags 
)
pure virtual

Sets behavior bits for a client.

The behavior bits are a property of a client that determine when it receives callbacks.

It is permissible to change the behavior for PX_DEFAULT_CLIENT with this call. Initially all created clients, as well as PX_DEFAULT_CLIENT have all bits set to 0.

Note that in addition to setting a client to listen to a particular foreign actor event type, the user must also configure actors to send that particular event type to foreign clients using PxActor::setClientBehaviorFlags().

See Also
PxClientBehaviorFlag PxClientID createClient() getClientBehaviorFlags() PxActor::setClientBehaviorFlags()
virtual void PxScene::setClothInterCollisionDistance ( PxF32  distance)
pure virtual

Sets the minimum separation distance for cloth inter-collision.

Particles closer than this distance that belong to different PxCloth objects will be separated.

Parameters
[in]distanceThe minimum particle separation distance (default: 0.0).
Note
The PxCloth objects that interact can be controlled through the filter shader,
See Also
PxSimulationFilterShader. Cloth objects with the PxClothFlag::eGPU set can only interact with other GPU simulated Cloth objects.
virtual void PxScene::setClothInterCollisionNbIterations ( PxU32  nbIterations)
pure virtual

Sets the number of inter-collision separation iterations to perform.

The accuracy of cloth inter-collision may be improved by increasing the number of separation passes that are performed.

Parameters
[in]nbIterationsThe number of iterations to perform (default: 1).
virtual void PxScene::setClothInterCollisionStiffness ( PxF32  stiffness)
pure virtual

Sets the cloth inter-collision stiffness.

Inter-collision stiffness controls how much two particles repel each other when they are closer than the inter-collision distance.

Parameters
[in]stiffnessFraction of distance residual to resolve per iteration (default: 1.0).
virtual void PxScene::setContactModifyCallback ( PxContactModifyCallback callback)
pure virtual

Sets a user callback object, which receives callbacks on all contacts generated for specified actors.

Note
Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
Parameters
[in]callbackAsynchronous user contact modification callback. See PxContactModifyCallback.
virtual void PxScene::setDominanceGroupPair ( PxDominanceGroup  group1,
PxDominanceGroup  group2,
const PxDominanceGroupPair dominance 
)
pure virtual

Specifies the dominance behavior of contacts between two actors with two certain dominance groups.

It is possible to assign each actor to a dominance groups using PxActor::setDominanceGroup().

With dominance groups one can have all contacts created between actors act in one direction only. This is useful, for example, if you want an object to push debris out of its way and be unaffected,while still responding physically to forces and collisions with non-debris objects.

Whenever a contact between two actors (a0, a1) needs to be solved, the groups (g0, g1) of both actors are retrieved. Then the PxDominanceGroupPair setting for this group pair is retrieved with getDominanceGroupPair(g0, g1).

In the contact, PxDominanceGroupPair::dominance0 becomes the dominance setting for a0, and PxDominanceGroupPair::dominance1 becomes the dominance setting for a1. A dominanceN setting of 1.0f, the default, will permit aN to be pushed or pulled by a(1-N) through the contact. A dominanceN setting of 0.0f, will however prevent aN to be pushed by a(1-N) via the contact. Thus, a PxDominanceGroupPair of (1.0f, 0.0f) makes the interaction one-way.

The matrix sampled by getDominanceGroupPair(g1, g2) is initialised by default such that:

if g1 == g2, then (1.0f, 1.0f) is returned if g1 < g2, then (0.0f, 1.0f) is returned if g1 > g2, then (1.0f, 0.0f) is returned

In other words, we permit actors in higher groups to be pushed around by actors in lower groups by default.

These settings should cover most applications, and in fact not overriding these settings may likely result in higher performance.

It is not possible to make the matrix asymetric, or to change the diagonal. In other words:

it is not possible to change (g1, g2) if (g1==g2) if you set

(g1, g2) to X, then (g2, g1) will implicitly and automatically be set to ~X, where:

~(1.0f, 1.0f) is (1.0f, 1.0f) ~(0.0f, 1.0f) is (1.0f, 0.0f) ~(1.0f, 0.0f) is (0.0f, 1.0f)

These two restrictions are to make sure that contacts between two actors will always evaluate to the same dominance setting, regardless of the order of the actors.

Dominance settings are currently specified as floats 0.0f or 1.0f because in the future we may permit arbitrary fractional settings to express 'partly-one-way' interactions.

Sleeping: Does NOT wake actors up automatically.

See Also
getDominanceGroupPair() PxDominanceGroup PxDominanceGroupPair PxActor::setDominanceGroup() PxActor::getDominanceGroup()
virtual void PxScene::setDynamicTreeRebuildRateHint ( PxU32  dynamicTreeRebuildRateHint)
pure virtual

Sets the rebuild rate of the dynamic tree pruning structures.

Parameters
[in]dynamicTreeRebuildRateHintRebuild rate of the dynamic tree pruning structures.
See Also
PxSceneDesc.dynamicTreeRebuildRateHint getDynamicTreeRebuildRateHint() forceDynamicTreeRebuild()
virtual void PxScene::setFlag ( PxSceneFlag::Enum  flag,
bool  value 
)
pure virtual

Sets a scene flag. You can only set one flag at a time.

Note
Not all flags are mutable and changing some will result in an error. Please check PxSceneFlag to see which flags can be changed.
See Also
PxSceneFlag
virtual void PxScene::setFrictionType ( PxFrictionType::Enum  frictionType)
pure virtual

Set the friction model.

See Also
PxFrictionType, PxSceneDesc::frictionType
virtual void PxScene::setGravity ( const PxVec3 vec)
pure virtual

Sets a constant gravity for the entire scene.

Sleeping: Does NOT wake the actor up automatically.

Parameters
[in]vecA new gravity vector(e.g. PxVec3(0.0f,-9.8f,0.0f) ) Range: force vector
See Also
PxSceneDesc.gravity getGravity()
virtual void PxScene::setLimits ( const PxSceneLimits limits)
pure virtual

Set new scene limits.

Note
Increase the maximum capacity of various data structures in the scene. The new capacities will be at least as large as required to deal with the objects currently in the scene. Further, these values are for preallocation and do not represent hard limits.
Parameters
[in]limitsScene limits.
See Also
PxSceneLimits
virtual void PxScene::setNbContactDataBlocks ( PxU32  numBlocks)
pure virtual

set the cache blocks that can be used during simulate().

Each frame the simulation requires memory to store contact, friction, and contact cache data. This memory is used in blocks of 16K. Each frame the blocks used by the previous frame are freed, and may be retrieved by the application using PxScene::flushSimulation()

This call will force allocation of cache blocks if the numBlocks parameter is greater than the currently allocated number of blocks, and less than the max16KContactDataBlocks parameter specified at scene creation time.

Parameters
[in]numBlocksThe number of blocks to allocate.
See Also
PxSceneDesc.nbContactDataBlocks PxSceneDesc.maxNbContactDataBlocks flushSimulation() getNbContactDataBlocksUsed getMaxNbContactDataBlocksUsed
virtual void PxScene::setSimulationEventCallback ( PxSimulationEventCallback callback,
PxClientID  client = PX_DEFAULT_CLIENT 
)
pure virtual

Sets a user notify object which receives special simulation events when they occur.

Multiclient behavior: unlike the PxSimulationEventCallback that can be specified in the PxSceneDesc, this method lets the user associate additional callbacks with clients other than PX_DEFAULT_CLIENT. This way each client can register its own callback class. Each callback function has a somewhat different way of determining which clients' callbacks will be called in a certain event. Refer to the documentation of particular callback functions inside PxSimulationEventCallback for this information.

Note
Do not set the callback while the simulation is running. Calls to this method while the simulation is running will be ignored.
Parameters
[in]callbackUser notification callback. See PxSimulationEventCallback.
[in]clientThe client to be associated with this callback.
See Also
PxSimulationEventCallback getSimulationEventCallback
virtual void PxScene::setSolverBatchSize ( PxU32  solverBatchSize)
pure virtual

Sets the number of actors required to spawn a separate rigid body solver thread.

Parameters
[in]solverBatchSizeNumber of actors required to spawn a separate rigid body solver thread.

Platform specific: Not applicable on PS3.

See Also
PxSceneDesc.solverBatchSize getSolverBatchSize()
virtual void PxScene::setVisualizationCullingBox ( const PxBounds3 box)
pure virtual

Defines a box in world space to which visualization geometry will be (conservatively) culled.

Parameters
[in]boxthe box to which the geometry will be culled.
See Also
setVisualizationParameter getVisualizationCullingBox getRenderBuffer()
virtual bool PxScene::setVisualizationParameter ( PxVisualizationParameter::Enum  param,
PxReal  value 
)
pure virtual

Function that lets you set debug visualization parameters.

Returns false if the value passed is out of range for usage specified by the enum.

Parameters
[in]paramParameter to set. See PxVisualizationParameter
[in]valueThe value to set, see PxVisualizationParameter for allowable values. Setting to zero disables visualization for the specified property, setting to a positive value usually enables visualization and defines the scale factor.
Returns
False if the parameter is out of range.
See Also
getVisualizationParameter PxVisualizationParameter getRenderBuffer()
virtual void PxScene::shiftOrigin ( const PxVec3 shift)
pure virtual

Shift the scene origin by the specified vector.

The poses of all objects in the scene and the corresponding data structures will get adjusted to reflect the new origin location (the shift vector will get subtracted from all object positions).

Note
It is the user's responsibility to keep track of the summed total origin shift and adjust all input/output to/from PhysX accordingly.
Do not use this method while the simulation is running. Calls to this method while the simulation is running will be ignored.
Make sure to propagate the origin shift to other dependent modules (for example, the character controller module etc.).
This is an expensive operation and we recommend to use it only in the case where distance related precision issues may arise in areas far from the origin.
Parameters
[in]shiftTranslation vector to shift the origin by.
virtual void PxScene::simulate ( PxReal  elapsedTime,
physx::PxBaseTask *  completionTask = NULL,
void *  scratchMemBlock = 0,
PxU32  scratchMemBlockSize = 0,
bool  controlSimulation = true 
)
pure virtual

Advances the simulation by an elapsedTime time.

Note
Large elapsedTime values can lead to instabilities. In such cases elapsedTime should be subdivided into smaller time intervals and simulate() should be called multiple times for each interval.

Calls to simulate() should pair with calls to fetchResults(): Each fetchResults() invocation corresponds to exactly one simulate() invocation; calling simulate() twice without an intervening fetchResults() or fetchResults() twice without an intervening simulate() causes an error condition.

scene->simulate(); ...do some processing until physics is computed... scene->fetchResults(); ...now results of run may be retrieved.

Parameters
[in]elapsedTimeAmount of time to advance simulation by. The parameter has to be larger than 0, else the resulting behavior will be undefined. Range: (0, PX_MAX_F32)
[in]completionTaskif non-NULL, this task will have its refcount incremented in simulate(), then decremented when the scene is ready to have fetchResults called. So the task will not run until the application also calls removeReference().
[in]scratchMemBlocka memory region for physx to use for temporary data during simulation. This block may be reused by the application after fetchResults returns. Must be aligned on a 16-byte boundary
[in]scratchMemBlockSizethe size of the scratch memory block. Must be a multiple of 16K.
[in]controlSimulationif true, the scene controls its PxTaskManager simulation state. Leave true unless the application is calling the PxTaskManager start/stopSimulation() methods itself.
See Also
fetchResults() checkResults()
virtual void PxScene::solve ( PxReal  elapsedTime,
physx::PxBaseTask *  completionTask = 0,
void *  scratchMemBlock = 0,
PxU32  scratchMemBlockSize = 0,
bool  controlSimulation = true 
)
pure virtual

Advances the simulation by an elapsedTime time.

Note
Not implemented in this release!
virtual bool PxScene::sweep ( const PxGeometry geometry,
const PxTransform pose,
const PxVec3 unitDir,
const PxReal  distance,
PxSweepCallback hitCall,
PxHitFlags  hitFlags = PxHitFlags(PxHitFlag::eDEFAULT),
const PxQueryFilterData filterData = PxQueryFilterData(),
PxQueryFilterCallback filterCall = NULL,
const PxQueryCache cache = NULL,
const PxReal  inflation = 0.f 
) const
pure virtual

Performs a sweep test against objects in the scene, returns results in a PxSweepBuffer object or via a custom user callback implementation inheriting from PxSweepCallback.

Note
Touching hits are not ordered.
If a shape from the scene is already overlapping with the query shape in its starting position, the hit is returned unless eASSUME_NO_INITIAL_OVERLAP was specified.
Parameters
[in]geometryGeometry of object to sweep (supported types are: box, sphere, capsule, convex).
[in]posePose of the sweep object.
[in]unitDirNormalized direction of the sweep.
[in]distanceSweep distance. Needs to be in [0, inf) range and >0 if eASSUME_NO_INITIAL_OVERLAP was specified. Will be clamped to PX_MAX_SWEEP_DISTANCE.
[out]hitCallSweep hit buffer or callback object used to report sweep hits.
[in]hitFlagsSpecifies which properties per hit should be computed and returned via the hit callback.
[in]filterDataFiltering data and simple logic.
[in]filterCallCustom filtering logic (optional). Only used if the corresponding PxQueryFlag flags are set. If NULL, all hits are assumed to be blocking.
[in]cacheCached hit shape (optional). Sweep is performed against cached shape first. If no hit is found the sweep gets queried against the scene. Note: Filtering is not executed for a cached shape if supplied; instead, if a hit is found, it is assumed to be a blocking hit. Note: Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking.
[in]inflationThis parameter creates a skin around the swept geometry which increases its extents for sweeping. The sweep will register a hit as soon as the skin touches a shape, and will return the corresponding distance and normal. Note: ePRECISE_SWEEP doesn't support inflation. Therefore the sweep will be performed with zero inflation.
Returns
True if any touching or blocking hits were found or any hit was found in case PxQueryFlag::eANY_HIT was specified.
See Also
PxSweepCallback PxSweepBuffer PxQueryFilterData PxQueryFilterCallback PxSweepHit PxQueryCache
PX_DEPRECATED PX_INLINE bool PxScene::sweepAny ( const PxGeometry geometry,
const PxTransform pose,
const PxVec3 unitDir,
const PxReal  distance,
PxSceneQueryFlags  queryFlags,
PxSceneQueryHit hit,
const PxSceneQueryFilterData filterData = PxSceneQueryFilterData(),
PxSceneQueryFilterCallback filterCall = NULL,
const PxSceneQueryCache cache = NULL,
PxClientID  queryClient = PX_DEFAULT_CLIENT,
const PxReal  inflation = 0.f 
)
inline
PX_DEPRECATED PX_INLINE PxI32 PxScene::sweepMultiple ( const PxGeometry geometry,
const PxTransform pose,
const PxVec3 unitDir,
const PxReal  distance,
PxSceneQueryFlags  outputFlags,
PxSweepHit hitBuffer,
PxU32  hitBufferSize,
bool &  blockingHit,
const PxSceneQueryFilterData filterData = PxSceneQueryFilterData(),
PxSceneQueryFilterCallback filterCall = NULL,
const PxSceneQueryCache cache = NULL,
PxClientID  queryClient = PX_DEFAULT_CLIENT,
const PxReal  inflation = 0.f 
)
inline
PX_DEPRECATED PX_INLINE bool PxScene::sweepSingle ( const PxGeometry geometry,
const PxTransform pose,
const PxVec3 unitDir,
const PxReal  distance,
PxSceneQueryFlags  outputFlags,
PxSweepHit hit,
const PxSceneQueryFilterData filterData = PxSceneQueryFilterData(),
PxSceneQueryFilterCallback filterCall = NULL,
const PxSceneQueryCache cache = NULL,
PxClientID  queryClient = PX_DEFAULT_CLIENT,
const PxReal  inflation = 0.f 
)
inline
virtual void PxScene::unlockRead ( )
pure virtual

Unlock the scene from reading.

Note
Each unlockRead() must be paired with a lockRead() from the same thread.
virtual void PxScene::unlockWrite ( )
pure virtual

Unlock the scene from writing.

Note
Each unlockWrite() must be paired with a lockWrite() from the same thread.

Member Data Documentation

void* PxScene::userData

user can assign this to whatever, usually to create a 1:1 relationship with a user object.


The documentation for this class was generated from the following file:


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com