IvfGrid.h

00001 //
00002 // Copyright 1999-2006 by Structural Mechanics, Lund University.
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Library General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Library General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Library General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00017 // USA.
00018 //
00019 // Please report all bugs and problems to "ivf@byggmek.lth.se".
00020 //
00021 //
00022 // Written by Jonas Lindemann
00023 //
00024 
00025 #ifndef _CIvfGrid_h_
00026 #define _CIvfGrid_h_
00027 
00028 #include <ivf/IvfShape.h>
00029 #include <ivf/IvfLineSet.h>
00030 #include <ivf/IvfQuadSet.h>
00031 #include <ivf/IvfAxis.h>
00032 
00033 #include <ivfmath/IvfPoint3d.h>
00034 
00035 IvfSmartPointer(CIvfGrid);
00036 
00043 class IVF_API CIvfGrid : public CIvfShape {
00044 private:
00045         CIvfPoint3d m_p1;
00046         CIvfPoint3d m_p2;
00047 
00048         CIvfLineSet* m_corners;
00049         CIvfLineSet* m_outline;
00050         CIvfLineSet* m_gridLines;
00051         CIvfQuadSet* m_surface;
00052         CIvfAxis*        m_axis;
00053 
00054         double m_gridSpacing;
00055 
00056         bool m_useSurface;
00057         bool m_useGrid;
00058         bool m_useOutline;
00059         bool m_useCorners;
00060         bool m_useAxis;
00061 
00062         int m_gridInterval;
00063 
00064         void initGrid();
00065         bool isRoughly(double x, double value);
00066 public:
00068         CIvfGrid();
00069 
00071         virtual ~CIvfGrid();
00072 
00073         IvfClassInfo("CIvfGrid",CIvfShape);
00074 
00081         void setUseAxis(bool flag);
00082 
00089         void setUseGrid(bool flag);
00090 
00097         void setUseOutline(bool flag);
00098 
00105         void setUseCorners(bool flag);
00106 
00113         void setUseSurface(bool flag);
00114 
00116         void setGridSpacing(double spacing);
00117 
00119         void setSize(double width, double height);
00120 
00122         void setAxisSize(double size);
00123 
00125         virtual void refresh();
00126 
00128         virtual void updateBoundingSphere();
00129 
00131         CIvfAxis* getAxisShape();
00132 
00134         void setGridInterval(int interval);
00135 protected:
00136         virtual void createGeometry();
00137 };
00138 
00139 #endif 

Generated on Fri Sep 1 15:36:45 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO