| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

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
31 class SoVRMLScript;
32 class SoVRMLScriptP;
33 class SoSensor;
34
35 typedef void SoVRMLScriptEvaluateCB(void * closure, SoVRMLScript * node);
36
37 class COIN_DLL_API SoVRMLScript : public SoNode
38 {
39 typedef SoNode inherited;
40
41 public:
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
63 protected:
64 virtual ~SoVRMLScript();
65 virtual void copyContents(const SoFieldContainer * from, SbBool copyconn);
66 virtual void notify(SoNotList * list);
67 private:
68 static SoType classTypeId;
69 static void * createInstance(void);
70 SoFieldData * fielddata;
71 virtual const SoFieldData * getFieldData(void) const;
72
73 private:
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

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