# SoTransformBoxDragger.h

    00001 #ifndef COIN_SOTRANSFORMBOXDRAGGER_H
    00002 #define COIN_SOTRANSFORMBOXDRAGGER_H
    00003
    00004 /**************************************************************************\
    00005  *
    00006  *  This file is part of the Coin 3D visualization library.
    00007  *  Copyright (C) 1998-2003 by Systems in Motion.  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 Systems in Motion about acquiring
    00018  *  a Coin Professional Edition License.
    00019  *
    00020  *  See <URL:http://www.coin3d.org> for  more information.
    00021  *
    00022  *  Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY.
    00023  *  <URL:http://www.sim.no>.
    00024  *
    00025 \**************************************************************************/
    00026
    00027 #include <Inventor/draggers/SoDragger.h>
    00028 #include <Inventor/fields/SoSFRotation.h>
    00029 #include <Inventor/fields/SoSFVec3f.h>
    00030
    00031 class SoSensor;
    00032 class SoFieldSensor;
    00033
    00034
    00035 class COIN_DLL_API SoTransformBoxDragger : public SoDragger {
    00036   typedef SoDragger inherited;
    00037
    00038   SO_KIT_HEADER(SoTransformBoxDragger);
    00039
    00040   SO_KIT_CATALOG_ENTRY_HEADER(antiSquish);
    00041   SO_KIT_CATALOG_ENTRY_HEADER(rotator1);
    00042   SO_KIT_CATALOG_ENTRY_HEADER(rotator1Rot);
    00043   SO_KIT_CATALOG_ENTRY_HEADER(rotator1Sep);
    00044   SO_KIT_CATALOG_ENTRY_HEADER(rotator2);
    00045   SO_KIT_CATALOG_ENTRY_HEADER(rotator2Rot);
    00046   SO_KIT_CATALOG_ENTRY_HEADER(rotator2Sep);
    00047   SO_KIT_CATALOG_ENTRY_HEADER(rotator3);
    00048   SO_KIT_CATALOG_ENTRY_HEADER(rotator3Rot);
    00049   SO_KIT_CATALOG_ENTRY_HEADER(rotator3Sep);
    00050   SO_KIT_CATALOG_ENTRY_HEADER(scaler);
    00051   SO_KIT_CATALOG_ENTRY_HEADER(surroundScale);
    00052   SO_KIT_CATALOG_ENTRY_HEADER(translator1);
    00053   SO_KIT_CATALOG_ENTRY_HEADER(translator1Rot);
    00054   SO_KIT_CATALOG_ENTRY_HEADER(translator1Sep);
    00055   SO_KIT_CATALOG_ENTRY_HEADER(translator2);
    00056   SO_KIT_CATALOG_ENTRY_HEADER(translator2Rot);
    00057   SO_KIT_CATALOG_ENTRY_HEADER(translator2Sep);
    00058   SO_KIT_CATALOG_ENTRY_HEADER(translator3);
    00059   SO_KIT_CATALOG_ENTRY_HEADER(translator3Rot);
    00060   SO_KIT_CATALOG_ENTRY_HEADER(translator3Sep);
    00061   SO_KIT_CATALOG_ENTRY_HEADER(translator4);
    00062   SO_KIT_CATALOG_ENTRY_HEADER(translator4Rot);
    00063   SO_KIT_CATALOG_ENTRY_HEADER(translator4Sep);
    00064   SO_KIT_CATALOG_ENTRY_HEADER(translator5);
    00065   SO_KIT_CATALOG_ENTRY_HEADER(translator5Rot);
    00066   SO_KIT_CATALOG_ENTRY_HEADER(translator5Sep);
    00067   SO_KIT_CATALOG_ENTRY_HEADER(translator6);
    00068   SO_KIT_CATALOG_ENTRY_HEADER(translator6Rot);
    00069   SO_KIT_CATALOG_ENTRY_HEADER(translator6Sep);
    00070
    00071
    00072 public:
    00073   static void initClass(void);
    00074   SoTransformBoxDragger(void);
    00075
    00076   SoSFRotation rotation;
    00077   SoSFVec3f translation;
    00078   SoSFVec3f scaleFactor;
    00079
    00080 protected:
    00081   ~SoTransformBoxDragger();
    00082   virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE);
    00083   virtual void setDefaultOnNonWritingFields(void);
    00084
    00085   static void invalidateSurroundScaleCB(void * f, SoDragger * d);
    00086   static void fieldSensorCB(void * f, SoSensor * s);
    00087   static void valueChangedCB(void * f, SoDragger * d);
    00088
    00089   SoFieldSensor * rotFieldSensor;
    00090   SoFieldSensor * translFieldSensor;
    00091   SoFieldSensor * scaleFieldSensor;
    00092
    00093 private:
    00094   void addChildDragger(SoDragger * child);
    00095   void removeChildDragger(SoDragger * child);
    00096 };
    00097
    00098 #endif // !COIN_SOTRANSFORMBOXDRAGGER_H