IvfOldScene.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 _CIvfOldScene_h_
00026 #define _CIvfOldScene_h_
00027 
00028 #include <ivf/ivfconfig.h>
00029 
00030 namespace std {};
00031 using namespace std;
00032 
00033 #include <ivf/IvfSelectComposite.h>
00034 #include <ivf/IvfCoordinateSystem.h>
00035 #include <ivf/IvfCamera.h>
00036 #include <ivf/IvfShape.h>
00037 #include <ivf/IvfCursor.h>
00038 #include <ivf/IvfLighting.h>
00039 
00040 #include <ivfmath/IvfPoint3d.h>
00041 
00042 IvfSmartPointer(CIvfOldScene);
00043 
00044 #define IVF_TEMP_SOLID 0
00045 #define IVF_TEMP_WIREFRAME 1
00046 
00047 #define IVF_LIGHT_LOCAL 0
00048 #define IVF_LIGHT_WORLD 1
00049 
00058 class IVF_API CIvfOldScene : public CIvfSelectComposite {
00059 public:
00061         CIvfOldScene ();
00062 
00064         virtual ~CIvfOldScene ();
00065 
00066         IvfClassInfo("CIvfOldScene",CIvfSelectComposite);
00067 
00068         void setCamera(CIvfCamera * camera);
00069         CIvfCamera* getCamera();
00070         
00071         CIvfView* getView();
00072         void setView(CIvfView* view);
00073 
00082         void setWorldSystem(CIvfCoordinateSystem* world);
00083 
00085         CIvfCoordinateSystem* getWorldSystem();
00086 
00094         void setCursor(CIvfCursor* cursor);
00095         CIvfCursor* getCursor();
00096 
00097         //changes Calle Lejdfors 990803
00098 
00099         void setLightMode(int mode);
00100         int getLightMode();
00101 
00109         void setTempShape(CIvfShape* shape);
00110 
00112         CIvfShape* getTempShape();
00113 
00123         void setTempRenderStyle(int style);
00124 
00126         int getTempRenderStyle();
00127 
00137         void updateCursor(int x, int y);
00138 
00140         void setNodeSize(double size);
00141 
00143         void setObjectSize(double size);
00144 
00152         void lockCursor();
00153 
00155         void unlockCursor();
00156 
00158         int isCursorLocked();
00159 
00161         void setSnapToGrid(bool flag);
00162 
00164         bool getSnapToGrid();
00165 
00172         void setWorkspace(double size);
00173 
00181         void setTransparentShape(CIvfShape* shape);
00182 
00184         void setShowCursor(bool flag);
00185 
00187         bool getShowCursor();
00188 
00190         void setShowGrid(bool flag);
00191 
00193         bool getShowGrid();
00194 
00195 private:
00196         CIvfPoint3d m_pointOnPlane;
00197         double m_objectSize;
00198         int m_cursorStartY;
00199         int m_cursorStartX;
00200         int m_cursorY;
00201         int m_cursorX;
00202         int m_tempRenderStyle;
00203         bool m_showGrid;
00204         bool m_showCursor;
00205         bool m_cursorLocked;
00206         bool m_snapToGrid;
00207         CIvfShape* m_tempShape;
00208         CIvfShape* m_transparentShape;
00209         CIvfCursor* m_cursor;
00210         CIvfCoordinateSystem* m_world;
00211         CIvfLighting* m_lighting;
00212         int m_lightMode;
00213         //end changes
00214 
00215 protected:
00216         void endTransform();
00217         void beginTransform();
00218         void createGeometry();
00219 };
00220 #endif

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