;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; 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")



#? *** nodes_light

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

#? * sodirectionallight
;;.TYPE CLASS
#? (==> <sodirectionallight> getsf-direction)
#? (new sodirectionallight <flag>>

#? * sopointlight
;;.TYPE CLASS
#? (==> <sopointlight> getsf-location)
#? (new sopointlight <flag>>

#? * sospotlight
;;.TYPE CLASS
#? (==> <sospotlight> getsf-location)
#? (==> <sospotlight> getsf-direction)
#? (==> <sospotlight> getsf-dropoffrate)
#? (==> <sospotlight> getsf-cutoffangle)
#? (new sospotlight <flag>>

#? * (|dummy_nodes_light|)

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

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


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

(defmethod SoDirectionalLight  getsf_direction (  )
  
  (let* ((retobj (new SoSFVec3f t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoDirectionalLight *)$p)->direction);  #} 
    (setq :retobj:p retobjp)
    retobj))

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




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

(defmethod SoPointLight  getsf_location (  )
  
  (let* ((retobj (new SoSFVec3f t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoPointLight *)$p)->location);  #} 
    (setq :retobj:p retobjp)
    retobj))

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




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

(defmethod SoSpotLight  getsf_location (  )
  
  (let* ((retobj (new SoSFVec3f t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoSpotLight *)$p)->location);  #} 
    (setq :retobj:p retobjp)
    retobj))

(defmethod SoSpotLight  getsf_direction (  )
  
  (let* ((retobj (new SoSFVec3f t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoSpotLight *)$p)->direction);  #} 
    (setq :retobj:p retobjp)
    retobj))

(defmethod SoSpotLight  getsf_dropOffRate (  )
  
  (let* ((retobj (new SoSFFloat t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoSpotLight *)$p)->dropOffRate);  #} 
    (setq :retobj:p retobjp)
    retobj))

(defmethod SoSpotLight  getsf_cutOffAngle (  )
  
  (let* ((retobj (new SoSFFloat t))
	 (retobjp :retobj:p))
    #{ $retobjp = &(((SoSpotLight *)$p)->cutOffAngle);  #} 
    (setq :retobj:p retobjp)
    retobj))

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



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

(dhc-make-with-c++ () () 
  |dummy_nodes_light|
  (sodirectionallight  sodirectionallight  getsf-direction)
  (sopointlight  sopointlight  getsf-location)
  (sospotlight  sospotlight  getsf-cutoffangle  getsf-dropoffrate  getsf-direction  getsf-location)
)
