14 #ifndef PX_PHYSICS_NX_SCENE
15 #define PX_PHYSICS_NX_SCENE
27 #if PX_USE_PARTICLE_SYSTEM_API
82 : dominance0(a), dominance1(b) {}
106 eRIGID_STATIC = (1 << 0),
112 eRIGID_DYNAMIC = (1 << 1),
114 #if PX_USE_PARTICLE_SYSTEM_API
119 ePARTICLE_SYSTEM = (1 << 2),
125 ePARTICLE_FLUID = (1 << 3),
188 #define PxSceneQueryCache PxQueryCache // PX_DEPRECATED
225 virtual void release() = 0;
280 virtual PxU32 getTimestamp()
const = 0;
312 virtual void removeArticulation(
PxArticulation& articulation,
bool wakeOnLostTouch =
true) = 0;
329 virtual void addActor(
PxActor& actor) = 0;
349 virtual void addActors(
PxActor*
const* actors,
PxU32 nbActors) = 0;
368 virtual void removeActor(
PxActor& actor,
bool wakeOnLostTouch =
true) = 0;
385 virtual void removeActors(
PxActor*
const* actors,
PxU32 nbActors,
bool wakeOnLostTouch =
true) = 0;
399 virtual void addAggregate(
PxAggregate& aggregate) = 0;
413 virtual void removeAggregate(
PxAggregate& aggregate,
bool wakeOnLostTouch =
true) = 0;
427 virtual void addCollection(
const PxCollection& collection) = 0;
485 virtual PxU32 getNbArticulations()
const = 0;
506 virtual PxU32 getNbConstraints()
const = 0;
528 virtual PxU32 getNbAggregates()
const = 0;
599 virtual void setDominanceGroupPair(
701 virtual void setClothInterCollisionDistance(
PxF32 distance) = 0;
707 virtual PxF32 getClothInterCollisionDistance()
const = 0;
717 virtual void setClothInterCollisionStiffness(
PxF32 stiffness) = 0;
722 virtual PxF32 getClothInterCollisionStiffness()
const = 0;
732 virtual void setClothInterCollisionNbIterations(
PxU32 nbIterations) = 0;
737 virtual PxU32 getClothInterCollisionNbIterations()
const = 0;
740 #endif // PX_USE_CLOTH_API
803 getContactModifyCallback()
const = 0;
813 getCCDContactModifyCallback()
const = 0;
858 virtual const void* getFilterShaderData()
const = 0;
867 virtual PxU32 getFilterShaderDataSize()
const = 0;
877 getFilterShader()
const = 0;
887 getFilterCallback()
const = 0;
918 virtual void resetFiltering(
PxActor& actor) = 0;
973 virtual void simulate(
PxReal elapsedTime, physx::PxBaseTask* completionTask =
NULL,
974 void* scratchMemBlock = 0,
PxU32 scratchMemBlockSize = 0,
bool controlSimulation =
true) = 0;
982 virtual void solve(
PxReal elapsedTime, physx::PxBaseTask* completionTask = 0,
void* scratchMemBlock = 0,
983 PxU32 scratchMemBlockSize = 0,
bool controlSimulation =
true) = 0;
990 virtual void collide(
PxReal elapsedTime, physx::PxBaseTask* completionTask = 0,
void* scratchMemBlock = 0,
991 PxU32 scratchMemBlockSize = 0) = 0;
1004 virtual bool checkResults(
bool block =
false) = 0;
1027 virtual bool fetchResults(
bool block =
false,
PxU32* errorState = 0) = 0;
1033 PX_DEPRECATED virtual void flush(
bool sendPendingReports =
false) = 0;
1045 virtual void flushSimulation(
bool sendPendingReports =
false) = 0;
1056 virtual void setGravity(
const PxVec3& vec) = 0;
1065 virtual PxVec3 getGravity()
const = 0;
1072 virtual void setBounceThresholdVelocity(
const PxReal t) = 0;
1079 virtual PxReal getBounceThresholdVelocity()
const = 0;
1090 virtual void setCCDMaxPasses(
PxU32 ccdMaxPasses) = 0;
1100 virtual PxU32 getCCDMaxPasses()
const = 0;
1107 virtual PxReal getContactCorrelationDistance()
const = 0;
1114 virtual PxReal getFrictionOffsetThreshold()
const = 0;
1172 virtual void setVisualizationCullingBox(
const PxBounds3&
box) = 0;
1180 virtual const PxBounds3& getVisualizationCullingBox()
const = 0;
1241 virtual void flushQueryUpdates() = 0;
1268 virtual void setDynamicTreeRebuildRateHint(
PxU32 dynamicTreeRebuildRateHint) = 0;
1277 virtual PxU32 getDynamicTreeRebuildRateHint()
const = 0;
1287 virtual void forceDynamicTreeRebuild(
bool rebuildStaticStructure,
bool rebuildDynamicStructure) = 0;
1311 virtual bool raycast(
1385 fdAny.clientId = queryClient;
1387 raycast(origin, unitDir, distance, buf, PxHitFlags(), fdAny, filterCall, cache);
1402 raycast(origin, unitDir, distance, buf, outputFlags, fd1, filterCall, cache);
1418 raycast(origin, unitDir, distance, buf, outputFlags, fd1, filterCall, cache);
1429 hitBuffer[hitBufferSize-1] = buf.
block;
1446 const PxReal inflation = 0.f)
1450 fdAny.clientId = queryClient;
1452 sweep(geometry, pose, unitDir, distance,
1453 buf, queryFlags, fdAny, filterCall, cache, inflation);
1470 sweep(geometry, pose, unitDir, distance, buf,
1471 outputFlags, fd1, filterCall, cache, inflation);
1487 geometry, pose, unitDir, distance, buf, outputFlags, fd1, filterCall,
1499 hitBuffer[hitBufferSize-1] = buf.
block;
1518 overlap(geometry, pose, buf, fd1, filterCall);
1528 hitBuffer[hitBufferSize-1] = buf.
block;
1546 fdAny.clientId = queryClient;
1548 overlap(geometry, pose, buf, fdAny, filterCall);
1559 virtual PxU32 getSceneQueryStaticTimestamp()
const = 0;
1587 virtual PxU32 getNbBroadPhaseRegions()
const = 0;
1630 virtual bool removeBroadPhaseRegion(
PxU32 handle) = 0;
1645 virtual physx::PxTaskManager* getTaskManager()
const = 0;
1666 virtual void lockRead(
const char* file=
NULL,
PxU32 line=0) = 0;
1673 virtual void unlockRead() = 0;
1700 virtual void lockWrite(
const char* file=
NULL,
PxU32 line=0) = 0;
1707 virtual void unlockWrite() = 0;
1723 virtual void setNbContactDataBlocks(
PxU32 numBlocks) = 0;
1735 virtual PxU32 getNbContactDataBlocksUsed()
const = 0;
1746 virtual PxU32 getMaxNbContactDataBlocksUsed()
const = 0;
1754 virtual PxU32 getContactReportStreamBufferSize()
const = 0;
1766 virtual void setSolverBatchSize(
PxU32 solverBatchSize) = 0;
1777 virtual PxU32 getSolverBatchSize()
const = 0;
1789 virtual PxReal getWakeCounterResetValue()
const = 0;
1807 virtual void shiftOrigin(
const PxVec3& shift) = 0;