MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / DrawCarRaycasts

Method DrawCarRaycasts

src/Renderer/Renderer.cpp:594–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592}
593
594void 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
615void Renderer::DrawVroad() {
616 if (track->tag == NFS_3 || track->tag == NFS_4) {

Callers

nothing calls this directly

Calls 2

glmToBulletFunction · 0.85
drawLineMethod · 0.80

Tested by

no test coverage detected