Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoVRMLScript.h
1/**************************************************************************\
2 *
3 * This file is part of the Coin 3D visualization library.
4 * Copyright (C) by Kongsberg Oil & Gas Technologies.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * ("GPL") version 2 as published by the Free Software Foundation.
9 * See the file LICENSE.GPL at the root directory of this source
10 * distribution for additional information about the GNU GPL.
11 *
12 * For using Coin with software that can not be combined with the GNU
13 * GPL, and for taking advantage of the additional benefits of our
14 * support services, please contact Kongsberg Oil & Gas Technologies
15 * about acquiring a Coin Professional Edition License.
16 *
17 * See http://www.coin3d.org/ for more information.
18 *
19 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
20 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
21 *
22\**************************************************************************/
23
24#ifndef COIN_SOVRMLSCRIPT_H
25#define COIN_SOVRMLSCRIPT_H
26
27#include <Inventor/nodes/SoSubNode.h>
28#include <Inventor/fields/SoSFBool.h>
29#include <Inventor/fields/SoMFString.h>
30
31class SoVRMLScript;
32class SoVRMLScriptP;
33class SoSensor;
34
35typedef void SoVRMLScriptEvaluateCB(void * closure, SoVRMLScript * node);
36
37class COIN_DLL_API SoVRMLScript : public SoNode
38{
39 typedef SoNode inherited;
40
41public:
42 static void initClass(void);
43 SoVRMLScript(void);
44
45 static SoType getClassTypeId(void);
46 virtual SoType getTypeId(void) const;
47
48 SoMFString url;
49 SoSFBool directOutput;
50 SoSFBool mustEvaluate;
51
52 virtual void doAction(SoAction * action);
53 virtual void callback(SoCallbackAction * action);
54 virtual void GLRender(SoGLRenderAction * action);
55 virtual void getBoundingBox(SoGetBoundingBoxAction * action);
56 virtual void pick(SoPickAction * action);
57 virtual void handleEvent(SoHandleEventAction * action);
58 virtual void write(SoWriteAction * action);
59
60 static void setScriptEvaluateCB(SoVRMLScriptEvaluateCB * cb,
61 void * closure);
62
63protected:
64 virtual ~SoVRMLScript();
65 virtual void copyContents(const SoFieldContainer * from, SbBool copyconn);
66 virtual void notify(SoNotList * list);
67private:
68 static SoType classTypeId;
69 static void * createInstance(void);
70 SoFieldData * fielddata;
71 virtual const SoFieldData * getFieldData(void) const;
72
73private:
74 virtual SbBool readInstance(SoInput * in, unsigned short flags);
75
76 static void eval_cb(void * data, SoSensor *);
77 void initFieldData(void);
78 SoVRMLScriptP * pimpl;
79 friend class SoVRMLScriptP;
80}; // class SoVRMLScript
81
82#endif // ! COIN_SOVRMLSCRIPT_H
The SoAction class is the base class for all traversal actions.
Definition SoAction.h:68
virtual SoType getTypeId(void) const =0
The SoCallbackAction class invokes callbacks at specific nodes.
Definition SoCallbackAction.h:71
The SoFieldContainer class is a base class for all classes that contain fields.
Definition SoFieldContainer.h:34
virtual const SoFieldData * getFieldData(void) const
Definition SoFieldContainer.cpp:738
The SoFieldData class is a container for a prototype set of fields.
Definition SoFieldData.h:39
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition SoGLRenderAction.h:41
The SoGetBoundingBoxAction class calculates bounding boxes for nodes and subgraphs.
Definition SoGetBoundingBoxAction.h:36
The SoHandleEventAction class distributes user events to the scene.
Definition SoHandleEventAction.h:37
The SoInput class is an abstraction of file import functionality.
Definition SoInput.h:52
The SoMFString class is a container for SbString values.
Definition SoMFString.h:31
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:47
virtual void notify(SoNotList *l)
Definition SoNode.cpp:439
virtual void handleEvent(SoHandleEventAction *action)
Definition SoNode.cpp:1059
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Definition SoNode.cpp:841
virtual void doAction(SoAction *action)
Definition SoNode.cpp:785
virtual void callback(SoCallbackAction *action)
Definition SoNode.cpp:1002
virtual SbBool readInstance(SoInput *in, unsigned short flags)
Definition SoNode.cpp:1466
virtual void copyContents(const SoFieldContainer *from, SbBool copyconnections)
Definition SoNode.cpp:1410
virtual void pick(SoPickAction *action)
Definition SoNode.cpp:1085
virtual void write(SoWriteAction *action)
Definition SoNode.cpp:1217
virtual void GLRender(SoGLRenderAction *action)
Definition SoNode.cpp:930
The SoNotList class is a list of SoNotRec notification records.
Definition SoNotification.h:34
The SoPickAction class is the base class for picking actions.
Definition SoPickAction.h:34
The SoSFBool class is a container for an SbBool value.
Definition SoSFBool.h:30
The SoSensor class is the abstract base class for all sensors.
Definition SoSensor.h:34
The SoType class is the basis for the run-time type system in Coin.
Definition SoType.h:50
The SoVRMLScript class is used to control the scene using scripts.
Definition SoVRMLScript.h:38
The SoWriteAction class writes a scene graph to file.
Definition SoWriteAction.h:33

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.