Skip to content

Commit

Permalink
check other ray_at_cursor methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Jun 12, 2023
1 parent fc4fcd5 commit a26e6a1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/interaction/position_on_plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,17 @@ function ray_at_cursor(scene::Scene, cam::Camera3D)
end
end

function ray_at_cursor(scene::Scene, ::Camera2D)
@info "TODO verify"
function ray_at_cursor(scene::Scene, cam::Camera2D)
rel_pos = mouseposition_px(scene) ./ widths(scene.px_area[])
origin = minimum(cam.area[]) .+ rel_pos .* widths(cam.area[])
return Ray(to_ndim(Point3f, origin, 10_000f0), Vec3f(0,0,-1))
end

function ray_at_cursor(scene::Scene, ::PixelCamera)
@info "TODO verify"
return Ray(to_ndim(Point3f, mouseposition_px(scene), 10_000f0), Vec3f(0,0,-1))
end

function ray_at_cursor(scene::Scene, ::RelativeCamera)
@info "TODO verify"
origin = mouseposition_px(scene) ./ widths(scene.px_area[])
return Ray(to_ndim(Point3f, origin, 10_000f0), Vec3f(0,0,-1))
end
Expand Down

0 comments on commit a26e6a1

Please sign in to comment.