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

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

- File List
- File Members

SoInteractionKit.h
1 #ifndef COIN_SOINTERACTIONKIT_H
2 #define COIN_SOINTERACTIONKIT_H
3
4 /**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25 \**************************************************************************/
26
27 #include <Inventor/nodekits/SoSubKit.h>
28 #include <Inventor/nodekits/SoBaseKit.h>
29 #include <Inventor/fields/SoSFEnum.h>
30
31 #ifdef COIN_INTERNAL
32 class SoFieldSensor;
33 #else // !COIN_INTERNAL
34 // Include this header file for better Open Inventor compatibility.
35 #include <Inventor/sensors/SoFieldSensor.h>
36 #endif // !COIN_INTERNAL
37
38 class SoSensor;
39 class SoSeparator;
40
41 class COIN_DLL_API SoInteractionKit : public SoBaseKit {
42 typedef SoBaseKit inherited;
43
44 SO_KIT_HEADER(SoInteractionKit);
45
46 SO_KIT_CATALOG_ENTRY_HEADER(geomSeparator);
47 SO_KIT_CATALOG_ENTRY_HEADER(topSeparator);
48
49 public:
50 SoSFEnum renderCaching;
51 SoSFEnum boundingBoxCaching;
52 SoSFEnum renderCulling;
53 SoSFEnum pickCulling;
54
55 public:
56 SoInteractionKit(void);
57 static void initClass(void);
58
59 enum CacheEnabled { OFF, ON, AUTO };
60
61 virtual SbBool setPartAsPath(const SbName &partname,
62 SoPath *path);
63 virtual SbBool setPartAsDefault(const SbName &partname,
64 SoNode *node,
65 SbBool onlyifdefault = TRUE);
66 virtual SbBool setPartAsDefault(const SbName &partname,
67 const SbName &nodename,
68 SbBool onlyifdefault = TRUE);
69 SbBool isPathSurrogateInMySubgraph(const SoPath *path,
70 SoPath *&pathToOwner,
71 SbName &surrogatename,
72 SoPath *&surrogatepath,
73 SbBool fillargs = TRUE);
74 SbBool isPathSurrogateInMySubgraph(const SoPath *path);
75 static void setSwitchValue(SoNode *node, const int newVal);
76 virtual SbBool setPart(const SbName & partname, SoNode * from);
77
78 protected:
79 virtual ~SoInteractionKit();
80 virtual void copyContents(const SoFieldContainer *fromFC,
81 SbBool copyConnections);
82
83 virtual SbBool setPart(const int partNum, SoNode *node);
84 virtual SbBool readInstance(SoInput *in, unsigned short flags);
85 static void readDefaultParts(const char *fileName,
86 const char defaultBuffer[],
87 int defBufSize);
88 virtual SbBool setAnyPartAsDefault(const SbName &partname,
89 SoNode *node,
90 SbBool anypart = TRUE,
91 SbBool onlyifdefault = TRUE);
92 virtual SbBool setAnyPartAsDefault(const SbName &partname,
93 const SbName &nodename,
94 SbBool anypart = TRUE,
95 SbBool onlyifdefault = TRUE);
96 SbBool setAnySurrogatePath(const SbName &name,
97 SoPath *path,
98 SbBool leafcheck = FALSE,
99 SbBool publiccheck = FALSE);
100 virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE);
101 virtual void setDefaultOnNonWritingFields();
102
103 SoFieldSensor *fieldSensor;
104 static void fieldSensorCB(void *, SoSensor *);
105 SoSeparator *oldTopSep;
106
107 void connectSeparatorFields( SoSeparator *dest, SbBool onOff );
108
109 private:
110 class SoInteractionKitP * pimpl;
111 friend class SoInteractionKitP;
112 };
113
114 #endif // !COIN_SOINTERACTIONKIT_H

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