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

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) by Kongsberg Oil & Gas Technologies.
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 Oil & Gas Technologies
00018  *  about acquiring a Coin Professional Edition License.
00019  *
00020  *  See http://www.coin3d.org/ for more information.
00021  *
00022  *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, 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/SoSFRotation.h>
00030 #include <Inventor/fields/SoSFVec3f.h>
00031 
00032 class SoSensor;
00033 class SoFieldSensor;
00034 class SoTransformBoxDraggerP;
00035 
00036 class COIN_DLL_API SoTransformBoxDragger : public SoDragger {
00037   typedef SoDragger inherited;
00038 
00039   SO_KIT_HEADER(SoTransformBoxDragger);
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 public:
00072   static void initClass(void);
00073   SoTransformBoxDragger(void);
00074 
00075   SoSFRotation rotation;
00076   SoSFVec3f translation;
00077   SoSFVec3f scaleFactor;
00078 
00079 protected:
00080   virtual ~SoTransformBoxDragger(void);
00081   virtual SbBool setUpConnections(SbBool onoff, SbBool doitalways = FALSE);
00082   virtual void setDefaultOnNonWritingFields(void);
00083 
00084   static void invalidateSurroundScaleCB(void * f, SoDragger * d);
00085   static void fieldSensorCB(void * f, SoSensor * s);
00086   static void valueChangedCB(void * f, SoDragger * d);
00087 
00088   SoFieldSensor * rotFieldSensor;
00089   SoFieldSensor * translFieldSensor;
00090   SoFieldSensor * scaleFieldSensor;
00091 
00092 private:
00093   void addChildDragger(SoDragger * child);
00094   void removeChildDragger(SoDragger * child);
00095 
00096 private:
00097   SbLazyPimplPtr<SoTransformBoxDraggerP> pimpl;
00098 
00099   // NOT IMPLEMENTED:
00100   SoTransformBoxDragger(const SoTransformBoxDragger & rhs);
00101   SoTransformBoxDragger & operator = (const SoTransformBoxDragger & rhs);
00102 }; // SoTransformBoxDragger
00103 
00104 #endif // !COIN_SOTRANSFORMBOXDRAGGER_H

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

Generated on Thu Apr 28 2011 03:43:08 for Coin by Doxygen 1.7.4.