;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; LUSH Lisp Universal Shell
;;;   Copyright (C) 2002 Leon Bottou, Yann Le Cun, AT&T Corp, NECI.
;;; Includes parts of TL3:
;;;   Copyright (C) 1987-1999 Leon Bottou and Neuristique.
;;; Includes selected parts of SN3.2:
;;;   Copyright (C) 1991-2001 AT&T Corp.
;;;
;;; Includes information derived from the GSL (Gnu Scientific Library)
;;;   header files which are copyrighted and distributed under the GPL
;;;   by their respective authors.
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(libload "inventor/inventor-config")



#? *** manips

;; dummy function that adds inventor header files in C file
(eval `(de |dummy_manips| () ,inventor-cpheader-cmd ()))

#? * sotransform
;;.TYPE CLASS
#? (==> <sotransform> getsf-translation)
#? (==> <sotransform> getsf-rotation)
#? (==> <sotransform> getsf-scalefactor)
#? (==> <sotransform> getsf-scaleorientation)
#? (==> <sotransform> getsf-center)
#? (new sotransform <flag>>
#? (==> <sotransform> pointat <frompoint> <topoint>)
#? (==> <sotransform> getscalespacematrix <mat> <inv>)
#? (==> <sotransform> getrotationspacematrix <mat> <inv>)
#? (==> <sotransform> gettranslationspacematrix <mat> <inv>)
#? (==> <sotransform> multleft <mat>)
#? (==> <sotransform> multright <mat>)
#? (==> <sotransform> combineleft <nodeonleft>)
#? (==> <sotransform> combineright <nodeonright>)
#? (==> <sotransform> setmatrix <mat>)
#? (==> <sotransform> recenter <newcenter>)

#? * sotransformmanip
;;.TYPE CLASS
#? (new sotransformmanip <flag>>
#? (==> <sotransformmanip> getdragger)
#? (==> <sotransformmanip> replacenode <p>)
#? (==> <sotransformmanip> replacemanip <p> <newone>)

#? * socenterballmanip
;;.TYPE CLASS
#? (new socenterballmanip <flag>>

#? * sodirectionallightmanip
;;.TYPE CLASS
#? (new sodirectionallightmanip <flag>>
#? (==> <sodirectionallightmanip> getdragger)
#? (==> <sodirectionallightmanip> replacenode <p>)
#? (==> <sodirectionallightmanip> replacemanip <p> <newone>)

#? * sohandleboxmanip
;;.TYPE CLASS
#? (new sohandleboxmanip <flag>>

#? * sojackmanip
;;.TYPE CLASS
#? (new sojackmanip <flag>>

#? * sopointlightmanip
;;.TYPE CLASS
#? (new sopointlightmanip <flag>>
#? (==> <sopointlightmanip> getdragger)
#? (==> <sopointlightmanip> replacenode <p>)
#? (==> <sopointlightmanip> replacemanip <p> <newone>)

#? * sospotlightmanip
;;.TYPE CLASS
#? (new sospotlightmanip <flag>>
#? (==> <sospotlightmanip> getdragger)
#? (==> <sospotlightmanip> replacenode <p>)
#? (==> <sospotlightmanip> replacemanip <p> <newone>)

#? * sotabboxmanip
;;.TYPE CLASS
#? (new sotabboxmanip <flag>>

#? * sotrackballmanip
;;.TYPE CLASS
#? (new sotrackballmanip <flag>>

#? * sotransformboxmanip
;;.TYPE CLASS
#? (new sotransformboxmanip <flag>>

#? * sotransformermanip
;;.TYPE CLASS
#? (new sotransformermanip <flag>>
#? (==> <sotransformermanip> unsquishknobs)
#? (==> <sotransformermanip> islocatehighlighting)
#? (==> <sotransformermanip> setlocatehighlighting <onoff>)

#? * (|dummy_manips|)

;; ********************************************************


;;************************************************************
;;**********  manips 
;;************************************************************
(libload "inventor/nodes_light")


;; class SoTransform : public SoTransformation
(defclass SoTransform SoTransformation)

(defmethod SoTransform  getsf_translation (  )
  
  (let* ((retobj (new SoSFVec3f t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoTransform *)$p)->translation);  #} 
    (setq :retobj:p retobjp)
    retobj))

(defmethod SoTransform  getsf_rotation (  )
  
  (let* ((retobj (new SoSFRotation t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoTransform *)$p)->rotation);  #} 
    (setq :retobj:p retobjp)
    retobj))

(defmethod SoTransform  getsf_scaleFactor (  )
  
  (let* ((retobj (new SoSFVec3f t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoTransform *)$p)->scaleFactor);  #} 
    (setq :retobj:p retobjp)
    retobj))

(defmethod SoTransform  getsf_scaleOrientation (  )
  
  (let* ((retobj (new SoSFRotation t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoTransform *)$p)->scaleOrientation);  #} 
    (setq :retobj:p retobjp)
    retobj))

(defmethod SoTransform  getsf_center (  )
  
  (let* ((retobj (new SoSFVec3f t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoTransform *)$p)->center);  #} 
    (setq :retobj:p retobjp)
    retobj))

(defmethod SoTransform  SoTransform ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoTransform;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())

(defmethod SoTransform  pointAt ( fromPoint toPoint)
  
  ((-gptr- "const SbVec3f *") fromPoint)   ;; reference -> gptr
  ((-gptr- "const SbVec3f *") toPoint)   ;; reference -> gptr
  #{ ((SoTransform *)$p)->pointAt(*$fromPoint, *$toPoint);  #} 
  ())

(defmethod SoTransform  getScaleSpaceMatrix ( mat inv)
  
  ((-gptr- "SbMatrix *") mat)   ;; reference -> gptr
  ((-gptr- "SbMatrix *") inv)   ;; reference -> gptr
  #{ ((SoTransform *)$p)->getScaleSpaceMatrix(*$mat, *$inv);  #} 
  ())

(defmethod SoTransform  getRotationSpaceMatrix ( mat inv)
  
  ((-gptr- "SbMatrix *") mat)   ;; reference -> gptr
  ((-gptr- "SbMatrix *") inv)   ;; reference -> gptr
  #{ ((SoTransform *)$p)->getRotationSpaceMatrix(*$mat, *$inv);  #} 
  ())

(defmethod SoTransform  getTranslationSpaceMatrix ( mat inv)
  
  ((-gptr- "SbMatrix *") mat)   ;; reference -> gptr
  ((-gptr- "SbMatrix *") inv)   ;; reference -> gptr
  #{ ((SoTransform *)$p)->getTranslationSpaceMatrix(*$mat, *$inv);  #} 
  ())

(defmethod SoTransform  multLeft ( mat)
  
  ((-gptr- "const SbMatrix *") mat)   ;; reference -> gptr
  #{ ((SoTransform *)$p)->multLeft(*$mat);  #} 
  ())

(defmethod SoTransform  multRight ( mat)
  
  ((-gptr- "const SbMatrix *") mat)   ;; reference -> gptr
  #{ ((SoTransform *)$p)->multRight(*$mat);  #} 
  ())

(defmethod SoTransform  combineLeft ( nodeOnLeft)
  
  ((-gptr- "SoTransformation *") nodeOnLeft)
  #{ ((SoTransform *)$p)->combineLeft($nodeOnLeft);  #} 
  ())

(defmethod SoTransform  combineRight ( nodeOnRight)
  
  ((-gptr- "SoTransformation *") nodeOnRight)
  #{ ((SoTransform *)$p)->combineRight($nodeOnRight);  #} 
  ())

(defmethod SoTransform  setMatrix ( mat)
  
  ((-gptr- "const SbMatrix *") mat)   ;; reference -> gptr
  #{ ((SoTransform *)$p)->setMatrix(*$mat);  #} 
  ())

(defmethod SoTransform  recenter ( newCenter)
  
  ((-gptr- "const SbVec3f *") newCenter)   ;; reference -> gptr
  #{ ((SoTransform *)$p)->recenter(*$newCenter);  #} 
  ())



;; class SoTransformManip : public SoTransform
(defclass SoTransformManip SoTransform)

(defmethod SoTransformManip  SoTransformManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoTransformManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())

(defmethod SoTransformManip  getDragger (  )
  
  (gptr #{ ((SoTransformManip *)$p)->getDragger()  #} ))    ;; SoDragger *  -> gptr

(defmethod SoTransformManip  replaceNode ( p)
  
  ((-gptr- "SoPath *") p)
  (int #{ ((SoTransformManip *)$p)->replaceNode($p)  #} ))

(defmethod SoTransformManip  replaceManip ( p newOne)
  
  ((-gptr- "SoPath *") p)
  ((-gptr- "SoTransform *") newOne)
  (int #{ ((SoTransformManip *)$p)->replaceManip($p,$newOne)  #} ))




;; class SoCenterballManip : public SoTransformManip
(defclass SoCenterballManip SoTransformManip)

(defmethod SoCenterballManip  SoCenterballManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoCenterballManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())



;; class SoDirectionalLightManip : public SoDirectionalLight
(defclass SoDirectionalLightManip SoDirectionalLight)

(defmethod SoDirectionalLightManip  SoDirectionalLightManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoDirectionalLightManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())

(defmethod SoDirectionalLightManip  getDragger (  )
  
  (gptr #{ ((SoDirectionalLightManip *)$p)->getDragger()  #} ))    ;; SoDragger *  -> gptr

(defmethod SoDirectionalLightManip  replaceNode ( p)
  
  ((-gptr- "SoPath *") p)
  (int #{ ((SoDirectionalLightManip *)$p)->replaceNode($p)  #} ))

(defmethod SoDirectionalLightManip  replaceManip ( p newOne)
  
  ((-gptr- "SoPath *") p)
  ((-gptr- "SoDirectionalLight *") newOne)
  (int #{ ((SoDirectionalLightManip *)$p)->replaceManip($p,$newOne)  #} ))






;; class SoHandleBoxManip : public SoTransformManip
(defclass SoHandleBoxManip SoTransformManip)

(defmethod SoHandleBoxManip  SoHandleBoxManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoHandleBoxManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())






;; class SoJackManip : public SoTransformManip
(defclass SoJackManip SoTransformManip)

(defmethod SoJackManip  SoJackManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoJackManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())




;; class SoPointLightManip : public SoPointLight
(defclass SoPointLightManip SoPointLight)

(defmethod SoPointLightManip  SoPointLightManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoPointLightManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())

(defmethod SoPointLightManip  getDragger (  )
  
  (gptr #{ ((SoPointLightManip *)$p)->getDragger()  #} ))    ;; SoDragger *  -> gptr

(defmethod SoPointLightManip  replaceNode ( p)
  
  ((-gptr- "SoPath *") p)
  (int #{ ((SoPointLightManip *)$p)->replaceNode($p)  #} ))

(defmethod SoPointLightManip  replaceManip ( p newOne)
  
  ((-gptr- "SoPath *") p)
  ((-gptr- "SoPointLight *") newOne)
  (int #{ ((SoPointLightManip *)$p)->replaceManip($p,$newOne)  #} ))



;; class SoSpotLightManip : public SoSpotLight
(defclass SoSpotLightManip SoSpotLight)

(defmethod SoSpotLightManip  SoSpotLightManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoSpotLightManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())

(defmethod SoSpotLightManip  getDragger (  )
  
  (gptr #{ ((SoSpotLightManip *)$p)->getDragger()  #} ))    ;; SoDragger *  -> gptr

(defmethod SoSpotLightManip  replaceNode ( p)
  
  ((-gptr- "SoPath *") p)
  (int #{ ((SoSpotLightManip *)$p)->replaceNode($p)  #} ))

(defmethod SoSpotLightManip  replaceManip ( p newOne)
  
  ((-gptr- "SoPath *") p)
  ((-gptr- "SoSpotLight *") newOne)
  (int #{ ((SoSpotLightManip *)$p)->replaceManip($p,$newOne)  #} ))




;; class SoTabBoxManip : public SoTransformManip
(defclass SoTabBoxManip SoTransformManip)

(defmethod SoTabBoxManip  SoTabBoxManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoTabBoxManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())



;; class SoTrackballManip : public SoTransformManip
(defclass SoTrackballManip SoTransformManip)

(defmethod SoTrackballManip  SoTrackballManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoTrackballManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())





;; class SoTransformBoxManip : public SoTransformManip
(defclass SoTransformBoxManip SoTransformManip)

(defmethod SoTransformBoxManip  SoTransformBoxManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoTransformBoxManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())




;; class SoTransformerManip : public SoTransformManip
(defclass SoTransformerManip SoTransformManip)

(defmethod SoTransformerManip  SoTransformerManip ( flag  )
  ((-bool-) flag)
  
  #{  if($flag == false ) {
            $p = new  SoTransformerManip;
            $shell_flag = false;
      }
      else
            $shell_flag = true;
  #} 
  ())

(defmethod SoTransformerManip  unsquishKnobs (  )
  
  #{ ((SoTransformerManip *)$p)->unsquishKnobs();  #} 
  ())

(defmethod SoTransformerManip  isLocateHighlighting (  )
  
  (int #{ ((SoTransformerManip *)$p)->isLocateHighlighting()  #} ))

(defmethod SoTransformerManip  setLocateHighlighting ( onOff)
  
  ((-int-) onOff)                    ;; SbBool -> int
  #{ ((SoTransformerManip *)$p)->setLocateHighlighting($onOff);  #} 
  ())

 

;; ********************************************************

(dhc-make-with-c++ () () 
  |dummy_manips|
  (sotransform  recenter  setmatrix  combineright  combineleft  multright  multleft  gettranslationspacematrix  getrotationspacematrix  getscalespacematrix  pointat  sotransform  getsf-center  getsf-scaleorientation  getsf-scalefactor  getsf-rotation  getsf-translation)
  (sotransformmanip  replacemanip  replacenode  getdragger  sotransformmanip)
  (socenterballmanip  socenterballmanip)
  (sodirectionallightmanip  replacemanip  replacenode  getdragger  sodirectionallightmanip)
  (sohandleboxmanip  sohandleboxmanip)
  (sojackmanip  sojackmanip)
  (sopointlightmanip  replacemanip  replacenode  getdragger  sopointlightmanip)
  (sospotlightmanip  replacemanip  replacenode  getdragger  sospotlightmanip)
  (sotabboxmanip  sotabboxmanip)
  (sotrackballmanip  sotrackballmanip)
  (sotransformboxmanip  sotransformboxmanip)
  (sotransformermanip  setlocatehighlighting  islocatehighlighting  unsquishknobs  sotransformermanip)
)
