SoInteractionKit.h Source File

| 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
SoBase
The SoBase class is the top-level superclass for a number of class-hierarchies.SoBase provides the ba...
Definition: SoBase.h:36
SoBaseKit
The SoBaseKit class is the toplevel superclass for nodekits.Node kits are collections of nodes and ot...
Definition: SoBaseKit.h:57
SoInteractionKit::fieldSensor
SoFieldSensor * fieldSensor
Definition: SoInteractionKit.h:103
SoBaseKit::setPart
virtual SbBool setPart(const SbName &partname, SoNode *from)
Definition: SoBaseKit.cpp:799
SoFieldContainer
The SoFieldContainer class is a base class for all classes that contain fields.The classes containing...
Definition: SoFieldContainer.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
SoInteractionKit::CacheEnabled
CacheEnabled
Definition: SoInteractionKit.h:59
SoSFEnum
The SoSFEnum class is a container for an enum value.This field is used where nodes, engines or other field containers needs to store one particular value out of an enumerated set.
Definition: SoSFEnum.h:31
SoBaseKit::setDefaultOnNonWritingFields
virtual void setDefaultOnNonWritingFields(void)
Definition: SoBaseKit.cpp:1283
SoInteractionKit
The SoInteractionKit class is a base class for draggers.This nodekit class makes it possible to set s...
Definition: SoInteractionKit.h:41
SoBaseKit::copyContents
virtual void copyContents(const SoFieldContainer *fromfc, SbBool copyconnections)
Definition: SoBaseKit.cpp:1572
SoPath
The SoPath class is a container class for traversal path descriptions.SoPath objects contain a list o...
Definition: SoPath.h:43
SoSensor
The SoSensor class is the abstract base class for all sensors.Sensors is a mechanism in Coin for sche...
Definition: SoSensor.h:34
SoBaseKit::readInstance
virtual SbBool readInstance(SoInput *in, unsigned short flags)
Definition: SoBaseKit.cpp:2057
SoFieldSensor
The SoFieldSensor class detects changes to a field.Attach a field to a sensor of this type to put it ...
Definition: SoFieldSensor.h:29
SoInteractionKit::boundingBoxCaching
SoSFEnum boundingBoxCaching
Definition: SoInteractionKit.h:51
SoInteractionKit::pickCulling
SoSFEnum pickCulling
Definition: SoInteractionKit.h:53
SoBaseKit::setUpConnections
virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways=FALSE)
Definition: SoBaseKit.cpp:2050
SoInput
The SoInput class is an abstraction of file import functionality.This class takes care of most of the...
Definition: SoInput.h:52
SoInteractionKit::renderCulling
SoSFEnum renderCulling
Definition: SoInteractionKit.h:52
SoSeparator
The SoSeparator class is a state-preserving group node.Subgraphs parented by SoSeparator nodes will n...
Definition: SoSeparator.h:35
SoInteractionKit::renderCaching
SoSFEnum renderCaching
Definition: SoInteractionKit.h:50
SoInteractionKit::oldTopSep
SoSeparator * oldTopSep
Definition: SoInteractionKit.h:105
SbName
The SbName class stores strings by reference.The class is used by Coin for storing keywords...
Definition: SbName.h:31

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