MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / setupMBP

Function setupMBP

deps/physx/physx/samples/samplebase/PhysXSample.cpp:794–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792#ifdef USE_MBP
793
794static void setupMBP(PxScene& scene)
795{
796 const float range = 1000.0f;
797 const PxU32 subdiv = 4;
798// const PxU32 subdiv = 1;
799// const PxU32 subdiv = 2;
800// const PxU32 subdiv = 8;
801
802 const PxVec3 min(-range);
803 const PxVec3 max(range);
804 const PxBounds3 globalBounds(min, max);
805
806 PxBounds3 bounds[256];
807 const PxU32 nbRegions = PxBroadPhaseExt::createRegionsFromWorldBounds(bounds, globalBounds, subdiv);
808
809 for(PxU32 i=0;i<nbRegions;i++)
810 {
811 PxBroadPhaseRegion region;
812 region.bounds = bounds[i];
813 region.userData = (void*)i;
814 scene.addBroadPhaseRegion(region);
815 }
816}
817#endif
818
819

Callers 1

onInitMethod · 0.85

Calls 1

addBroadPhaseRegionMethod · 0.45

Tested by

no test coverage detected