Open Inventor Reference
SoPointLightDragger.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 * Copyright (C) 1990,91,92 Silicon Graphics, Inc.
40 *
41 _______________________________________________________________________
42 ______________ S I L I C O N G R A P H I C S I N C . ____________
43 |
44 | $Revision: 1.1.1.1 $
45 |
46 | Description:
47 | This file defines the point light dragger class.
48 | This is nothing more than a drag point dragger that whose
49 | default geometry is most appropriate when dragging a
50 | point light source.
51 |
52 | NOTE TO DEVELOPERS:
53 | For info about the structure of SoPointLightDragger:
54 | [1] compile: /usr/share/src/Inventor/samples/ivNodeKitStructure
55 | [2] type: ivNodeKitStructure SoPointLightDragger.
56 | [3] The program prints a diagram of the scene graph and a table with
57 | information about each part.
58 |
59 | The following parts in this dragger are created at construction time.
60 | 'ResourceName' corresponds to the name of the default geometry for the
61 | part. The dragger's constructor gets the scene graph for 'ResourceName'
62 | by querying the global dictionary ( SoDB::getByName("ResourceName"); ).
63 |
64 | Resource Name: Part Name:
65 |
66 | pointLightOverallMaterial - material
67 |
68 | pointLightTranslatorLineTranslator -
69 | - translator.xTranslator.translator
70 | - translator.yTranslator.translator
71 | - translator.zTranslator.translator
72 | pointLightTranslatorLineTranslatorActive -
73 | - translator.xTranslator.translatorActive
74 | - translator.yTranslator.translatorActive
75 | - translator.zTranslator.translatorActive
76 |
77 | pointLightTranslatorPlaneTranslator -
78 | - translator.yzTranslator.translator
79 | - translator.xzTranslator.translator
80 | - translator.xyTranslator.translator
81 | pointLightTranslatorPlaneTranslatorActive -
82 | - translator.yzTranslator.translatorActive
83 | - translator.xzTranslator.translatorActive
84 | - translator.xyTranslator.translatorActive
85 |
86 |
87 | Author(s): Paul Isaacs, Howard Look
88 |
89 ______________ S I L I C O N G R A P H I C S I N C . ____________
90 _______________________________________________________________________
91 */
92
93#ifndef _SO_POINT_LIGHT_DRAGGER_
94#define _SO_POINT_LIGHT_DRAGGER_
95
96#include <Inventor/SbLinear.h>
100
101class SoFieldSensor;
102
105
182
184{
186
191
192 SO_KIT_CATALOG_ENTRY_HEADER(translator);
193
194 public:
197
199
200 SoINTERNAL public:
201 static void initClass();
202
203 protected:
204
206 static void fieldSensorCB( void *, SoSensor * );
207 static void valueChangedCB( void *, SoDragger * );
208
217 virtual bool setUpConnections( bool onOff, bool doItAlways = FALSE );
218
220
222
223 private:
224
225 static const unsigned char geomBuffer[];
226};
227
228#endif /* _SO_POINT_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
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.
Sun-shaped icon you can translate in 3D by dragging with the mouse.
virtual ~SoPointLightDragger()
virtual void setDefaultOnNonWritingFields()
Called by the SoBaseKit::write() method.
SoPointLightDragger()
Constructor.
static void valueChangedCB(void *, SoDragger *)
virtual bool setUpConnections(bool onOff, bool doItAlways=FALSE)
detach/attach any sensors, callbacks, and/or field connections.
SoFieldSensor * fieldSensor
static void initClass()
initialize the class
static void fieldSensorCB(void *, SoSensor *)
Field containing a three-dimensional vector.
Definition SoSFVec3f.h:79
Abstract base class for Inventor sensors.
Definition SoSensor.h:108