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
|
||||
RaycastScene::RaycastScene(const std::string& name, EngineSettings& settings)
|
||||
: 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) {
|
||||
|
||||
mIsContactPointsDisplayed = true;
|
||||
|
|
|
@ -64,17 +64,17 @@ class RaycastManager : public rp3d::RaycastCallback {
|
|||
|
||||
private:
|
||||
|
||||
/// All the visual contact points
|
||||
std::vector<SceneContactPoint> mHitPoints;
|
||||
/// Reference to the list of contact points of the scene
|
||||
std::vector<SceneContactPoint>& mHitPoints;
|
||||
|
||||
/// Contact point mesh folder path
|
||||
std::string mMeshFolderPath;
|
||||
|
||||
public:
|
||||
|
||||
RaycastManager(openglframework::Shader& shader,
|
||||
const std::string& meshFolderPath)
|
||||
: mMeshFolderPath(meshFolderPath) {
|
||||
RaycastManager(openglframework::Shader& shader, const std::string& meshFolderPath,
|
||||
std::vector<SceneContactPoint>& hitPoints)
|
||||
: mMeshFolderPath(meshFolderPath), mHitPoints(hitPoints) {
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user