;;-*-Lisp-*-
(in-package goal)

;; definition of type bounding-box
(deftype bounding-box (structure)
  ((min vector :inline :offset-assert   0)
   (max vector :inline :offset-assert  16)
   )
  :method-count-assert 16
  :size-assert         #x20
  :flag-assert         #x1000000020
  (:methods
    (add-spheres! (_type_ (inline-array sphere) int) int 9)
    (add-point! (_type_ vector3s) int 10)
    (set-from-point-offset! (_type_ vector3s vector3s) int 11)
    (set-from-point-offset-pad! (_type_ vector3s vector3s float) int 12)
    (set-from-sphere! (_type_ sphere) int 13)
    (set-from-spheres! (_type_ (inline-array sphere) int) int 14)
    (add-box! (_type_ bounding-box) int 15)
    )
  )

;; definition for method 3 of type bounding-box
(defmethod inspect bounding-box ((obj bounding-box))
  (format #t "[~8x] ~A~%" obj 'bounding-box)
  (format #t "~Tmin: ~`vector`P~%" (-> obj min))
  (format #t "~Tmax: ~`vector`P~%" (-> obj max))
  obj
  )

;; definition of type bounding-box4w
(deftype bounding-box4w (structure)
  ((min vector4w :inline :offset-assert   0)
   (max vector4w :inline :offset-assert  16)
   )
  :method-count-assert 9
  :size-assert         #x20
  :flag-assert         #x900000020
  )

;; definition for method 3 of type bounding-box4w
(defmethod inspect bounding-box4w ((obj bounding-box4w))
  (format #t "[~8x] ~A~%" obj 'bounding-box4w)
  (format #t "~Tmin: ~`vector4w`P~%" (-> obj min))
  (format #t "~Tmax: ~`vector4w`P~%" (-> obj max))
  obj
  )

;; definition of type bounding-box-both
(deftype bounding-box-both (structure)
  ((box   bounding-box   :inline :offset-assert   0)
   (box4w bounding-box4w :inline :offset-assert  32)
   )
  :method-count-assert 9
  :size-assert         #x40
  :flag-assert         #x900000040
  )

;; definition for method 3 of type bounding-box-both
(defmethod inspect bounding-box-both ((obj bounding-box-both))
  (format #t "[~8x] ~A~%" obj 'bounding-box-both)
  (format #t "~Tbox: #<bounding-box @ #x~X>~%" (-> obj box))
  (format #t "~Tbox4w: #<bounding-box4w @ #x~X>~%" (-> obj box4w))
  obj
  )

;; failed to figure out what this is:
0
