Files

63 lines
2.0 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type drawable
(deftype drawable (basic)
"Base class for `drawable` scene graph system.
This base class is really abused in many ways, and the meaning of the various methods differ depending
on the exact type. Not even the ID and bsphere here are always populated.
This is used for very high level organization of different rendering data types, and also very low-level
culling/rendering optimizations. It supports both array-of-references and inline-array containers with precise
control over memory layout for use with DMA."
((id int16)
(bsphere vector :inline)
)
(:methods
(login (_type_) _type_)
(draw (_type_ _type_ display-frame) none)
(fill-collide-list-from-box (_type_ int collide-list collide-query) int)
(fill-collide-list-from-line-sphere (_type_ int collide-list collide-query) int)
(collect-stats (_type_) none)
(debug-draw (_type_ drawable display-frame) none)
(unpack-vis (_type_ (pointer int8) (pointer int8)) (pointer int8))
(collect-regions (_type_ sphere int region-prim-list) none)
)
)
;; definition for method 3 of type drawable
(defmethod inspect ((this drawable))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(label cfg-4)
this
)
;; definition of type drawable-error
(deftype drawable-error (drawable)
"A drawable which just represents an error. When drawn, it simply displays a sphere with an error message."
((name string)
)
)
;; definition for method 3 of type drawable-error
(defmethod inspect ((this drawable-error))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tname: ~A~%" (-> this name))
(label cfg-4)
this
)
;; failed to figure out what this is:
0