MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / updateSnapshotContactPoints

Method updateSnapshotContactPoints

testbed/src/SceneDemo.cpp:472–485  ·  view source on GitHub ↗

Gather and create snapshots contact points

Source from the content-addressed store, hash-verified

470
471// Gather and create snapshots contact points
472void 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
488void SceneDemo::renderSnapshotsContactPoints(openglframework::Shader& /*shader*/, const openglframework::Matrix4& worldToCameraMatrix) {

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected