diff options
Diffstat (limited to 'libdimension/objects.c')
-rw-r--r-- | libdimension/objects.c | 20 |
1 files changed, 10 insertions, 10 deletions
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)); } } |