aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/SimulationController/include
diff options
context:
space:
mode:
authorsschirm <[email protected]>2016-12-23 14:20:36 +0100
committersschirm <[email protected]>2016-12-23 14:56:17 +0100
commitef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch)
tree710426e8daa605551ce3f34b581897011101c30f /PhysX_3.4/Source/SimulationController/include
parentInitial commit: (diff)
downloadphysx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz
physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'PhysX_3.4/Source/SimulationController/include')
-rw-r--r--PhysX_3.4/Source/SimulationController/include/ScIterators.h23
-rw-r--r--PhysX_3.4/Source/SimulationController/include/ScScene.h44
2 files changed, 22 insertions, 45 deletions
diff --git a/PhysX_3.4/Source/SimulationController/include/ScIterators.h b/PhysX_3.4/Source/SimulationController/include/ScIterators.h
index 89b67ebc..c5c2f350 100644
--- a/PhysX_3.4/Source/SimulationController/include/ScIterators.h
+++ b/PhysX_3.4/Source/SimulationController/include/ScIterators.h
@@ -36,37 +36,14 @@
namespace physx
{
-
class PxShape;
-class PxRigidBody;
class PxsContactManagerOutputIterator;
-namespace Sq
-{
- typedef size_t PrunerData;
-}
-
namespace Sc
{
class ShapeSim;
class Interaction;
-
- struct SqBoundsSync
- {
- virtual void sync(const PxU32* sqRefs, const PxU32* indices, const PxBounds3* bounds, PxU32 count) = 0;
-
- virtual ~SqBoundsSync() {}
- };
-
- struct SqRefFinder
- {
- virtual PxU32 find(const PxRigidBody * body, const PxShape* shape) = 0;
-
- virtual ~SqRefFinder() {}
- };
-
-
struct Contact
{
Contact()
diff --git a/PhysX_3.4/Source/SimulationController/include/ScScene.h b/PhysX_3.4/Source/SimulationController/include/ScScene.h
index 4e80a610..6399fa1f 100644
--- a/PhysX_3.4/Source/SimulationController/include/ScScene.h
+++ b/PhysX_3.4/Source/SimulationController/include/ScScene.h
@@ -50,14 +50,8 @@
#include "PxvManager.h"
#include "ScBodyCore.h"
-#define EXTRA_PROFILING 0
#define PX_MAX_DOMINANCE_GROUP 32
-
-#if EXTRA_PROFILING
-#include <cstdio>
-#endif
-
class OverlapFilterTask;
namespace physx
@@ -102,6 +96,10 @@ namespace Bp
class BoundsArray;
}
+namespace Sq
+{
+ typedef PxU32 PrunerHandle; // PT: we should get this from SqPruner.h but it cannot be included from here
+}
namespace Dy
{
@@ -184,7 +182,6 @@ namespace Sc
Ps::InlineArray<const Sc::ShapeCore*, 64> removedShapes;
};
-
struct InteractionType
{
enum Enum
@@ -203,7 +200,6 @@ namespace Sc
};
};
-
struct SceneInternalFlag
{
enum Enum
@@ -214,7 +210,6 @@ namespace Sc
};
};
-
struct SimulationStage
{
enum Enum
@@ -227,7 +222,21 @@ namespace Sc
};
};
+ // PT: TODO: revisit the need for a virtual interface
+ struct SqBoundsSync
+ {
+ virtual void sync(const Sq::PrunerHandle* handles, const PxU32* indices, const PxBounds3* bounds, PxU32 count) = 0;
+
+ virtual ~SqBoundsSync() {}
+ };
+
+ // PT: TODO: revisit the need for a virtual interface
+ struct SqRefFinder
+ {
+ virtual Sq::PrunerHandle find(const PxRigidBody* body, const PxShape* shape) = 0;
+ virtual ~SqRefFinder() {}
+ };
class Scene : public Ps::UserAllocated
{
@@ -379,14 +388,13 @@ namespace Sc
void postReportsCleanup();
void fireCallbacksPostSync();
void syncSceneQueryBounds(SqBoundsSync& sync, SqRefFinder& finder);
- PxU32 getErrorState();
PxU32 getDefaultContactReportStreamBufferSize() const;
PxReal getFrictionOffsetThreshold() const;
- void setLimits(const PxSceneLimits& limits);
- const PxSceneLimits& getLimits() const;
+ PX_FORCE_INLINE void setLimits(const PxSceneLimits& limits) { mLimits = limits; }
+ PX_FORCE_INLINE const PxSceneLimits& getLimits() const { return mLimits; }
void visualizeStartStep();
void visualizeEndStep();
@@ -536,7 +544,8 @@ namespace Sc
void onBodyWakeUp(BodySim* body);
void onBodySleep(BodySim* body);
- bool isValid() const;
+ PX_FORCE_INLINE bool isValid() const { return (mLLContext != NULL); }
+
void addToLostTouchList(BodySim* body1, BodySim* body2);
@@ -886,8 +895,6 @@ namespace Sc
Cm::BitMap mDirtyShapeSimMap;
- PxU32 mErrorState;
-
PxU32 mDominanceBitMatrix[PX_MAX_DOMINANCE_GROUP];
PxReal mVisualizationScale; // Redundant but makes checks whether debug visualization is enabled faster
@@ -901,13 +908,6 @@ namespace Sc
PxU32 mNumDeactivatingNodes[2];
-#if EXTRA_PROFILING
- private:
- FILE* mExtraProfileFile;
- PxU32 mLineNum;
-#endif
-
-
// task decomposition
void preBroadPhase(PxBaseTask* continuation);
void broadPhase(PxBaseTask* continuation);