Open Inventor Reference
SoSpotLightDragger.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * Further, this software is distributed without any warranty that it is
16  * free of the rightful claim of any third person regarding infringement
17  * or the like. Any license provided herein, whether implied or
18  * otherwise, applies only to this software file. Patent licenses, if
19  * any, provided herein do not apply to combinations of this program with
20  * other software, or any other product whatsoever.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27  * Mountain View, CA 94043, or:
28  *
29  * http://www.sgi.com
30  *
31  * For further information regarding this notice, see:
32  *
33  * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34  *
35  */
36 
105 
106 
107 #ifndef _SO_SPOT_LIGHT_DRAGGER_
108 #define _SO_SPOT_LIGHT_DRAGGER_
109 
110 #include <Inventor/SbLinear.h>
116 
117 class SoFieldSensor;
118 class SbPlaneProjector;
119 
122 
224 
226 {
228 
232  SO_KIT_CATALOG_ENTRY_HEADER(material);
233 
238  SO_KIT_CATALOG_ENTRY_HEADER(translatorSep);
239  SO_KIT_CATALOG_ENTRY_HEADER(translatorRotInv);
240  SO_KIT_CATALOG_ENTRY_HEADER(translator);
246  SO_KIT_CATALOG_ENTRY_HEADER(beamPlacement);
247  SO_KIT_CATALOG_ENTRY_HEADER(beamScale);
248  SO_KIT_CATALOG_ENTRY_HEADER(beamSwitch);
250  SO_KIT_CATALOG_ENTRY_HEADER(beamActive);
251 
252  public:
253 
256 
260 
261  SoINTERNAL public:
262  static void initClass();
263 
264  protected:
265 
267 
268  static void startCB( void *, SoDragger * );
269  static void motionCB( void *, SoDragger * );
270  static void doneCB( void *, SoDragger * );
271 
272  void dragStart();
273  void drag();
274  void dragFinish();
275 
279  static void fieldSensorCB( void *, SoSensor * );
280  static void valueChangedCB( void *, SoDragger * );
281 
283  void setBeamScaleFromAngle(float beamAngle);
284 
293  virtual bool setUpConnections( bool onOff, bool doItAlways = FALSE );
294 
296 
298 
299  private:
300  static const unsigned char geomBuffer[];
301 };
302 
303 #endif /* _SO_SPOT_LIGHT_DRAGGER_ */
#define FALSE
Definition: SbBasic.h:79
#define SoINTERNAL
Definition: SbBasic.h:155
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Definition: SbSystem.h:81
#define SO_KIT_CATALOG_ENTRY_HEADER(partName)
This defines an SoSFNode field for the catalog part given.
Definition: SoSubKit.h:155
#define SO_KIT_HEADER(className)
Definition: SoSubKit.h:143
Plane projector.
Base class for nodekits that move in response to click-drag-release mouse events.
Definition: SoDragger.h:225
Sensor class that can be attached to Inventor fields.
Definition: SoFieldSensor.h:80
Field containing a floating-point value.
Definition: SoSFFloat.h:77
Field containing a rotation.
Definition: SoSFRotation.h:84
Field containing a three-dimensional vector.
Definition: SoSFVec3f.h:79
Abstract base class for Inventor sensors.
Definition: SoSensor.h:108
Spotlight shaped dragger that allows you to change position, direction, and width of the beam.
SoFieldSensor * angleFieldSensor
virtual bool setUpConnections(bool onOff, bool doItAlways=FALSE)
detach/attach any sensors, callbacks, and/or field connections.
virtual void setDefaultOnNonWritingFields()
Called by the SoBaseKit::write() method.
static void motionCB(void *, SoDragger *)
SbPlaneProjector * planeProj
used during interaciton with beam
static void doneCB(void *, SoDragger *)
SoFieldSensor * translFieldSensor
virtual ~SoSpotLightDragger()
void setBeamScaleFromAngle(float beamAngle)
Returns scaleFactor for beamScale part to display beamAngle.
static void startCB(void *, SoDragger *)
static void initClass()
Initialize the class.
SoFieldSensor * rotFieldSensor
static void fieldSensorCB(void *, SoSensor *)
SoSpotLightDragger()
Constructor.
static void valueChangedCB(void *, SoDragger *)