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 _CIvfWorkspace_h_
00026 #define _CIvfWorkspace_h_
00027
00028 #include <ivf/IvfSceneBase.h>
00029 #include <ivf/IvfConstructionPlane.h>
00030
00031 IvfSmartPointer(CIvfWorkspace);
00032
00043 class IVF_API CIvfWorkspace : public CIvfSceneBase {
00044 private:
00045 std::vector<CIvfConstructionPlane*> m_workplanes;
00046 CIvfConstructionPlane* m_currentPlane;
00047 CIvfConstructionPlane* m_rootPlane;
00048 int m_currentPlaneIdx;
00049 bool m_usePlanes;
00050 bool m_useCursor;
00051 public:
00052 void disableCursor();
00053 void enableCursor();
00054 double getSize();
00055 bool getUseCursor();
00056 void setUseCursor(bool flag);
00058 CIvfWorkspace();
00059
00061 virtual ~CIvfWorkspace();
00062
00063 IvfClassInfo("CIvfWorkspace",CIvfSceneBase);
00064
00066 void addPlane(CIvfConstructionPlane* plane);
00067
00069 void clearPlanes();
00070
00078 void updateCursor(int x, int y);
00079
00086 void updateSizes();
00087
00089 void setCurrentPlane(int idx);
00090
00092 void nextPlane();
00093
00095 void prevPlane();
00096
00098 void lockCursor();
00099
00101 void unlockCursor();
00102
00104 bool isCursorLocked();
00105
00107 virtual void setView(CIvfView* view);
00108
00110 void setWorkspaceSize(double size);
00111
00113 void setRelativeAxisSize(double size);
00114
00116 void setRelativeCursorSize(double size);
00117
00119 CIvfConstructionPlane* getCurrentPlane();
00120
00122 CIvfVec3d& getCursorPosition();
00123
00124 bool getUsePlanes();
00125 void setUsePlanes(bool flag);
00126
00127 double getWorkspaceSize();
00128
00130 void setSize(double size);
00131
00132 protected:
00133 virtual void createGeometry();
00134 };
00135
00136 #endif