@@ -172,24 +172,24 @@ void mouseMove(int x, int y)
172172
173173void selection (const Eigen::Vector2i &start, const Eigen::Vector2i &end)
174174{
175- std::vector<unsigned int > hits;
176- selectedBodies.clear ();
175+ std::vector<unsigned int > hits;
176+ selectedBodies.clear ();
177177
178178 SimulationModel::RigidBodyVector &rb = model.getRigidBodies ();
179179 std::vector<Vector3r, Eigen::aligned_allocator<Vector3r> > x;
180180 x.resize (rb.size ());
181- for (unsigned int i = 0 ; i < rb.size (); i++)
182- {
181+ for (unsigned int i = 0 ; i < rb.size (); i++)
182+ {
183183 x[i] = rb[i]->getPosition ();
184- }
184+ }
185185
186- Selection::selectRect (start, end, &x[0 ], &x[rb.size () - 1 ], selectedBodies);
187- if (selectedBodies.size () > 0 )
188- MiniGL::setMouseMoveFunc (GLUT_MIDDLE_BUTTON, mouseMove);
189- else
190- MiniGL::setMouseMoveFunc (-1 , NULL );
186+ Selection::selectRect (start, end, &x[0 ], &x[rb.size () - 1 ], selectedBodies);
187+ if (selectedBodies.size () > 0 )
188+ MiniGL::setMouseMoveFunc (GLUT_MIDDLE_BUTTON, mouseMove);
189+ else
190+ MiniGL::setMouseMoveFunc (-1 , NULL );
191191
192- MiniGL::unproject (end[0 ], end[1 ], oldMousePos);
192+ MiniGL::unproject (end[0 ], end[1 ], oldMousePos);
193193}
194194
195195void timeStep ()
@@ -356,27 +356,27 @@ void createBodyModel()
356356 SimulationModel::RigidBodyVector &rb = model.getRigidBodies ();
357357 SimulationModel::ConstraintVector &constraints = model.getConstraints ();
358358
359- string fileNameBox = dataPath + " /models/cube.obj" ;
359+ string fileNameBox = Utilities::normalizePath ( dataPath + " /models/cube.obj" ) ;
360360 IndexedFaceMesh meshBox;
361361 VertexData vdBox;
362362 OBJLoader::loadObj (fileNameBox, vdBox, meshBox);
363363
364- string fileNameCylinder = dataPath + " /models/cylinder.obj" ;
364+ string fileNameCylinder = Utilities::normalizePath ( dataPath + " /models/cylinder.obj" ) ;
365365 IndexedFaceMesh meshCylinder;
366366 VertexData vdCylinder;
367367 OBJLoader::loadObj (fileNameCylinder, vdCylinder, meshCylinder);
368368
369- string fileNameTorus = dataPath + " /models/torus.obj" ;
369+ string fileNameTorus = Utilities::normalizePath ( dataPath + " /models/torus.obj" ) ;
370370 IndexedFaceMesh meshTorus;
371371 VertexData vdTorus;
372372 OBJLoader::loadObj (fileNameTorus, vdTorus, meshTorus);
373373
374- string fileNameCube = dataPath + " /models/cube_5.obj" ;
374+ string fileNameCube = Utilities::normalizePath ( dataPath + " /models/cube_5.obj" ) ;
375375 IndexedFaceMesh meshCube;
376376 VertexData vdCube;
377377 OBJLoader::loadObj (fileNameCube, vdCube, meshCube);
378378
379- string fileNameSphere = dataPath + " /models/sphere.obj" ;
379+ string fileNameSphere = Utilities::normalizePath ( dataPath + " /models/sphere.obj" ) ;
380380 IndexedFaceMesh meshSphere;
381381 VertexData vdSphere;
382382 OBJLoader::loadObj (fileNameSphere, vdSphere, meshSphere);
0 commit comments