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 _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
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
00214
00215 protected:
00216 void endTransform();
00217 void beginTransform();
00218 void createGeometry();
00219 };
00220 #endif