![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_SOCLIPPLANEMANIP_H 00002 #define COIN_SOCLIPPLANEMANIP_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/nodes/SoClipPlane.h> 00028 #include <Inventor/tools/SbLazyPimplPtr.h> 00029 #include <Inventor/fields/SoSFVec3f.h> 00030 00031 class SbBox3f; 00032 class SoChildList; 00033 class SoDragger; 00034 class SoFieldSensor; 00035 class SoPath; 00036 class SoSensor; 00037 00038 class SoClipPlaneManipP; 00039 00040 class COIN_DLL_API SoClipPlaneManip : public SoClipPlane { 00041 typedef SoClipPlane inherited; 00042 00043 SO_NODE_HEADER(SoClipPlaneManip); 00044 00045 public: 00046 static void initClass(void); 00047 SoClipPlaneManip(void); 00048 00049 SoDragger * getDragger(void); 00050 void setValue(const SbBox3f & box, const SbVec3f & planenormal, 00051 float draggerscalefactor); 00052 SbBool replaceNode(SoPath * p); 00053 SbBool replaceManip(SoPath * p, SoClipPlane * newone) const; 00054 00055 virtual void doAction(SoAction * action); 00056 virtual void callback(SoCallbackAction * action); 00057 virtual void GLRender(SoGLRenderAction * action); 00058 virtual void getBoundingBox(SoGetBoundingBoxAction * action); 00059 virtual void getMatrix(SoGetMatrixAction * action); 00060 virtual void handleEvent(SoHandleEventAction * action); 00061 virtual void pick(SoPickAction * action); 00062 virtual void search(SoSearchAction * action); 00063 00064 virtual SoChildList * getChildren(void) const; 00065 00066 SoSFVec3f draggerPosition; 00067 00068 protected: 00069 virtual ~SoClipPlaneManip(void); 00070 00071 void setDragger(SoDragger * newdragger); 00072 00073 virtual void copyContents(const SoFieldContainer * fromfc, SbBool copyconnections); 00074 static void valueChangedCB(void * f, SoDragger * d); 00075 static void fieldSensorCB(void * f, SoSensor * d); 00076 static void transferFieldValues(const SoClipPlane * from, SoClipPlane * to); 00077 00078 SoFieldSensor * planeFieldSensor; 00079 SoFieldSensor * onFieldSensor; 00080 SoFieldSensor * draggerPosFieldSensor; 00081 SoChildList * children; 00082 00083 private: 00084 int currAxis; 00085 void attachSensors(const SbBool onoff); 00086 00087 private: 00088 SbLazyPimplPtr<SoClipPlaneManipP> pimpl; 00089 00090 // NOT IMPLEMENTED: 00091 SoClipPlaneManip(const SoClipPlaneManip & rhs); 00092 SoClipPlaneManip & operator = (const SoClipPlaneManip & rhs); 00093 }; // SoClipPlaneManip 00094 00095 #endif // !COIN_SOCLIPPLANEMANIP_H
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated on Mon May 10 00:34:50 2010 for Coin by Doxygen 1.6.3.