jak-project/goal_src/engine/geometry/bounding-box-h.gc
water111 99683c0dac
[decompiler] Add tests and fixes for vector-h and math (#333)
* before messing with ssa stuff

* fix ash

* bounding box
2021-03-24 19:16:31 -04:00

51 lines
1.4 KiB
Common Lisp

;;-*-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_ (pointer 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_ (pointer 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.
(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
)