4 ((normal :accessor normal
:initarg
:normal
:initform
#.
(v 0 0 1) :type vec
)
5 (center :accessor center
:initarg
:center
:initform
#.
(v 0 0 0) :type vec
)))
8 ((radius :accessor radius
:initarg
:radius
:initform
1d0
:type double-float
)))
11 ((focal-length :accessor focal-length
12 :initarg
:focal-length
16 (defclass objective
(lens)
17 ;; set the lens-radius to something bigger (maybe twice bfp-radius)
18 ;; to prevent spurious RAY-LOST when dispatching to lens refract
19 ((immersion-index :accessor immersion-index
:initarg
:immersion-index
20 :initform
(alexandria:required-argument
)
22 (numerical-aperture :accessor numerical-aperture
:initarg
:numerical-aperture
23 :initform
(alexandria:required-argument
)
25 (bfp-radius :accessor bfp-radius
:initarg
:bfp-radius
26 :initform
(alexandria:required-argument
)
29 (defmethod print-object ((objective objective
) stream
)
30 (with-slots (immersion-index numerical-aperture focal-length bfp-radius
) objective
31 (format stream
"#<objective ~3,1fx f: ~2,2f na: ~f n: ~f bfp-radius: ~2,3f>"
32 (/ 164.5 focal-length
) focal-length
33 numerical-aperture immersion-index bfp-radius
)))