summaryrefslogtreecommitdiffstats
path: root/libdimension/plane.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/plane.c')
-rw-r--r--libdimension/plane.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libdimension/plane.c b/libdimension/plane.c
index 93d5173..be3d91a 100644
--- a/libdimension/plane.c
+++ b/libdimension/plane.c
@@ -58,14 +58,13 @@ dmnsn_plane_intersection_fn(const dmnsn_object *plane, dmnsn_line line,
{
dmnsn_vector *normal = plane->ptr;
- dmnsn_line line_trans = dmnsn_transform_line(plane->trans_inv, line);
- double den = dmnsn_vector_dot(line_trans.n, *normal);
+ double den = dmnsn_vector_dot(line.n, *normal);
if (den != 0.0) {
- double t = -dmnsn_vector_dot(line_trans.x0, *normal)/den;
+ double t = -dmnsn_vector_dot(line.x0, *normal)/den;
if (t >= 0.0) {
intersection->ray = line;
intersection->t = t;
- intersection->normal = dmnsn_transform_normal(plane->trans, *normal);
+ intersection->normal = *normal;
intersection->texture = plane->texture;
intersection->interior = plane->interior;
return true;