]>
Dogcows Code - chaz/rasterize/blob - light.hh
3 * CS5600 University of Utah
5 * mcgarvey@eng.utah.edu
23 typedef struct light light_t
;
26 * Initialize a light with a position and color.
29 void light_init(light_t
* l
, vec_t position
, color_t diffuse
)
37 * Create a new light with a position and color.
40 light_t
light_new(vec_t position
, color_t diffuse
)
43 light_init(&l
, position
, diffuse
);
49 * Create a new light on the heap.
52 light_t
* light_alloc(vec_t position
, color_t diffuse
)
54 light_t
* l
= (light_t
*)mem_alloc(sizeof(light_t
));
55 light_init(l
, position
, diffuse
);
60 light_t
* light_copy(light_t l
)
62 light_t
* n
= (light_t
*)mem_alloc(sizeof(light_t
));
63 memcpy(n
, &l
, sizeof(light_t
));
This page took 0.038947 seconds and 5 git commands to generate.