Fix display of contact points in ray casting scene of the testbed application

This commit is contained in:
Daniel Chappuis 2019-06-27 07:24:35 +02:00
parent 112253cb81
commit 29a0e03a13
2 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ using namespace raycastscene;
// Constructor // Constructor
RaycastScene::RaycastScene(const std::string& name, EngineSettings& settings) RaycastScene::RaycastScene(const std::string& name, EngineSettings& settings)
: SceneDemo(name, settings, SCENE_RADIUS, false), mMeshFolderPath("meshes/"), : SceneDemo(name, settings, SCENE_RADIUS, false), mMeshFolderPath("meshes/"),
mRaycastManager(mPhongShader, mMeshFolderPath), mCurrentBodyIndex(-1), mRaycastManager(mPhongShader, mMeshFolderPath, mContactPoints), mCurrentBodyIndex(-1),
mAreNormalsDisplayed(false), mVBOVertices(GL_ARRAY_BUFFER) { mAreNormalsDisplayed(false), mVBOVertices(GL_ARRAY_BUFFER) {
mIsContactPointsDisplayed = true; mIsContactPointsDisplayed = true;

View File

@ -64,17 +64,17 @@ class RaycastManager : public rp3d::RaycastCallback {
private: private:
/// All the visual contact points /// Reference to the list of contact points of the scene
std::vector<SceneContactPoint> mHitPoints; std::vector<SceneContactPoint>& mHitPoints;
/// Contact point mesh folder path /// Contact point mesh folder path
std::string mMeshFolderPath; std::string mMeshFolderPath;
public: public:
RaycastManager(openglframework::Shader& shader, RaycastManager(openglframework::Shader& shader, const std::string& meshFolderPath,
const std::string& meshFolderPath) std::vector<SceneContactPoint>& hitPoints)
: mMeshFolderPath(meshFolderPath) { : mMeshFolderPath(meshFolderPath), mHitPoints(hitPoints) {
} }