SoAxisCrossKit.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2010 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 #ifndef GUI_SOSHAPESCALE_H
00025 #define GUI_SOSHAPESCALE_H
00026 
00027 #include <Inventor/nodekits/SoSubKit.h>
00028 #include <Inventor/nodekits/SoBaseKit.h>
00029 #include <Inventor/fields/SoSFFloat.h>
00030 
00031 class SbViewport;
00032 class SoState;
00033 class SbColor;
00034 class SbVec2s;
00035 
00036 namespace Gui {
00037 class GuiExport SoShapeScale : public SoBaseKit {
00038     typedef SoBaseKit inherited;
00039 
00040     SO_KIT_HEADER(SoShapeScale);
00041 
00042     SO_KIT_CATALOG_ENTRY_HEADER(topSeparator);
00043     SO_KIT_CATALOG_ENTRY_HEADER(scale);
00044     SO_KIT_CATALOG_ENTRY_HEADER(shape);
00045 
00046 public:
00047     SoShapeScale(void);
00048     static void initClass(void);
00049 
00050     SoSFFloat active;
00051     SoSFFloat scaleFactor;
00052 
00053 protected:
00054     virtual void GLRender(SoGLRenderAction * action);
00055     virtual ~SoShapeScale();
00056 };
00057 
00058 class GuiExport SoAxisCrossKit : public SoBaseKit {
00059     typedef SoBaseKit inherited;
00060 
00061     SO_KIT_HEADER(SoAxisCrossKit);
00062 
00063     SO_KIT_CATALOG_ENTRY_HEADER(xAxis);
00064     SO_KIT_CATALOG_ENTRY_HEADER(xHead);
00065     SO_KIT_CATALOG_ENTRY_HEADER(yAxis);
00066     SO_KIT_CATALOG_ENTRY_HEADER(yHead);
00067     SO_KIT_CATALOG_ENTRY_HEADER(zAxis);
00068     SO_KIT_CATALOG_ENTRY_HEADER(zHead);
00069 
00070 public:
00071     SoAxisCrossKit();
00072 
00073     // Overrides default method. All the parts are shapeKits,
00074     // so this node will not affect the state.
00075     virtual SbBool affectsState() const;
00076     virtual void addWriteReference(SoOutput * out, SbBool isfromfield = FALSE);
00077     virtual void getBoundingBox(SoGetBoundingBoxAction * action);
00078 
00079     static void initClass();
00080 
00081 private:
00082     // Constructor calls to build and set up parts.
00083     void createAxes();
00084     virtual ~SoAxisCrossKit();
00085 };
00086 
00087 } // namespace Gui
00088 
00089 #endif // GUI_SOSHAPESCALE_H

Generated on Wed Nov 23 19:00:38 2011 for FreeCAD by  doxygen 1.6.1