| 495 | } |
| 496 | |
| 497 | void Dof6ConstraintTutorial::stepSimulation(float deltaTime) |
| 498 | { |
| 499 | //animate(); |
| 500 | |
| 501 | //float time = m_data->m_timeSeriesCanvas->getCurrentTime(); |
| 502 | |
| 503 | float prevPos = m_data->m_TranslateSpringBody->getWorldTransform().getOrigin().x(); |
| 504 | m_dynamicsWorld->stepSimulation(deltaTime); |
| 505 | float xPos = m_data->m_TranslateSpringBody->getWorldTransform().getOrigin().x(); |
| 506 | |
| 507 | m_data->m_timeSeriesCanvas->insertDataAtCurrentTime(xPos, 0, true); |
| 508 | m_data->m_timeSeriesCanvas->insertDataAtCurrentTime(m_data->m_TranslateSpringBody->getLinearVelocity().x(), 1, true); |
| 509 | |
| 510 | if (deltaTime > 0) |
| 511 | { |
| 512 | m_data->m_timeSeriesCanvas->insertDataAtCurrentTime((xPos - prevPos) / deltaTime, 2, true); |
| 513 | } |
| 514 | prevPos = xPos; |
| 515 | m_data->m_timeSeriesCanvas->nextTick(); |
| 516 | } |
| 517 | |
| 518 | class CommonExampleInterface* Dof6ConstraintTutorialCreateFunc(CommonExampleOptions& options) |
| 519 | { |
nothing calls this directly
no test coverage detected