| 391 | /////////////////////////////////////////////////////////////////////////////// |
| 392 | |
| 393 | void SampleVehicle::onInit() |
| 394 | { |
| 395 | mNbThreads = PxMax(PxI32(shdfnd::Thread::getNbPhysicalCores())-1, 0); |
| 396 | |
| 397 | PhysXSample::onInit(); |
| 398 | |
| 399 | PxSceneWriteLock scopedLock(*mScene); |
| 400 | |
| 401 | #if defined(SERIALIZE_VEHICLE_BINARY) |
| 402 | mMemory = NULL; |
| 403 | #endif |
| 404 | |
| 405 | //Create physx objects. |
| 406 | createStandardMaterials(); |
| 407 | createVehicles(); |
| 408 | createTrack(mTerrainSize, mTerrainWidth, mTerrainSize*4.0f); |
| 409 | createObstacles(); |
| 410 | |
| 411 | //Setup camera. |
| 412 | setCameraController(NULL); |
| 413 | |
| 414 | //Setup debug render data. |
| 415 | setupTelemetryData(); |
| 416 | |
| 417 | //Setup the waypoint system. |
| 418 | mWayPoints.setWayPoints(gWayPoints,gNumWayPoints); |
| 419 | |
| 420 | //Load the skydome. |
| 421 | gLoadType = LOAD_TYPE_SKYDOME; |
| 422 | importRAWFile("sky_mission_race1.raw", 1.0f); |
| 423 | |
| 424 | //Set up the fog. |
| 425 | getRenderer()->setFog(SampleRenderer::RendererColor(40,40,40), 225.0f); |
| 426 | } |
| 427 | |
| 428 | void SampleVehicle::newMesh(const RAWMesh& data) |
| 429 | { |
nothing calls this directly
no test coverage detected