summaryrefslogtreecommitdiffstats
path: root/libdimension/raytrace.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-11-19 02:34:22 -0500
committerTavian Barnes <tavianator@gmail.com>2009-11-19 02:34:22 -0500
commit4dcb998baf07243838afcb4e202b7fd89399972e (patch)
treed4cbde7810ed2042ab4f8ef70024184f3511f5fb /libdimension/raytrace.c
parent4c55801feb15617888472def76ca4d1a60b3a107 (diff)
downloaddimension-4dcb998baf07243838afcb4e202b7fd89399972e.tar.xz
Use dmnsn_new_*() rather than dmnsn_*_construct().
Diffstat (limited to 'libdimension/raytrace.c')
-rw-r--r--libdimension/raytrace.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c
index 143c2bc..b37dff3 100644
--- a/libdimension/raytrace.c
+++ b/libdimension/raytrace.c
@@ -261,7 +261,7 @@ dmnsn_raytrace_scene_impl(dmnsn_progress *progress, dmnsn_scene *scene,
static dmnsn_line
dmnsn_line_add_epsilon(dmnsn_line l)
{
- return dmnsn_line_construct(
+ return dmnsn_new_line(
dmnsn_vector_add(
l.x0,
dmnsn_vector_mul(1.0e-9, l.n)
@@ -306,10 +306,7 @@ dmnsn_raytrace_light_ray(dmnsn_intersection *intersection, dmnsn_scene *scene,
*color = dmnsn_black;
dmnsn_vector x0 = dmnsn_line_point(intersection->ray, intersection->t);
- dmnsn_line shadow_ray = dmnsn_line_construct(
- x0,
- dmnsn_vector_sub(light->x0, x0)
- );
+ dmnsn_line shadow_ray = dmnsn_new_line(x0, dmnsn_vector_sub(light->x0, x0));
/* Add epsilon to avoid hitting ourselves with the shadow ray */
shadow_ray = dmnsn_line_add_epsilon(shadow_ray);
@@ -439,7 +436,7 @@ dmnsn_raytrace_shoot(dmnsn_line ray, dmnsn_scene *scene,
trans.filter = 0.0;
trans.trans = 0.0;
- dmnsn_line trans_ray = dmnsn_line_construct(
+ dmnsn_line trans_ray = dmnsn_new_line(
dmnsn_line_point(ray, intersection->t),
ray.n
);