diff --git a/Engine.cc b/Engine.cc index 118e131..fbeabd9 100644 --- a/Engine.cc +++ b/Engine.cc @@ -652,23 +652,16 @@ refptr< vector > Engine::pickObjects(int x, int y) initial_direction[0] = x - m_video.getWidth() / 2; initial_direction[1] = m_screen_dist; initial_direction[2] = m_video.getHeight() / 2 - y; - //dMultiply0(rotated_direction, initial_direction, r, 1, 3, 3); dMultiply0(rotated_direction, r, initial_direction, 3, 3, 1); - normalize(rotated_direction); - /* TODO: finish */ - refptr< vector > args = new vector(); - args->push_back(0.5); - for (float d = 3.0; d < 10.0; d += 2.0) - { - int o = addObject(false, false, OdeWorld::SPHERE, args); - m_objects[o]->setPosition( - m_eye[0] + d * rotated_direction[0], - m_eye[1] + d * rotated_direction[1], - m_eye[2] + d * rotated_direction[2]); - } - return new vector(); + refptr< vector > objects = + m_world.pickObjects(m_eye[0], m_eye[1], m_eye[2], + rotated_direction[0], rotated_direction[1], rotated_direction[2]); + + refptr< vector > ret = new vector(); + /* TODO: finish */ + return ret; } void Engine::debug_hook(lua_Debug * debug)