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

;; definition of type trajectory
(deftype trajectory (structure)
  ((initial-position vector :inline :offset-assert   0)
   (initial-velocity vector :inline :offset-assert  16)
   (time             float          :offset-assert  32)
   (gravity          meters         :offset-assert  36)
   )
  :method-count-assert 16
  :size-assert         #x28
  :flag-assert         #x1000000028
  (:methods
    (eval-position! (_type_ float vector) vector 9)
    (eval-velocity! (_type_ float vector) vector 10)
    (setup-from-to-duration! (_type_ vector vector float float) none 11)
    (setup-from-to-xz-vel! (_type_ vector vector float float) none 12)
    (setup-from-to-y-vel! (_type_ vector vector float float) none 13)
    (setup-from-to-height! (_type_ vector vector float float) none 14)
    (debug-draw! (_type_) none 15)
    )
  )

;; definition for method 3 of type trajectory
(defmethod inspect trajectory ((obj trajectory))
  (format #t "[~8x] ~A~%" obj 'trajectory)
  (format #t "~Tinitial-position: ~`vector`P~%" (-> obj initial-position))
  (format #t "~Tinitial-velocity: ~`vector`P~%" (-> obj initial-velocity))
  (format #t "~Ttime: ~f~%" (-> obj time))
  (format #t "~Tgravity: (meters ~m)~%" (-> obj gravity))
  obj
  )

;; failed to figure out what this is:
0




