Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Sönke_P_
Beginner
74 Views

rtcIntesect with tfar and unnormalized diection vector?

Hi,

I'd have a very basic question on how to use RTCRay with rtcIntesect: am I required to provide a normalized direction vector?

And if I don't: how is the value of "tfar" interpreted?
Is the endpoint: ray.tfar * ray.dir?

I'm trying to use a direction vector with the full length between two points p1 and p2:
ray.dir = p2 - p1;
Can I set ray.tfar = 1 now, assuming that it will travel the whole distance from p1 up to point p2?

Thanks for clarifying this,
Sönke


 

0 Kudos
1 Reply
SvenW_Intel
Moderator
74 Views

The ray endpoint is always  ray.tfar * ray.dir. Thus in your example using tfar=1 will create a ray from p1 to p2.

Reply