Open Inventor Reference
SoDirectionalLightDragger.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
37
38
39/*
40 * Copyright (C) 1990,91 Silicon Graphics, Inc.
41 *
42 _______________________________________________________________________
43 ______________ S I L I C O N G R A P H I C S I N C . ____________
44 |
45 | $Revision: 1.1.1.1 $
46 |
47 | Description:
48 | This is the include file for the SoDirectionalLightDragger.
49 |
50 | This is a composite dragger which allows independent rotation,
51 | and translation for dragging a directional light.
52 | When applied to a directional light, the translation will only serve
53 | to move the dragger. This translation will have no effect on
54 | the directional light being dragged.
55 |
56 | It is composed of an SoRotateSphericalDragger (for rotation),
57 | and an SoDragPointDragger (for translation).
58 |
59 | NOTE TO DEVELOPERS:
60 | For info about the structure of SoDirectionalLightDragger:
61 | [1] compile: /usr/share/src/Inventor/samples/ivNodeKitStructure
62 | [2] type: ivNodeKitStructure SoDirectionalLightDragger.
63 | [3] The program prints a diagram of the scene graph and a table with
64 | information about each part.
65 |
66 | The following parts in this dragger are created at construction time.
67 | 'ResourceName' corresponds to the name of the default geometry for the
68 | part. The dragger's constructor gets the scene graph for 'ResourceName'
69 | by querying the global dictionary ( SoDB::getByName("ResourceName"); ).
70 |
71 | Resource Name: Part Name:
72 |
73 | directionalLightOverallMaterial - material
74 |
75 | directionalLightTranslatorLineTranslator -
76 | - translator.xTranslator.translator
77 | - translator.yTranslator.translator
78 | - translator.zTranslator.translator
79 | directionalLightTranslatorLineTranslatorActive -
80 | - translator.xTranslator.translatorActive
81 | - translator.yTranslator.translatorActive
82 | - translator.zTranslator.translatorActive
83 |
84 | directionalLightTranslatorPlaneTranslator -
85 | - translator.yzTranslator.translator
86 | - translator.xzTranslator.translator
87 | - translator.xyTranslator.translator
88 | directionalLightTranslatorPlaneTranslatorActive -
89 | - translator.yzTranslator.translatorActive
90 | - translator.xzTranslator.translatorActive
91 | - translator.xyTranslator.translatorActive
92 |
93 | directionalLightRotatorRotator - rotator.rotator
94 | directionalLightRotatorRotatorActive - rotator.rotatorActive
95 | directionalLightRotatorFeedback - rotator.feedback
96 | directionalLightRotatorFeedbackActive - rotator.feedbackActive
97 |
98 | Author(s): Paul Isaacs, David Mott
99 |
100 ______________ S I L I C O N G R A P H I C S I N C . ____________
101 _______________________________________________________________________
102 */
103
104#ifndef _SO_DIRECTIONAL_LIGHT_DRAGGER_
105#define _SO_DIRECTIONAL_LIGHT_DRAGGER_
106
107#include <Inventor/SbLinear.h>
112
113class SoFieldSensor;
114
115
118
203
205
207
212
217 SO_KIT_CATALOG_ENTRY_HEADER(translatorSep);
218 SO_KIT_CATALOG_ENTRY_HEADER(translatorRotInv);
219 SO_KIT_CATALOG_ENTRY_HEADER(translator);
221
222 public:
225
228
229 SoINTERNAL public:
230 static void initClass();
231
232 protected:
233
236 static void fieldSensorCB( void *, SoSensor * );
237 static void valueChangedCB( void *, SoDragger * );
238
247 virtual bool setUpConnections( bool onOff, bool doItAlways = FALSE );
248
250
252
253 private:
254 static const unsigned char geomBuffer[];
255};
256
257#endif /* _SO_DIRECTIONAL_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:77
#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
Directional icon you rotate and translate by dragging with the mouse.
static void fieldSensorCB(void *, SoSensor *)
virtual void setDefaultOnNonWritingFields()
Called by the SoBaseKit::write() method.
SoDirectionalLightDragger()
Constructor.
virtual bool setUpConnections(bool onOff, bool doItAlways=FALSE)
detach/attach any sensors, callbacks, and/or field connections.
static void initClass()
initialize the class
static void valueChangedCB(void *, SoDragger *)
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.
Field containing a rotation.
Field containing a three-dimensional vector.
Definition SoSFVec3f.h:79
Abstract base class for Inventor sensors.
Definition SoSensor.h:108