| 592 | } |
| 593 | |
| 594 | void Renderer::DrawCarRaycasts() { |
| 595 | glm::vec3 carBodyPosition = car->car_body_model.position; |
| 596 | |
| 597 | physicsEngine.mydebugdrawer.drawLine(Utils::glmToBullet(carBodyPosition), |
| 598 | Utils::glmToBullet(car->forwardCastPosition), |
| 599 | btVector3(2.0f * (1.0f - car->forwardDistance), |
| 600 | 2.0f * (car->forwardDistance), 0)); |
| 601 | physicsEngine.mydebugdrawer.drawLine(Utils::glmToBullet(carBodyPosition), |
| 602 | Utils::glmToBullet(car->upCastPosition), |
| 603 | btVector3(2.0f * (1.0f - car->upDistance), 2.0f * (car->upDistance), |
| 604 | 0)); |
| 605 | physicsEngine.mydebugdrawer.drawLine(Utils::glmToBullet(carBodyPosition), |
| 606 | Utils::glmToBullet(car->rightCastPosition), |
| 607 | btVector3(2.0f * (1.0f - car->rightDistance), |
| 608 | 2.0f * (car->rightDistance), 0)); |
| 609 | physicsEngine.mydebugdrawer.drawLine(Utils::glmToBullet(carBodyPosition), |
| 610 | Utils::glmToBullet(car->leftCastPosition), |
| 611 | btVector3(2.0f * (1.0f - car->leftDistance), |
| 612 | 2.0f * (car->leftDistance), 0)); |
| 613 | } |
| 614 | |
| 615 | void Renderer::DrawVroad() { |
| 616 | if (track->tag == NFS_3 || track->tag == NFS_4) { |
nothing calls this directly
no test coverage detected