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

;; name: bounding-box-h.gc
;; name in dgo: bounding-box-h
;; dgos: GAME

;; DECOMP BEGINS

(deftype bounding-box (structure)
  ((min  vector  :inline)
   (max  vector  :inline)
   )
  (:methods
    (add-spheres! (_type_ (inline-array sphere) int) int)
    (add-box! (_type_ bounding-box) int)
    (add-point! (_type_ vector) none)
    (intersects-line-segment? (_type_ vector vector) symbol)
    (set-from-point-offset! (_type_ vector vector) none)
    (set-from-point-offset-pad! (_type_ vector vector float) int)
    (set-to-point! (_type_ vector) none)
    (set-from-sphere! (_type_ sphere) none)
    (set-from-spheres! (_type_ (inline-array sphere) int) int)
    (get-bounding-sphere (_type_ vector) vector)
    (inside-xyz? (bounding-box vector) symbol)
    (inside-xz? (bounding-box vector) symbol)
    )
  )


(deftype bounding-box2 (structure)
  ((min  vector2  :inline)
   (max  vector2  :inline)
   )
  )


(deftype bounding-box4w (structure)
  ((min  vector4w  :inline)
   (max  vector4w  :inline)
   )
  )


(deftype bounding-box-both (structure)
  ((box    bounding-box    :inline)
   (box4w  bounding-box4w  :inline)
   )
  )


(deftype bounding-box-array (inline-array-class)
  ((data  bounding-box  :dynamic)
   )
  )


(set! (-> bounding-box-array heap-base) (the-as uint 32))
