Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

SoInteractionKit.h

00001 /**************************************************************************\ 00002 * 00003 * This file is part of the Coin 3D visualization library. 00004 * Copyright (C) 1998-2003 by Systems in Motion. All rights reserved. 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public License 00008 * version 2.1 as published by the Free Software Foundation. See the 00009 * file LICENSE.LGPL at the root directory of the distribution for 00010 * more details. 00011 * 00012 * If you want to use Coin for applications not compatible with the 00013 * LGPL, please contact SIM to acquire a Professional Edition license. 00014 * 00015 * Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY 00016 * http://www.sim.no support@sim.no Voice: +47 22114160 Fax: +47 22207097 00017 * 00018 \**************************************************************************/ 00019 00020 #ifndef COIN_SOINTERACTIONKIT_H 00021 #define COIN_SOINTERACTIONKIT_H 00022 00023 #include <Inventor/nodekits/SoSubKit.h> 00024 #include <Inventor/nodekits/SoBaseKit.h> 00025 #include <Inventor/fields/SoSFEnum.h> 00026 00027 #ifdef COIN_INTERNAL 00028 class SoFieldSensor; 00029 #else // !COIN_INTERNAL 00030 // Include this header file for better Open Inventor compatibility. 00031 #include <Inventor/sensors/SoFieldSensor.h> 00032 #endif // !COIN_INTERNAL 00033 00034 class SoSensor; 00035 class SoSeparator; 00036 00037 00038 class COIN_DLL_API SoInteractionKit : public SoBaseKit { 00039 typedef SoBaseKit inherited; 00040 00041 SO_KIT_HEADER(SoInteractionKit); 00042 00043 SO_KIT_CATALOG_ENTRY_HEADER(geomSeparator); 00044 SO_KIT_CATALOG_ENTRY_HEADER(topSeparator); 00045 00046 public: 00047 SoSFEnum renderCaching; 00048 SoSFEnum boundingBoxCaching; 00049 SoSFEnum renderCulling; 00050 SoSFEnum pickCulling; 00051 00052 public: 00053 SoInteractionKit(void); 00054 static void initClass(void); 00055 00056 enum CacheEnabled { OFF, ON, AUTO }; 00057 00058 virtual SbBool setPartAsPath(const SbName &partname, 00059 SoPath *path); 00060 virtual SbBool setPartAsDefault(const SbName &partname, 00061 SoNode *node, 00062 SbBool onlyifdefault = TRUE); 00063 virtual SbBool setPartAsDefault(const SbName &partname, 00064 const SbName &nodename, 00065 SbBool onlyifdefault = TRUE); 00066 SbBool isPathSurrogateInMySubgraph(const SoPath *path, 00067 SoPath *&pathToOwner, 00068 SbName &surrogatename, 00069 SoPath *&surrogatepath, 00070 SbBool fillargs = TRUE); 00071 SbBool isPathSurrogateInMySubgraph(const SoPath *path); 00072 static void setSwitchValue(SoNode *node, const int newVal); 00073 virtual SbBool setPart(const SbName & partname, SoNode * from); 00074 00075 protected: 00076 virtual ~SoInteractionKit(); 00077 virtual void copyContents(const SoFieldContainer *fromFC, 00078 SbBool copyConnections); 00079 00080 virtual SbBool setPart(const int partNum, SoNode *node); 00081 virtual SbBool readInstance(SoInput *in, unsigned short flags); 00082 static void readDefaultParts(const char *fileName, 00083 const char defaultBuffer[], 00084 int defBufSize); 00085 virtual SbBool setAnyPartAsDefault(const SbName &partname, 00086 SoNode *node, 00087 SbBool anypart = TRUE, 00088 SbBool onlyifdefault = TRUE); 00089 virtual SbBool setAnyPartAsDefault(const SbName &partname, 00090 const SbName &nodename, 00091 SbBool anypart = TRUE, 00092 SbBool onlyifdefault = TRUE); 00093 SbBool setAnySurrogatePath(const SbName &name, 00094 SoPath *path, 00095 SbBool leafcheck = FALSE, 00096 SbBool publiccheck = FALSE); 00097 virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE); 00098 virtual void setDefaultOnNonWritingFields(); 00099 00100 SoFieldSensor *fieldSensor; 00101 static void fieldSensorCB(void *, SoSensor *); 00102 SoSeparator *oldTopSep; 00103 00104 void connectSeparatorFields( SoSeparator *dest, SbBool onOff ); 00105 00106 private: 00107 class SoInteractionKitP * pimpl; 00108 friend class SoInteractionKitP; 00109 }; 00110 00111 #endif // !COIN_SOINTERACTIONKIT_H

Generated on Tue Jul 27 23:53:01 2004 for Coin by doxygen 1.3.7