Welcome, Guest. Please login or register.

Author Topic: Raytracer Math Question  (Read 1456 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JetRacerTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 501
    • Show all replies
Raytracer Math Question
« on: November 16, 2003, 12:00:17 PM »
When a raytracer inside/outside (object) test is performed, a positive or negative float is returned, right?

Is this float the exact distance between the surface and the ray?
*Zap! Zap!* Ha! Take that! *Kabooom!* Hey, that\'s not fair!
 

Offline JetRacerTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 501
    • Show all replies
Re: Raytracer Math Question
« Reply #1 on: November 16, 2003, 12:41:51 PM »
Sorry, I should have been more specific.

In the case of a native object, I shoot a ray and give it's coordinates (as distance equals object distance from camera) to the native formula which then return a float. This float is positive if the ray miss, or negative if ray hits.

Is this float reflecting distance; ray vs surface?

*Zap! Zap!* Ha! Take that! *Kabooom!* Hey, that\'s not fair!