Open Inventor Reference
SoSpotLightManip.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
44
45
46#ifndef _SO_SPOT_LIGHT_MANIP_
47#define _SO_SPOT_LIGHT_MANIP_
48
49#include <Inventor/SbLinear.h>
53
56
157
159{
161
162 public:
163
166
173
195 bool replaceNode( SoPath *p );
214 bool replaceManip(SoPath *p, SoSpotLight *newOne ) const;
215
216 SoEXTENDER public:
217
223 virtual void doAction( SoAction *action );
224 virtual void callback( SoCallbackAction *action );
225 virtual void GLRender( SoGLRenderAction *action );
226 virtual void getBoundingBox( SoGetBoundingBoxAction *action );
227 virtual void getMatrix(SoGetMatrixAction *action );
228 virtual void handleEvent( SoHandleEventAction *action );
229 virtual void pick( SoPickAction *action );
230 virtual void search( SoSearchAction *action );
231
232 SoINTERNAL public:
233
234 static void initClass();
235
236 virtual SoChildList *getChildren() const;
237
238 protected:
239
241 virtual void copyContents(const SoFieldContainer *fromFC,
242 bool copyConnections);
243
244 static void transferFieldValues( const SoSpotLight *from,
245 SoSpotLight *to);
246
251 static void fieldSensorCB(void *, SoSensor *);
252 static void valueChangedCB(void *,SoDragger *);
253
254 void setDragger( SoDragger *newDragger );
255
257
259
260 private:
261 int getNumChildren() const { return (children->getLength()); }
262};
263
264#endif /* _SO_SPOT_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.
Searches for nodes in a scene graph.
Abstract base class for Inventor sensors.
Definition SoSensor.h:108
Description: This file defines a manipulator for a spot light nodes.
SoFieldSensor * locationFieldSensor
SoChildList * children
virtual void pick(SoPickAction *action)
static void valueChangedCB(void *, SoDragger *)
virtual SoChildList * getChildren() const
Returns pointer to children, or NULL if none.
void setDragger(SoDragger *newDragger)
virtual void copyContents(const SoFieldContainer *fromFC, bool copyConnections)
Redefines this to also copy the dragger.
virtual ~SoSpotLightManip()
SoFieldSensor * colorFieldSensor
virtual void GLRender(SoGLRenderAction *action)
Creates a light source during rendering.
static void initClass()
virtual void doAction(SoAction *action)
These functions implement all actions for nodekits.
bool replaceManip(SoPath *p, SoSpotLight *newOne) const
Replaces the tail of the path, which must be this manipulator, with the given SoSpotLight node.
SoDragger * getDragger()
Returns a pointer to the dragger being used by this manipulator.
static void fieldSensorCB(void *, SoSensor *)
SoFieldSensor * directionFieldSensor
virtual void search(SoSearchAction *action)
virtual void handleEvent(SoHandleEventAction *action)
static void transferFieldValues(const SoSpotLight *from, SoSpotLight *to)
SoSpotLightManip()
Constructor.
virtual void callback(SoCallbackAction *action)
bool replaceNode(SoPath *p)
Replaces the tail of the path with this manipulator.
SoFieldSensor * angleFieldSensor
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
virtual void getMatrix(SoGetMatrixAction *action)
Node representing a spotlight source.