2 (in-package :lambdamundo
)
5 ((orientation :initform
(new-quaternion) :accessor orientation-of
)
6 (location :initform
(new-vertex3d) :accessor location-of
)
7 (attachments :initform nil
))
8 (:documentation
"Object representing a graphical 3d location for manipulation"))
10 (defmethod draw ((self cursor
))
11 (with-vertex3d (location-of self
)
14 (quaternion->matrix33
(orientation-of self
))
18 ;; TO DO -- nice fat lines?
19 (gl:with-begin gl
:+lines
+
20 (gl:color-3f
1.0 0.0 0.0)
21 (gl:vertex-3f ox oy oz
)
22 (gl:vertex-3f xx xy xz
)
23 (gl:color-3f
0.0 1.0 0.0)
24 (gl:vertex-3f ox oy oz
)
25 (gl:vertex-3f yx yy yz
)
26 (gl:vertex-3f
0.0 0.0 1.0)
27 (gl:vertex-3f ox oy oz
)
28 (gl:vertex-3f zx zy zz
)))))
30 ;; to do -- we attach things to cursors, either other cursors to create
31 ;; heirarchies or meshes to draw