|
RavEngine
|
Base class for the scene-query system. More...
#include <PxSceneQuerySystem.h>
Public Member Functions | |
Scene Query | |
| virtual void | setDynamicTreeRebuildRateHint (PxU32 dynamicTreeRebuildRateHint)=0 |
| Sets the rebuild rate of the dynamic tree pruning structures. | |
| virtual PxU32 | getDynamicTreeRebuildRateHint () const =0 |
| Retrieves the rebuild rate of the dynamic tree pruning structures. | |
| virtual void | forceRebuildDynamicTree (PxU32 prunerIndex)=0 |
| Forces dynamic trees to be immediately rebuilt. | |
| virtual void | setUpdateMode (PxSceneQueryUpdateMode::Enum updateMode)=0 |
| Sets scene query update mode. | |
| virtual PxSceneQueryUpdateMode::Enum | getUpdateMode () const =0 |
| Gets scene query update mode. | |
| virtual PxU32 | getStaticTimestamp () const =0 |
| Retrieves the system's internal scene query timestamp, increased each time a change to the static scene query structure is performed. | |
| virtual void | flushUpdates ()=0 |
| Flushes any changes to the scene query representation. | |
| virtual bool | raycast (const PxVec3 &origin, const PxVec3 &unitDir, const PxReal distance, PxRaycastCallback &hitCall, PxHitFlags hitFlags=PxHitFlag::eDEFAULT, const PxQueryFilterData &filterData=PxQueryFilterData(), PxQueryFilterCallback *filterCall=NULL, const PxQueryCache *cache=NULL, PxGeometryQueryFlags queryFlags=PxGeometryQueryFlag::eDEFAULT) 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. | |
| virtual bool | sweep (const PxGeometry &geometry, const PxTransform &pose, const PxVec3 &unitDir, const PxReal distance, PxSweepCallback &hitCall, PxHitFlags hitFlags=PxHitFlag::eDEFAULT, const PxQueryFilterData &filterData=PxQueryFilterData(), PxQueryFilterCallback *filterCall=NULL, const PxQueryCache *cache=NULL, const PxReal inflation=0.0f, PxGeometryQueryFlags queryFlags=PxGeometryQueryFlag::eDEFAULT) 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. | |
| virtual bool | overlap (const PxGeometry &geometry, const PxTransform &pose, PxOverlapCallback &hitCall, const PxQueryFilterData &filterData=PxQueryFilterData(), PxQueryFilterCallback *filterCall=NULL, const PxQueryCache *cache=NULL, PxGeometryQueryFlags queryFlags=PxGeometryQueryFlag::eDEFAULT) 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. | |
Base class for the scene-query system.
Methods defined here are common to both the traditional PxScene API and the PxSceneQuerySystem API.
|
pure virtual |
Flushes any changes 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.
Implemented in physx::NpScene.
|
pure virtual |
Forces dynamic trees to be immediately rebuilt.
| [in] | prunerIndex | Index of pruner containing the dynamic tree to rebuild |
Implemented in physx::NpScene.
|
pure virtual |
Retrieves the rebuild rate of the dynamic tree pruning structures.
Implemented in physx::NpScene.
|
pure virtual |
Retrieves the system's internal scene query timestamp, increased each time a change to the static scene query structure is performed.
Implemented in physx::NpScene.
|
pure virtual |
Gets scene query update mode.
Implemented in physx::NpScene.
|
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.
| [in] | geometry | Geometry of object to check for overlap (supported types are: box, sphere, capsule, convex). |
| [in] | pose | Pose of the object. |
| [out] | hitCall | Overlap hit buffer or callback object used to report overlap hits. |
| [in] | filterData | Filtering data and simple logic. See #PxQueryFilterData #PxQueryFilterCallback |
| [in] | filterCall | Custom filtering logic (optional). Only used if the corresponding #PxQueryFlag flags are set. If NULL, all hits are assumed to overlap. |
| [in] | cache | Cached hit shape (optional). Overlap is performed against cached shape first. If no hit is found the overlap gets queried against the scene. |
| [in] | queryFlags | Optional flags controlling the query. 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. |
Implemented in physx::NpScene.
|
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.
| [in] | origin | Origin of the ray. |
| [in] | unitDir | Normalized direction of the ray. |
| [in] | distance | Length of the ray. Has to be in the [0, inf) range. |
| [out] | hitCall | Raycast hit buffer or callback object used to report raycast hits. |
| [in] | hitFlags | Specifies which properties per hit should be computed and returned via the hit callback. |
| [in] | filterData | Filtering data passed to the filter shader. |
| [in] | filterCall | Custom filtering logic (optional). Only used if the corresponding #PxQueryFlag flags are set. If NULL, all hits are assumed to be blocking. |
| [in] | cache | Cached 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. |
| [in] | queryFlags | Optional flags controlling the query. |
Implemented in physx::NpScene.
|
pure virtual |
Sets the rebuild rate of the dynamic tree pruning structures.
| [in] | dynamicTreeRebuildRateHint | Rebuild rate of the dynamic tree pruning structures. |
Implemented in physx::NpScene.
|
pure virtual |
Sets scene query update mode.
| [in] | updateMode | Scene query update mode. |
Implemented in physx::NpScene.
|
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.
| [in] | geometry | Geometry of object to sweep (supported types are: box, sphere, capsule, convex). |
| [in] | pose | Pose of the sweep object. |
| [in] | unitDir | Normalized direction of the sweep. |
| [in] | distance | Sweep 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] | hitCall | Sweep hit buffer or callback object used to report sweep hits. |
| [in] | hitFlags | Specifies which properties per hit should be computed and returned via the hit callback. |
| [in] | filterData | Filtering data and simple logic. |
| [in] | filterCall | Custom filtering logic (optional). Only used if the corresponding #PxQueryFlag flags are set. If NULL, all hits are assumed to be blocking. |
| [in] | cache | Cached 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] | inflation | This 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. |
| [in] | queryFlags | Optional flags controlling the query. |
Implemented in physx::NpScene.