Reworked to use new clos wrapper of cl-tuples
[tuple-trace.git] / camera.lisp
blob6c7a7f648d20867df9b9460784309fbd191bf84f
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 (camera-window% self) 0))
11 (defmethod window-right-of ((self camera))
12 (aref (camera-window% self) 1))
14 (defmethod window-top-of ((self camera))
15 (aref (camera-window% self) 2))
17 (defmethod window-bottom-of ((self camera))
18 (aref (camera-window% 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))