Open Inventor Reference
SoPointLightManip.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 a manipulator for a Point light nodes.
48 | It is subclassed from SoPointLight.
49 |
50 | Author(s): Paul Isaacs
51 |
52 ______________ S I L I C O N G R A P H I C S I N C . ____________
53 _______________________________________________________________________
54 */
55
56#ifndef _SO_POINT_LIGHT_MANIP_
57#define _SO_POINT_LIGHT_MANIP_
58
59#include <Inventor/SbLinear.h>
63
66
148
150{
152
153 public:
156
163
185 bool replaceNode( SoPath *p );
204 bool replaceManip(SoPath *p, SoPointLight *newOne ) const;
205
206 SoEXTENDER public:
207
213 virtual void doAction( SoAction *action );
214 virtual void callback( SoCallbackAction *action );
215 virtual void GLRender( SoGLRenderAction *action );
216 virtual void getBoundingBox( SoGetBoundingBoxAction *action );
217 virtual void getMatrix(SoGetMatrixAction *action );
218 virtual void handleEvent( SoHandleEventAction *action );
219 virtual void pick( SoPickAction *action );
220 virtual void search( SoSearchAction *action );
221
222 SoINTERNAL public:
223 static void initClass();
224
225 virtual SoChildList *getChildren() const;
226
227 protected:
228
230 virtual void copyContents(const SoFieldContainer *fromFC,
231 bool copyConnections);
232
233 static void transferFieldValues( const SoPointLight *from,
234 SoPointLight *to);
235
236 static void valueChangedCB(void *,SoDragger *);
237
240 static void fieldSensorCB(void *, SoSensor *);
241
242 void setDragger( SoDragger *newDragger );
243
245
247
248 private:
249 int getNumChildren() const { return (children->getLength()); }
250};
251
252#endif /* _SO_POINT_LIGHT_MANIP_ */
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
Definition SbBasic.h:154
#define SoINTERNAL
Definition SbBasic.h:155
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Definition SbSystem.h:77
#define SO_NODE_HEADER(className)
Non-abstract classes have everything abstract classes have, plus a way to create an instance.
Definition SoSubNode.h:170
int getLength() const
Returns number of pointers in list.
Definition SbPList.h:110
Abstract base class for all actions.
Definition SoAction.h:179
Performs a generic traversal of the scene graph.
This class maintains a list of child nodes for any node.
Definition SoChildList.h:83
Base class for nodekits that move in response to click-drag-release mouse events.
Definition SoDragger.h:225
Abstract base class for objects that contain fields.
Sensor class that can be attached to Inventor fields.
Renders a scene graph using OpenGL.
Computes bounding box of a scene.
Computes transformation matrix for subgraph.
Allows nodes in a graph to receive input events.
Path that points to a list of hierarchical nodes.
Definition SoPath.h:109
Abstract base class for picking objects in a scene.
Point light node with 3D interface for editing location.
static void fieldSensorCB(void *, SoSensor *)
virtual ~SoPointLightManip()
void setDragger(SoDragger *newDragger)
bool replaceNode(SoPath *p)
Replaces the tail of the path with this manipulator.
virtual void callback(SoCallbackAction *action)
virtual void GLRender(SoGLRenderAction *action)
Creates a light source during rendering.
bool replaceManip(SoPath *p, SoPointLight *newOne) const
Replaces the tail of the path, which must be this manipulator, with the given SoPointLight node.
SoFieldSensor * locationFieldSensor
SoPointLightManip()
Constructor.
virtual void search(SoSearchAction *action)
SoDragger * getDragger()
Returns a pointer to the dragger being used by this manipulator.
virtual void pick(SoPickAction *action)
virtual void doAction(SoAction *action)
These functions implement all actions for nodekits.
static void initClass()
initialize the class
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
static void valueChangedCB(void *, SoDragger *)
SoFieldSensor * colorFieldSensor
virtual void handleEvent(SoHandleEventAction *action)
virtual void getMatrix(SoGetMatrixAction *action)
virtual SoChildList * getChildren() const
Returns pointer to children, or NULL if none.
virtual void copyContents(const SoFieldContainer *fromFC, bool copyConnections)
Redefines this to also copy the dragger.
static void transferFieldValues(const SoPointLight *from, SoPointLight *to)
Node representing a point light source.
Searches for nodes in a scene graph.
Abstract base class for Inventor sensors.
Definition SoSensor.h:108