summaryrefslogtreecommitdiffstats
path: root/libdimension/objects.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/objects.c
parent4c55801feb15617888472def76ca4d1a60b3a107 (diff)
downloaddimension-4dcb998baf07243838afcb4e202b7fd89399972e.tar.xz
Use dmnsn_new_*() rather than dmnsn_*_construct().
Diffstat (limited to 'libdimension/objects.c')
-rw-r--r--libdimension/objects.c20
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));
}
}