aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/SceneQuery/include
diff options
context:
space:
mode:
Diffstat (limited to 'PhysX_3.4/Source/SceneQuery/include')
-rw-r--r--PhysX_3.4/Source/SceneQuery/include/SqPruner.h11
-rw-r--r--PhysX_3.4/Source/SceneQuery/include/SqSceneQueryManager.h9
2 files changed, 17 insertions, 3 deletions
diff --git a/PhysX_3.4/Source/SceneQuery/include/SqPruner.h b/PhysX_3.4/Source/SceneQuery/include/SqPruner.h
index 871962df..9c77b1b5 100644
--- a/PhysX_3.4/Source/SceneQuery/include/SqPruner.h
+++ b/PhysX_3.4/Source/SceneQuery/include/SqPruner.h
@@ -227,10 +227,19 @@ public:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Steps the accel structure build.
+ * canDoInit specifies if initialization can happen. It should not initialize build when called from a different thread
* returns true if finished
*/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- virtual bool buildStep() = 0;
+ virtual bool buildStep(bool canDoInit = true) = 0;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * Prepares new tree build
+ * returns true if new tree is needed
+ */
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ virtual bool prepareBuild() = 0;
};
//////////////////////////////////////////////////////////////////////////
diff --git a/PhysX_3.4/Source/SceneQuery/include/SqSceneQueryManager.h b/PhysX_3.4/Source/SceneQuery/include/SqSceneQueryManager.h
index 073bf5d3..f7e60465 100644
--- a/PhysX_3.4/Source/SceneQuery/include/SqSceneQueryManager.h
+++ b/PhysX_3.4/Source/SceneQuery/include/SqSceneQueryManager.h
@@ -148,13 +148,15 @@ namespace Sq
void flushUpdates();
void forceDynamicTreeRebuild(bool rebuildStaticStructure, bool rebuildDynamicStructure);
+ void sceneQueryBuildStep(PruningIndex::Enum index);
DynamicBoundsSync& getDynamicBoundsSync() { return mDynamicBoundsSync; }
+ bool prepareSceneQueriesUpdate(PruningIndex::Enum index);
+
// Force a rebuild of the aabb/loose octree etc to allow raycasting on multiple threads.
- void processSimUpdates();
void validateSimUpdates();
- void afterSync(bool commit);
+ void afterSync(PxSceneQueryUpdateMode::Enum updateMode);
void shiftOrigin(const PxVec3& shift);
void flushMemory();
@@ -170,7 +172,10 @@ namespace Sq
DynamicBoundsSync mDynamicBoundsSync;
+ volatile bool mPrunerNeedsUpdating;
+
void flushShapes();
+
};
///////////////////////////////////////////////////////////////////////////////