From 4dcb998baf07243838afcb4e202b7fd89399972e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 19 Nov 2009 02:34:22 -0500 Subject: Use dmnsn_new_*() rather than dmnsn_*_construct(). --- libdimension/objects.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'libdimension/objects.c') diff --git a/libdimension/objects.c b/libdimension/objects.c index 845edfa..0a88561 100644 --- a/libdimension/objects.c +++ b/libdimension/objects.c @@ -42,8 +42,8 @@ dmnsn_new_sphere() if (sphere) { sphere->intersection_fn = &dmnsn_sphere_intersection_fn; sphere->inside_fn = &dmnsn_sphere_inside_fn; - sphere->min = dmnsn_vector_construct(-1.0, -1.0, -1.0); - sphere->max = dmnsn_vector_construct(1.0, 1.0, 1.0); + sphere->min = dmnsn_new_vector(-1.0, -1.0, -1.0); + sphere->max = dmnsn_new_vector(1.0, 1.0, 1.0); } return sphere; } @@ -108,8 +108,8 @@ dmnsn_new_cube() if (cube) { cube->intersection_fn = &dmnsn_cube_intersection_fn; cube->inside_fn = &dmnsn_cube_inside_fn; - cube->min = dmnsn_vector_construct(-1.0, -1.0, -1.0); - cube->max = dmnsn_vector_construct(1.0, 1.0, 1.0); + cube->min = dmnsn_new_vector(-1.0, -1.0, -1.0); + cube->max = dmnsn_new_vector(1.0, 1.0, 1.0); } return cube; } @@ -132,7 +132,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line) && t_temp >= 0.0 && (t < 0.0 || t_temp < t)) { t = t_temp; - normal = dmnsn_vector_construct(-copysign(line.n.x, 1.0), 0.0, 0.0); + normal = dmnsn_new_vector(-copysign(line.n.x, 1.0), 0.0, 0.0); } /* x = 1.0 */ @@ -142,7 +142,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line) && t_temp >= 0.0 && (t < 0.0 || t_temp < t)) { t = t_temp; - normal = dmnsn_vector_construct(-copysign(line.n.x, 1.0), 0.0, 0.0); + normal = dmnsn_new_vector(-copysign(line.n.x, 1.0), 0.0, 0.0); } } @@ -154,7 +154,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line) && t_temp >= 0.0 && (t < 0.0 || t_temp < t)) { t = t_temp; - normal = dmnsn_vector_construct(0.0, -copysign(line.n.y, 1.0), 0.0); + normal = dmnsn_new_vector(0.0, -copysign(line.n.y, 1.0), 0.0); } /* y = 1.0 */ @@ -164,7 +164,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line) && t_temp >= 0.0 && (t < 0.0 || t_temp < t)) { t = t_temp; - normal = dmnsn_vector_construct(0.0, -copysign(line.n.y, 1.0), 0.0); + normal = dmnsn_new_vector(0.0, -copysign(line.n.y, 1.0), 0.0); } } @@ -176,7 +176,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line) && t_temp >= 0.0 && (t < 0.0 || t_temp < t)) { t = t_temp; - normal = dmnsn_vector_construct(0.0, 0.0, -copysign(line.n.z, 1.0)); + normal = dmnsn_new_vector(0.0, 0.0, -copysign(line.n.z, 1.0)); } /* z = 1.0 */ @@ -186,7 +186,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line) && t_temp >= 0.0 && (t < 0.0 || t_temp < t)) { t = t_temp; - normal = dmnsn_vector_construct(0.0, 0.0, -copysign(line.n.z, 1.0)); + normal = dmnsn_new_vector(0.0, 0.0, -copysign(line.n.z, 1.0)); } } -- cgit v1.2.3