Fix display of contact points in ray casting scene of the testbed application
This commit is contained in:
parent
112253cb81
commit
29a0e03a13
|
@ -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;
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user