made nearest_object_intersecting_ray return the hit location and the normal at the...
commitabdccc5e9cef9833e7fbd4512c6db5da640a0f40
authorplouj <plouj@b8c14938-b733-429d-887c-d66ed1f8cd15>
Fri, 11 Jan 2008 03:35:40 +0000 (11 03:35 +0000)
committerplouj <plouj@b8c14938-b733-429d-887c-d66ed1f8cd15>
Fri, 11 Jan 2008 03:35:40 +0000 (11 03:35 +0000)
tree3141152c29052144212e47796875ac19650277f9
parent2e564ad9e61e4f5cda850aa7b51c109d1b81d8c5
made nearest_object_intersecting_ray return the hit location and the normal at the hit location
made lighting_function return the colour of objects plus diffuse contribution of any point lights in the scene (not completely correct - returns colours without any lights present)
fixed point_light_intensity to return only positive values
added an object_normal_at_point function (for spheres only ATM)
fixed the shoot_ray function to return a normalized vector
wrote a point_on_sphere function
changed the location of the point light in the default scene
updated the scene test
added an object_normal_at_point_test
updated the nearest_object_intersecting_ray_test to check the returned normal and hitlocation

git-svn-id: http://svn.plouj.com/repos/eraytracer@20 b8c14938-b733-429d-887c-d66ed1f8cd15
raytracer.erl