summaryrefslogtreecommitdiffstats
path: root/libdimension/sphere.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-04-17 14:26:19 -0400
committerTavian Barnes <tavianator@gmail.com>2010-04-17 14:26:19 -0400
commitcd7cba285144211c5ea1f4573ad729555923dab1 (patch)
tree10f500a3c3fbbeba04778943fad36f97f6b2242f /libdimension/sphere.c
parentbafe01580d1470f703a95a434b38998843440cd0 (diff)
downloaddimension-cd7cba285144211c5ea1f4573ad729555923dab1.tar.xz
Rename dmnsn_matrix_*_mul() to dmnsn_transform_*().
Diffstat (limited to 'libdimension/sphere.c')
-rw-r--r--libdimension/sphere.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdimension/sphere.c b/libdimension/sphere.c
index 94ae44e..d384e60 100644
--- a/libdimension/sphere.c
+++ b/libdimension/sphere.c
@@ -50,7 +50,7 @@ static bool
dmnsn_sphere_intersection_fn(const dmnsn_object *sphere, dmnsn_line line,
dmnsn_intersection *intersection)
{
- dmnsn_line l = dmnsn_matrix_line_mul(sphere->trans_inv, line);
+ dmnsn_line l = dmnsn_transform_line(sphere->trans_inv, line);
/* Solve (x0 + nx*t)^2 + (y0 + ny*t)^2 + (z0 + nz*t)^2 == 1 */
double a, b, c, t;
@@ -67,8 +67,8 @@ dmnsn_sphere_intersection_fn(const dmnsn_object *sphere, dmnsn_line line,
if (t >= 0.0) {
intersection->ray = line;
intersection->t = t;
- intersection->normal = dmnsn_matrix_normal_mul(sphere->trans,
- dmnsn_line_point(l, t));
+ intersection->normal = dmnsn_transform_normal(sphere->trans,
+ dmnsn_line_point(l, t));
intersection->texture = sphere->texture;
intersection->interior = sphere->interior;
return true;
@@ -82,6 +82,6 @@ dmnsn_sphere_intersection_fn(const dmnsn_object *sphere, dmnsn_line line,
static bool
dmnsn_sphere_inside_fn(const dmnsn_object *sphere, dmnsn_vector point)
{
- point = dmnsn_matrix_vector_mul(sphere->trans_inv, point);
+ point = dmnsn_transform_vector(sphere->trans_inv, point);
return point.x*point.x + point.y*point.y + point.z*point.z < 1.0;
}