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

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:
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 
104  static void fieldSensorCB(void *, SoSensor *);
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
SoBaseKit::copyContents
virtual void copyContents(const SoFieldContainer *fromfc, SbBool copyconnections)
Definition: SoBaseKit.cpp:1572
SbName
The SbName class stores strings by reference.
Definition: SbName.h:31
SoBaseKit::setDefaultOnNonWritingFields
virtual void setDefaultOnNonWritingFields(void)
Definition: SoBaseKit.cpp:1283
SoSensor
The SoSensor class is the abstract base class for all sensors.
Definition: SoSensor.h:34
SoBaseKit::setUpConnections
virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways=FALSE)
Definition: SoBaseKit.cpp:2050
SoBaseKit::readInstance
virtual SbBool readInstance(SoInput *in, unsigned short flags)
Definition: SoBaseKit.cpp:2057
SoPath
The SoPath class is a container class for traversal path descriptions.
Definition: SoPath.h:43
SoSFEnum
The SoSFEnum class is a container for an enum value.
Definition: SoSFEnum.h:31
SoInteractionKit::CacheEnabled
CacheEnabled
Definition: SoInteractionKit.h:59
SoBase
The SoBase class is the top-level superclass for a number of class-hierarchies.
Definition: SoBase.h:36
SoFieldContainer
The SoFieldContainer class is a base class for all classes that contain fields.
Definition: SoFieldContainer.h:34
SoInteractionKit::boundingBoxCaching
SoSFEnum boundingBoxCaching
Definition: SoInteractionKit.h:51
SoInteractionKit::renderCulling
SoSFEnum renderCulling
Definition: SoInteractionKit.h:52
SoInteractionKit::pickCulling
SoSFEnum pickCulling
Definition: SoInteractionKit.h:53
SoInteractionKit::renderCaching
SoSFEnum renderCaching
Definition: SoInteractionKit.h:50
SoFieldSensor
The SoFieldSensor class detects changes to a field.
Definition: SoFieldSensor.h:29
SoInteractionKit
The SoInteractionKit class is a base class for draggers.
Definition: SoInteractionKit.h:41
SoSeparator
The SoSeparator class is a state-preserving group node.
Definition: SoSeparator.h:35
SoInput
The SoInput class is an abstraction of file import functionality.
Definition: SoInput.h:52
SoBaseKit
The SoBaseKit class is the toplevel superclass for nodekits.
Definition: SoBaseKit.h:57
SoInteractionKit::oldTopSep
SoSeparator * oldTopSep
Definition: SoInteractionKit.h:105
SoNode
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:47
SoInteractionKit::fieldSensor
SoFieldSensor * fieldSensor
Definition: SoInteractionKit.h:103
SoBaseKit::setPart
virtual SbBool setPart(const SbName &partname, SoNode *from)
Definition: SoBaseKit.cpp:799

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

Generated on Mon Jan 27 2020 23:41:05 for Coin by Doxygen 1.8.17.