Passed test again
[tuple-trace.git] / camera.lisp
blob0f9bba82d2fb3839542e09f4987f1fa6055c7427
1 (in-package :tuple-trace)
3 (def-tuple-class camera
4 (:tuples
5 ((position :type vector3d)
6 (window :type rect))))
8 (defmethod window-left-of ((self camera))
9 (aref (window-of% self) 0))
11 (defmethod window-right-of ((self camera))
12 (aref (window-of% self) 1))
14 (defmethod window-top-of ((self camera))
15 (aref (window-of% self) 2))
17 (defmethod window-bottom-of ((self camera))
18 (aref (window-of% self) 3))
20 (defmethod window-width-of ((self camera))
21 (width (window-of self)))
23 (defmethod window-height-of ((self camera))
24 (height (window-of self)))
27 (defun make-camera (x y z)
28 (let ((result (make-instance 'camera :position (make-vector3d* x y z))))
29 result))