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".
| 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". |
| 365 | void 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. |