;;-*-Lisp-*- (in-package goal) ;; name: bounding-box-h.gc ;; name in dgo: bounding-box-h ;; dgos: GAME, ENGINE ;; Types related to bounding boxes. ;; floating point bounding box. ;; min is the corner with lowest x,y,z values. ;; max is the corner with highest x,y,z values. ;; the w value should be 1 in both min and max. (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) ) ) ;; integer (word) bounding box. (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 ) ;; bounding both that has both a box and box4w. ;; these are used in the collision system where it is useful to have both float/int versions. (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 )