X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Fview.cpp;h=673daef0c5ca4d7e2443ffeb9f127bfab451ea52;hb=a882f35842c819e011c5fdf6104852c2b6ab3eef;hp=5779616f6ce88ea2b82da9982298e169fca79777;hpb=77db8741430ca462e3b624dd42d5ead96be7f264;p=r2c2.git diff --git a/source/3d/view.cpp b/source/3d/view.cpp index 5779616..673daef 100644 --- a/source/3d/view.cpp +++ b/source/3d/view.cpp @@ -36,12 +36,12 @@ View3D::View3D(Layout3D &l, unsigned w, unsigned h): view_all(); } -Ray View3D::create_ray(int x, int y) +Ray View3D::create_ray(int x, int y) const { return create_ray(x*2.0f/width-1.0f, y*2.0f/height-1.0f); } -Ray View3D::create_ray(float x, float y) +Ray View3D::create_ray(float x, float y) const { const GL::Vector3 &start = camera.get_position(); GL::Vector4 ray = camera.unproject(GL::Vector4(x, y, 0, 0));