![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_SODRAGPOINTDRAGGER_H 00002 #define COIN_SODRAGPOINTDRAGGER_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) 1998-2008 by Kongsberg SIM. All rights reserved. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Kongsberg SIM about acquiring 00018 * a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Kongsberg SIM, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/draggers/SoDragger.h> 00028 #include <Inventor/tools/SbLazyPimplPtr.h> 00029 #include <Inventor/fields/SoSFVec3f.h> 00030 00031 class SoSensor; 00032 class SoFieldSensor; 00033 class SoDragPointDraggerP; 00034 00035 class COIN_DLL_API SoDragPointDragger : public SoDragger { 00036 typedef SoDragger inherited; 00037 00038 SO_KIT_HEADER(SoDragPointDragger); 00039 SO_KIT_CATALOG_ENTRY_HEADER(noRotSep); 00040 SO_KIT_CATALOG_ENTRY_HEADER(planeFeedbackSep); 00041 SO_KIT_CATALOG_ENTRY_HEADER(planeFeedbackSwitch); 00042 SO_KIT_CATALOG_ENTRY_HEADER(planeFeedbackTranslation); 00043 SO_KIT_CATALOG_ENTRY_HEADER(rotX); 00044 SO_KIT_CATALOG_ENTRY_HEADER(rotXSep); 00045 SO_KIT_CATALOG_ENTRY_HEADER(rotY); 00046 SO_KIT_CATALOG_ENTRY_HEADER(rotYSep); 00047 SO_KIT_CATALOG_ENTRY_HEADER(rotZ); 00048 SO_KIT_CATALOG_ENTRY_HEADER(rotZSep); 00049 SO_KIT_CATALOG_ENTRY_HEADER(xFeedback); 00050 SO_KIT_CATALOG_ENTRY_HEADER(xFeedbackSep); 00051 SO_KIT_CATALOG_ENTRY_HEADER(xFeedbackSwitch); 00052 SO_KIT_CATALOG_ENTRY_HEADER(xFeedbackTranslation); 00053 SO_KIT_CATALOG_ENTRY_HEADER(xTranslator); 00054 SO_KIT_CATALOG_ENTRY_HEADER(xTranslatorSwitch); 00055 SO_KIT_CATALOG_ENTRY_HEADER(xyFeedback); 00056 SO_KIT_CATALOG_ENTRY_HEADER(xyTranslator); 00057 SO_KIT_CATALOG_ENTRY_HEADER(xyTranslatorSwitch); 00058 SO_KIT_CATALOG_ENTRY_HEADER(xzFeedback); 00059 SO_KIT_CATALOG_ENTRY_HEADER(xzTranslator); 00060 SO_KIT_CATALOG_ENTRY_HEADER(xzTranslatorSwitch); 00061 SO_KIT_CATALOG_ENTRY_HEADER(yFeedback); 00062 SO_KIT_CATALOG_ENTRY_HEADER(yFeedbackSep); 00063 SO_KIT_CATALOG_ENTRY_HEADER(yFeedbackSwitch); 00064 SO_KIT_CATALOG_ENTRY_HEADER(yFeedbackTranslation); 00065 SO_KIT_CATALOG_ENTRY_HEADER(yTranslator); 00066 SO_KIT_CATALOG_ENTRY_HEADER(yTranslatorSwitch); 00067 SO_KIT_CATALOG_ENTRY_HEADER(yzFeedback); 00068 SO_KIT_CATALOG_ENTRY_HEADER(yzTranslator); 00069 SO_KIT_CATALOG_ENTRY_HEADER(yzTranslatorSwitch); 00070 SO_KIT_CATALOG_ENTRY_HEADER(zFeedback); 00071 SO_KIT_CATALOG_ENTRY_HEADER(zFeedbackSep); 00072 SO_KIT_CATALOG_ENTRY_HEADER(zFeedbackSwitch); 00073 SO_KIT_CATALOG_ENTRY_HEADER(zFeedbackTranslation); 00074 SO_KIT_CATALOG_ENTRY_HEADER(zTranslator); 00075 SO_KIT_CATALOG_ENTRY_HEADER(zTranslatorSwitch); 00076 00077 public: 00078 static void initClass(void); 00079 SoDragPointDragger(void); 00080 00081 SoSFVec3f translation; 00082 00083 void setJumpLimit(const float limit); 00084 float getJumpLimit(void) const; 00085 void showNextDraggerSet(void); 00086 00087 protected: 00088 virtual ~SoDragPointDragger(void); 00089 virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE); 00090 virtual void setDefaultOnNonWritingFields(void); 00091 00092 void dragStart(void); 00093 void drag(void); 00094 void dragFinish(void); 00095 00096 static void startCB(void * f, SoDragger * d); 00097 static void motionCB(void * f, SoDragger * d); 00098 static void finishCB(void * f, SoDragger * d); 00099 static void metaKeyChangeCB(void * f, SoDragger * d); 00100 static void fieldSensorCB(void * f, SoSensor * s); 00101 static void valueChangedCB(void * f, SoDragger * d); 00102 00103 SoFieldSensor * fieldSensor; 00104 00105 private: 00106 void registerDragger(SoDragger *dragger); 00107 void unregisterDragger(const char *name); 00108 void updateSwitchNodes(); 00109 int currAxis; 00110 float jumpLimit; 00111 00112 private: 00113 SbLazyPimplPtr<SoDragPointDraggerP> pimpl; 00114 00115 // NOT IMPLEMENTED: 00116 SoDragPointDragger(const SoDragPointDragger & rhs); 00117 SoDragPointDragger & operator = (const SoDragPointDragger & rhs); 00118 }; // SoDragPointDragger 00119 00120 #endif // !COIN_SODRAGPOINTDRAGGER_H
Copyright © 1998-2008 by Kongsberg SIM. All rights reserved.
Generated on Sat Nov 8 00:38:06 2008 for Coin by Doxygen 1.5.6.