;;
;; DO NOT EDIT THIS FILE
;; this file is automatically generated from euslisp+euslib version 
;;
;;
(defclass book-object
  :super cascaded-link
  :slots (sensors
         handle0 handle1 handle2 handle3
         ))
(defmethod book-object
  (:init
   (&rest args &key (name "book") (pos (float-vector 0 0 0)) (rot (unit-matrix 3)) &allow-other-keys)
   (let (c bc
         blink0
                 )
     (send-super* :init :name name args)

     ;; definition of link

     ;; definition of :book-bodyset2
     (setq bc (list
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector 0.0 0.0 210.0) (float-vector 0.0 -9.0 210.0) (float-vector 2.0 -10.0 210.0) (float-vector 150.0 -10.0 210.0) (float-vector 150.0 -9.0 210.0) (float-vector 2.0 -9.0 210.0) (float-vector 2.0 9.0 210.0) (float-vector 150.0 9.0 210.0) (float-vector 150.0 10.0 210.0) (float-vector 5.0 10.0 210.0) (float-vector 0.0 9.0 210.0)))
         (instance face :init :vertices (list (float-vector 0.0 -9.0 0.0) (float-vector 0.0 0.0 0.0) (float-vector 0.0 9.0 0.0) (float-vector 5.0 10.0 0.0) (float-vector 150.0 10.0 0.0) (float-vector 150.0 9.0 0.0) (float-vector 2.0 9.0 0.0) (float-vector 2.0 -9.0 0.0) (float-vector 150.0 -9.0 0.0) (float-vector 150.0 -10.0 0.0) (float-vector 2.0 -10.0 0.0)))
         (instance face :init :vertices (list (float-vector 0.0 0.0 210.0) (float-vector 0.0 0.0 0.0) (float-vector 0.0 -9.0 0.0) (float-vector 0.0 -9.0 210.0)))
         (instance face :init :vertices (list (float-vector 0.0 9.0 210.0) (float-vector 0.0 9.0 0.0) (float-vector 0.0 0.0 0.0) (float-vector 0.0 0.0 210.0)))
         (instance face :init :vertices (list (float-vector 5.0 10.0 210.0) (float-vector 5.0 10.0 0.0) (float-vector 0.0 9.0 0.0) (float-vector 0.0 9.0 210.0)))
         (instance face :init :vertices (list (float-vector 150.0 10.0 210.0) (float-vector 150.0 10.0 0.0) (float-vector 5.0 10.0 0.0) (float-vector 5.0 10.0 210.0)))
         (instance face :init :vertices (list (float-vector 150.0 9.0 210.0) (float-vector 150.0 9.0 0.0) (float-vector 150.0 10.0 0.0) (float-vector 150.0 10.0 210.0)))
         (instance face :init :vertices (list (float-vector 2.0 9.0 210.0) (float-vector 2.0 9.0 0.0) (float-vector 150.0 9.0 0.0) (float-vector 150.0 9.0 210.0)))
         (instance face :init :vertices (list (float-vector 2.0 -9.0 210.0) (float-vector 2.0 -9.0 0.0) (float-vector 2.0 9.0 0.0) (float-vector 2.0 9.0 210.0)))
         (instance face :init :vertices (list (float-vector 150.0 -9.0 210.0) (float-vector 150.0 -9.0 0.0) (float-vector 2.0 -9.0 0.0) (float-vector 2.0 -9.0 210.0)))
         (instance face :init :vertices (list (float-vector 150.0 -10.0 210.0) (float-vector 150.0 -10.0 0.0) (float-vector 150.0 -9.0 0.0) (float-vector 150.0 -9.0 210.0)))
         (instance face :init :vertices (list (float-vector 2.0 -10.0 210.0) (float-vector 2.0 -10.0 0.0) (float-vector 150.0 -10.0 0.0) (float-vector 150.0 -10.0 210.0)))
         (instance face :init :vertices (list (float-vector 0.0 -9.0 210.0) (float-vector 0.0 -9.0 0.0) (float-vector 2.0 -10.0 0.0) (float-vector 2.0 -10.0 210.0)))
       ))
       (instance faceset :init :faces (list
         (instance face :init :vertices (list (float-vector 148.0 8.0 208.0) (float-vector 2.0 8.0 208.0) (float-vector 2.0 -8.0 208.0) (float-vector 148.0 -8.0 208.0)))
         (instance face :init :vertices (list (float-vector 2.0 8.0 2.0) (float-vector 148.0 8.0 2.0) (float-vector 148.0 -8.0 2.0) (float-vector 2.0 -8.0 2.0)))
         (instance face :init :vertices (list (float-vector 148.0 8.0 208.0) (float-vector 148.0 8.0 2.0) (float-vector 2.0 8.0 2.0) (float-vector 2.0 8.0 208.0)))
         (instance face :init :vertices (list (float-vector 148.0 -8.0 208.0) (float-vector 148.0 -8.0 2.0) (float-vector 148.0 8.0 2.0) (float-vector 148.0 8.0 208.0)))
         (instance face :init :vertices (list (float-vector 2.0 -8.0 208.0) (float-vector 2.0 -8.0 2.0) (float-vector 148.0 -8.0 2.0) (float-vector 148.0 -8.0 208.0)))
         (instance face :init :vertices (list (float-vector 2.0 8.0 208.0) (float-vector 2.0 8.0 2.0) (float-vector 2.0 -8.0 2.0) (float-vector 2.0 -8.0 208.0)))
       ))
       ))
     (dolist (b (cdr bc)) (send (car bc) :assoc b))
     (send (elt bc 0) :set-color :blue)
     (send (elt bc 1) :set-color :white)
     (setq blink0 (instance bodyset-link :init (make-cascoords) :bodies bc :name :book-bodyset2 :weight 1 :centroid (float-vector 0.0 0.0 0.0) :inertia-tensor #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0))))

     ;; definition of assoc
     (send self :assoc blink0)

     ;; definition of end-coords

     ;; definition of joint


     ;; definition of :handle
     (setq handle0 (make-cascoords :pos (float-vector 75.0 0.0 210.0) :rot #2f((2.220446e-16 0.0 1.0) (0.0 1.0 0.0) (-1.0 0.0 2.220446e-16)) :name "handle0"))
     (send blink0 :assoc handle0)
     (setq handle1 (make-cascoords :pos (float-vector 75.0 0.0 0.0) :rot #2f((2.220446e-16 0.0 -1.0) (0.0 1.0 0.0) (1.0 0.0 2.220446e-16)) :name "handle1"))
     (send blink0 :assoc handle1)
     (setq handle2 (make-cascoords :pos (float-vector 150.0 0.0 105.0) :rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)) :name "handle2"))
     (send blink0 :assoc handle2)
     (setq handle3 (make-cascoords :pos (float-vector 0.0 0.0 105.0) :rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)) :name "handle3"))
     (send blink0 :assoc handle3)

     ;; init-ending 
     (setq links (list blink0))
     (setq joint-list (list))
     (send self :init-ending)
     (send self :move-to (make-coords :pos pos :rot rot))
     (send-all links :worldcoords)

     self))

  (:handle (&rest args) (forward-message-to-all (list  handle0 handle1 handle2 handle3) args))
  (:handle-handle0 (&rest args) (forward-message-to handle0 args))
  (:handle-handle1 (&rest args) (forward-message-to handle1 args))
  (:handle-handle2 (&rest args) (forward-message-to handle2 args))
  (:handle-handle3 (&rest args) (forward-message-to handle3 args))
  (:attention (&rest args) (forward-message-to-all (list ) args))
  (:button (&rest args) (forward-message-to-all (list ) args))
  )

(defun book (&rest args) (instance* book-object :init args))
;; (format *error-output* "(instance book-object :init) for generating model~%")
