Skip to content

Commit

Permalink
Update ray.lisp
Browse files Browse the repository at this point in the history
No error if shape intersect method not defined.
  • Loading branch information
kaveh808 committed Jul 18, 2023
1 parent b2dbc7f commit 3ff0943
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/kernel/ray.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
(setf min-distance distance)))))
min-distance))

;;; ignore shapes for which the method is not defined; do not throw error
(defmethod intersect ((self ray) (shape shape))
(error "INTERSECT not implemented"))
nil)
;; (error "INTERSECT not implemented"))

(defmethod intersect ((self ray) (polyh polyhedron))
(multiple-value-bind (lo hi) (get-bounds-world polyh)
Expand Down

0 comments on commit 3ff0943

Please sign in to comment.