MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / newMesh

Method newMesh

physx/samples/samplebridges/SampleBridges.cpp:365–376  ·  view source on GitHub ↗

PT: this is called from the RAW-loader when loading a scene. The default behavior in PhysXSampleApplication creates a physics and a graphics mesh for each exported object. We intercept the call here to disable the physics mesh for the "water plane".

Source from the content-addressed store, hash-verified

363// in PhysXSampleApplication creates a physics and a graphics mesh for each exported object. We
364// intercept the call here to disable the physics mesh for the "water plane".
365void SampleBridges::newMesh(const RAWMesh& data)
366{
367 if(data.mName && (Ps::strcmp(data.mName, "WaterPlane")==0 || Ps::strcmp(data.mName, "skyshape")==0))
368 {
369 // PT: create render mesh only (not physics) for the waterplane & skyboxes
370 createRenderMeshFromRawMesh(data);
371 if(Ps::strcmp(data.mName, "WaterPlane")==0)
372 mWaterY = data.mTransform.p.y;
373 return;
374 }
375 PhysXSample::newMesh(data);
376}
377
378// PT: this is a callback from the RAW-loader, used to import a new shape. We use
379// simple segment shapes in the MAX scene to define where our bridges should be.

Callers

nothing calls this directly

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected