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

SoDragPointDragger.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_SODRAGPOINTDRAGGER_H 00021 #define COIN_SODRAGPOINTDRAGGER_H 00022 00023 #include <Inventor/draggers/SoDragger.h> 00024 #include <Inventor/fields/SoSFVec3f.h> 00025 00026 class SoSensor; 00027 class SoFieldSensor; 00028 00029 00030 class COIN_DLL_API SoDragPointDragger : public SoDragger { 00031 typedef SoDragger inherited; 00032 00033 SO_KIT_HEADER(SoDragPointDragger); 00034 00035 SO_KIT_CATALOG_ENTRY_HEADER(noRotSep); 00036 SO_KIT_CATALOG_ENTRY_HEADER(planeFeedbackSep); 00037 SO_KIT_CATALOG_ENTRY_HEADER(planeFeedbackSwitch); 00038 SO_KIT_CATALOG_ENTRY_HEADER(planeFeedbackTranslation); 00039 SO_KIT_CATALOG_ENTRY_HEADER(rotX); 00040 SO_KIT_CATALOG_ENTRY_HEADER(rotXSep); 00041 SO_KIT_CATALOG_ENTRY_HEADER(rotY); 00042 SO_KIT_CATALOG_ENTRY_HEADER(rotYSep); 00043 SO_KIT_CATALOG_ENTRY_HEADER(rotZ); 00044 SO_KIT_CATALOG_ENTRY_HEADER(rotZSep); 00045 SO_KIT_CATALOG_ENTRY_HEADER(xFeedback); 00046 SO_KIT_CATALOG_ENTRY_HEADER(xFeedbackSep); 00047 SO_KIT_CATALOG_ENTRY_HEADER(xFeedbackSwitch); 00048 SO_KIT_CATALOG_ENTRY_HEADER(xFeedbackTranslation); 00049 SO_KIT_CATALOG_ENTRY_HEADER(xTranslator); 00050 SO_KIT_CATALOG_ENTRY_HEADER(xTranslatorSwitch); 00051 SO_KIT_CATALOG_ENTRY_HEADER(xyFeedback); 00052 SO_KIT_CATALOG_ENTRY_HEADER(xyTranslator); 00053 SO_KIT_CATALOG_ENTRY_HEADER(xyTranslatorSwitch); 00054 SO_KIT_CATALOG_ENTRY_HEADER(xzFeedback); 00055 SO_KIT_CATALOG_ENTRY_HEADER(xzTranslator); 00056 SO_KIT_CATALOG_ENTRY_HEADER(xzTranslatorSwitch); 00057 SO_KIT_CATALOG_ENTRY_HEADER(yFeedback); 00058 SO_KIT_CATALOG_ENTRY_HEADER(yFeedbackSep); 00059 SO_KIT_CATALOG_ENTRY_HEADER(yFeedbackSwitch); 00060 SO_KIT_CATALOG_ENTRY_HEADER(yFeedbackTranslation); 00061 SO_KIT_CATALOG_ENTRY_HEADER(yTranslator); 00062 SO_KIT_CATALOG_ENTRY_HEADER(yTranslatorSwitch); 00063 SO_KIT_CATALOG_ENTRY_HEADER(yzFeedback); 00064 SO_KIT_CATALOG_ENTRY_HEADER(yzTranslator); 00065 SO_KIT_CATALOG_ENTRY_HEADER(yzTranslatorSwitch); 00066 SO_KIT_CATALOG_ENTRY_HEADER(zFeedback); 00067 SO_KIT_CATALOG_ENTRY_HEADER(zFeedbackSep); 00068 SO_KIT_CATALOG_ENTRY_HEADER(zFeedbackSwitch); 00069 SO_KIT_CATALOG_ENTRY_HEADER(zFeedbackTranslation); 00070 SO_KIT_CATALOG_ENTRY_HEADER(zTranslator); 00071 SO_KIT_CATALOG_ENTRY_HEADER(zTranslatorSwitch); 00072 00073 00074 public: 00075 static void initClass(void); 00076 SoDragPointDragger(void); 00077 00078 void setJumpLimit(const float limit); 00079 float getJumpLimit(void) const; 00080 void showNextDraggerSet(void); 00081 00082 SoSFVec3f translation; 00083 00084 protected: 00085 ~SoDragPointDragger(); 00086 virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE); 00087 virtual void setDefaultOnNonWritingFields(void); 00088 00089 void dragStart(void); 00090 void drag(void); 00091 void dragFinish(void); 00092 00093 static void startCB(void * f, SoDragger * d); 00094 static void motionCB(void * f, SoDragger * d); 00095 static void finishCB(void * f, SoDragger * d); 00096 static void metaKeyChangeCB(void * f, SoDragger * d); 00097 static void fieldSensorCB(void * f, SoSensor * s); 00098 static void valueChangedCB(void * f, SoDragger * d); 00099 00100 SoFieldSensor * fieldSensor; 00101 00102 private: 00103 void registerDragger(SoDragger *dragger); 00104 void unregisterDragger(const char *name); 00105 void updateSwitchNodes(); 00106 int currAxis; 00107 float jumpLimit; 00108 }; 00109 00110 #endif // !COIN_SODRAGPOINTDRAGGER_H

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