| 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
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
SoNode::copyContents
virtual void copyContents(const SoFieldContainer *from, SbBool copyconnections)
Definition: SoNode.cpp:1410
SoNode::notify
virtual void notify(SoNotList *l)
Definition: SoNode.cpp:439
SoFieldContainer
The SoFieldContainer class is a base class for all classes that contain fields.The classes containing...
Definition: SoFieldContainer.h:34
SoBase::getTypeId
virtual SoType getTypeId(void) const =0
SoPickAction
The SoPickAction class is the base class for picking actions.The basis for all interaction features t...
Definition: SoPickAction.h:34
SoNode
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:47
SoFieldContainer::getFieldData
virtual const SoFieldData * getFieldData(void) const
Definition: SoFieldContainer.cpp:738
SoSFBool
The SoSFBool class is a container for an SbBool value.This field is used where nodes, engines or other field containers needs to store a boolean on/off or TRUE/FALSE value, like for instance as the "on" field of the SoPointLight, SoSpotLight and SoDirectionalLight node classes.
Definition: SoSFBool.h:30
SoSensor
The SoSensor class is the abstract base class for all sensors.Sensors is a mechanism in Coin for sche...
Definition: SoSensor.h:34
SoNode::readInstance
virtual SbBool readInstance(SoInput *in, unsigned short flags)
Definition: SoNode.cpp:1466
SoAction
The SoAction class is the base class for all traversal actions.Applying actions is the basic mechanis...
Definition: SoAction.h:68
SoMFString
The SoMFString class is a container for SbString values.This field is used where nodes, engines or other field containers needs to store arrays of strings.
Definition: SoMFString.h:31
SoNode::pick
virtual void pick(SoPickAction *action)
Definition: SoNode.cpp:1085
SoNode::doAction
virtual void doAction(SoAction *action)
Definition: SoNode.cpp:785
SoHandleEventAction
The SoHandleEventAction class distributes user events to the scene.This is the action used by the GUI...
Definition: SoHandleEventAction.h:37
SoGetBoundingBoxAction
The SoGetBoundingBoxAction class calculates bounding boxes for nodes and subgraphs.If this action is applied to a path or scene graph root, it will calculate the bounding box and the center point of the geometry contained within the scene.
Definition: SoGetBoundingBoxAction.h:36
SoCallbackAction
The SoCallbackAction class invokes callbacks at specific nodes.This action has mechanisms for trackin...
Definition: SoCallbackAction.h:71
SoWriteAction
The SoWriteAction class writes a scene graph to file.When applied to a scene, this action writes its ...
Definition: SoWriteAction.h:33
SoInput
The SoInput class is an abstraction of file import functionality.This class takes care of most of the...
Definition: SoInput.h:52
SoNode::getBoundingBox
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
Definition: SoNode.cpp:841
SoFieldData
The SoFieldData class is a container for a prototype set of fields.This class is instantiated once fo...
Definition: SoFieldData.h:39
SoNode::GLRender
virtual void GLRender(SoGLRenderAction *action)
Definition: SoNode.cpp:930
SoNotList
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:34
SoType
The SoType class is the basis for the run-time type system in Coin.Many of the classes in the Coin li...
Definition: SoType.h:50
SoNode::write
virtual void write(SoWriteAction *action)
Definition: SoNode.cpp:1217
SoNode::callback
virtual void callback(SoCallbackAction *action)
Definition: SoNode.cpp:1002
SoVRMLScript
The SoVRMLScript class is used to control the scene using scripts.The detailed class documentation is...
Definition: SoVRMLScript.h:37
SoNode::handleEvent
virtual void handleEvent(SoHandleEventAction *action)
Definition: SoNode.cpp:1059
SoGLRenderAction
The SoGLRenderAction class renders the scene graph with OpenGL calls.Applying this method at a root n...
Definition: SoGLRenderAction.h:41

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