00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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