Ray Casting

9 views
Skip to first unread message

Henan Zhao

unread,
Mar 24, 2017, 11:42:38 AM3/24/17
to omegalib
Hi,

How can we detect if the ray hit the objects in OmegaLib?
I think there is a "Hit" function for scenenode. But we are using OpenGL to implemented the renderpass, so we don't have a scenenode.
I tried to compute the intersection by myself, but I realized that if the head tracking will effect the location of rendered objects.

Can you please provide some suggestion please? Is there a function I can call directly?

Thanks,
Henan


Alessandro Febretti

unread,
Mar 24, 2017, 12:03:16 PM3/24/17
to omeg...@googlegroups.com
Given your 'pointer' ray you can compute its intersection with simple geometry using one of the omicron::Math::intersect functions

Sphere (if you want to use a  bounding sphere for your object) http://uic-evl.github.io/omegalib/reference/html/classomicron_1_1_sphere.html
Reply all
Reply to author
Forward
0 new messages