Open Inventor Reference
MeVis/ThirdParty/Sources/Inventor/inventor/lib/interaction/include/Inventor/draggers/SoPointLightDragger.h
Go to the documentation of this file.
00001 /*
00002  *
00003  *  Copyright (C) 2000 Silicon Graphics, Inc.  All Rights Reserved. 
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Lesser General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2.1 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Lesser General Public License for more details.
00014  *
00015  *  Further, this software is distributed without any warranty that it is
00016  *  free of the rightful claim of any third person regarding infringement
00017  *  or the like.  Any license provided herein, whether implied or
00018  *  otherwise, applies only to this software file.  Patent licenses, if
00019  *  any, provided herein do not apply to combinations of this program with
00020  *  other software, or any other product whatsoever.
00021  * 
00022  *  You should have received a copy of the GNU Lesser General Public
00023  *  License along with this library; if not, write to the Free Software
00024  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  *  Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
00027  *  Mountain View, CA  94043, or:
00028  * 
00029  *  http://www.sgi.com 
00030  * 
00031  *  For further information regarding this notice, see: 
00032  * 
00033  *  http://oss.sgi.com/projects/GenInfo/NoticeExplan/
00034  *
00035  */
00036 
00037 
00038 /*
00039  * Copyright (C) 1990,91,92   Silicon Graphics, Inc.
00040  *
00041  _______________________________________________________________________
00042  ______________  S I L I C O N   G R A P H I C S   I N C .  ____________
00043  |
00044  |   $Revision: 1.1.1.1 $
00045  |
00046  |   Description:
00047  |      This file defines the point light dragger class.
00048  |      This is nothing more than a drag point dragger that whose
00049  |      default geometry is most appropriate when dragging a
00050  |      point light source.
00051  |
00052  | NOTE TO DEVELOPERS:
00053  |     For info about the structure of SoPointLightDragger:
00054  |     [1] compile: /usr/share/src/Inventor/samples/ivNodeKitStructure
00055  |     [2] type:    ivNodeKitStructure SoPointLightDragger.
00056  |     [3] The program prints a diagram of the scene graph and a table with 
00057  |         information about each part.
00058  |
00059  |  The following parts in this dragger are created at construction time.
00060  |  'ResourceName' corresponds to the name of the default geometry for the
00061  |  part. The dragger's constructor gets the scene graph for 'ResourceName'
00062  |  by querying the global dictionary ( SoDB::getByName("ResourceName"); ).  
00063  |
00064  |  Resource Name:                        Part Name:
00065  |
00066  |  pointLightOverallMaterial           - material
00067  |
00068  |  pointLightTranslatorLineTranslator  - 
00069  |                                    - translator.xTranslator.translator
00070  |                                    - translator.yTranslator.translator
00071  |                                    - translator.zTranslator.translator
00072  |  pointLightTranslatorLineTranslatorActive  - 
00073  |                                    - translator.xTranslator.translatorActive
00074  |                                    - translator.yTranslator.translatorActive
00075  |                                    - translator.zTranslator.translatorActive
00076  |
00077  |  pointLightTranslatorPlaneTranslator - 
00078  |                                    - translator.yzTranslator.translator
00079  |                                    - translator.xzTranslator.translator
00080  |                                    - translator.xyTranslator.translator
00081  |  pointLightTranslatorPlaneTranslatorActive  - 
00082  |                                    - translator.yzTranslator.translatorActive
00083  |                                    - translator.xzTranslator.translatorActive
00084  |                                    - translator.xyTranslator.translatorActive
00085  |
00086  |
00087  |   Author(s): Paul Isaacs, Howard Look
00088  |
00089  ______________  S I L I C O N   G R A P H I C S   I N C .  ____________
00090  _______________________________________________________________________
00091  */
00092 
00093 #ifndef  _SO_POINT_LIGHT_DRAGGER_
00094 #define  _SO_POINT_LIGHT_DRAGGER_
00095 
00096 #include <Inventor/SbLinear.h>
00097 #include <Inventor/draggers/SoDragger.h>
00098 #include <Inventor/fields/SoSFVec3f.h>
00099 #include <Inventor/sensors/SoSensor.h>
00100 
00101 class SoFieldSensor;
00102 
00105 
00181 
00182 
00183 class INVENTOR_API SoPointLightDragger : public SoDragger
00184 {
00185     SO_KIT_HEADER(SoPointLightDragger);
00186 
00190     SO_KIT_CATALOG_ENTRY_HEADER(material);
00191 
00192     SO_KIT_CATALOG_ENTRY_HEADER(translator);
00193 
00194   public:
00196     SoPointLightDragger();
00197 
00198     SoSFVec3f    translation;
00199 
00200   SoINTERNAL public:
00201     static void initClass();  
00202 
00203   protected:
00204 
00205     SoFieldSensor *fieldSensor;
00206     static void   fieldSensorCB( void *, SoSensor * );
00207     static void valueChangedCB( void *, SoDragger * );
00208 
00217     virtual SbBool setUpConnections( SbBool onOff, SbBool doItAlways = FALSE );
00218 
00219     virtual void setDefaultOnNonWritingFields();
00220 
00221     virtual ~SoPointLightDragger();
00222 
00223   private:
00224 
00225     static const char geomBuffer[];
00226 };    
00227 
00228 #endif  /* _SO_POINT_LIGHT_DRAGGER_ */