IvfWorkspace.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 _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 

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