Gather and create snapshots contact points
| 470 | |
| 471 | // Gather and create snapshots contact points |
| 472 | void SceneDemo::updateSnapshotContactPoints() { |
| 473 | |
| 474 | // Remove the previous contact points |
| 475 | removeAllVisualContactPoints(); |
| 476 | |
| 477 | // For each contact point |
| 478 | std::vector<SceneContactPoint>::const_iterator it; |
| 479 | for (it = mSnapshotsContactPoints.begin(); it != mSnapshotsContactPoints.end(); ++it) { |
| 480 | |
| 481 | // Create a visual contact point for rendering |
| 482 | VisualContactPoint* point = new VisualContactPoint(it->point, it->point + it->normal, it->color); |
| 483 | mVisualContactPoints.push_back(point); |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | // Render the contact points |
| 488 | void SceneDemo::renderSnapshotsContactPoints(openglframework::Shader& /*shader*/, const openglframework::Matrix4& worldToCameraMatrix) { |