]> Dogcows Code - chaz/rasterize/blobdiff - light.hh
basic ray tracing with hard shadows
[chaz/rasterize] / light.hh
index 2ab9c6aaa50f1cf977bfff570a59d1aa6233c409..4f1961e945387d981d763d31db2bf0a39433f5ba 100644 (file)
--- a/light.hh
+++ b/light.hh
@@ -19,7 +19,6 @@ struct light
 {
     vec_t   v;  // position
     color_t d;  // diffuse
-    color_t s;  // specular
 };
 typedef struct light light_t;
 
@@ -27,11 +26,10 @@ typedef struct light light_t;
  * Initialize a light with a position and color.
  */
 INLINE_MAYBE
-void light_init(light_t* l, vec_t position, color_t diffuse, color_t specular)
+void light_init(light_t* l, vec_t position, color_t diffuse)
 {
     l->v = position;
     l->d = diffuse;
-    l->s = specular;
 }
 
 
@@ -39,10 +37,10 @@ void light_init(light_t* l, vec_t position, color_t diffuse, color_t specular)
  * Create a new light with a position and color.
  */
 INLINE_MAYBE
-light_t light_new(vec_t position, color_t diffuse, color_t specular)
+light_t light_new(vec_t position, color_t diffuse)
 {
     light_t l;
-    light_init(&l, position, diffuse, specular);
+    light_init(&l, position, diffuse);
     return l;
 }
 
@@ -51,10 +49,10 @@ light_t light_new(vec_t position, color_t diffuse, color_t specular)
  * Create a new light on the heap.
  */
 INLINE_MAYBE
-light_t* light_alloc(vec_t position, color_t diffuse, color_t specular)
+light_t* light_alloc(vec_t position, color_t diffuse)
 {
     light_t* l = (light_t*)mem_alloc(sizeof(light_t));
-    light_init(l, position, diffuse, specular);
+    light_init(l, position, diffuse);
     return l;
 }
 
This page took 0.02356 seconds and 4 git commands to generate.