void CreateView(RenderingSurface xiSurface, Scene xiScene, Camera xiCamera, RenderMode xiFixedRenderMode) { xiSurface.MouseDown += new MouseEventHandler(Viewer3DRenderingSurface_MouseDown); xiSurface.MouseUp += new MouseEventHandler(Viewer3DRenderingSurface_MouseUp); xiSurface.MouseMove += new MouseEventHandler(Viewer3DRenderingSurface_MouseMove); xiSurface.MouseWheel += new MouseEventHandler(Viewer3DRenderingSurface_MouseWheel); xiSurface.GotFocus += new EventHandler(Viewer3DRenderingSurface_GotFocus); ImmediateModeRenderer lRenderer = new ImmediateModeRenderer(); lRenderer.FixedRenderMode = xiFixedRenderMode; lRenderer.Attach(xiSurface); MMEdEditorView lView = new MMEdEditorView(this, xiScene, xiCamera, lRenderer); mViews.Add(xiSurface, lView); }
private void ResetCamera() { MMEdEditorView lTR = mViews[mMainForm.Viewer3DRenderingSurfaceTopRight]; lTR.Camera.Position = new GLTK.Point(-3 * MoveScale, -3 * MoveScale, 3 * MoveScale); lTR.Camera.LookAt(new GLTK.Point(3 * MoveScale, 3 * MoveScale, 0), new GLTK.Vector(0, 0, 1)); MMEdEditorView lTL = mViews[mMainForm.Viewer3DRenderingSurfaceTopLeft]; lTL.Camera.Position = new GLTK.Point(0, 0, -5000); lTL.Camera.LookAt(new GLTK.Point(0, 0, 0), GLTK.Vector.XAxis); MMEdEditorView lBL = mViews[mMainForm.Viewer3DRenderingSurfaceBottomLeft]; lBL.Camera.Position = new GLTK.Point(-5000, 0, 0); lBL.Camera.LookAt(new GLTK.Point(0, 0, 0), GLTK.Vector.ZAxis); MMEdEditorView lBR = mViews[mMainForm.Viewer3DRenderingSurfaceBottomRight]; lBR.Camera.Position = new GLTK.Point(0, -5000, 0); lBR.Camera.LookAt(new GLTK.Point(0, 0, 0), GLTK.Vector.ZAxis); }
void CreateView(RenderingSurface xiSurface, Scene xiScene, Camera xiCamera, RenderMode xiFixedRenderMode) { xiSurface.MouseDown += new MouseEventHandler(Viewer3DRenderingSurface_MouseDown); xiSurface.MouseUp += new MouseEventHandler(Viewer3DRenderingSurface_MouseUp); xiSurface.MouseMove += new MouseEventHandler(Viewer3DRenderingSurface_MouseMove); xiSurface.MouseWheel += new MouseEventHandler(Viewer3DRenderingSurface_MouseWheel); xiSurface.GotFocus += new EventHandler(Viewer3DRenderingSurface_GotFocus); ImmediateModeRenderer lRenderer = new ImmediateModeRenderer(); lRenderer.FixedRenderMode = xiFixedRenderMode; lRenderer.Attach(xiSurface); MMEdEditorView lView = new MMEdEditorView(this, xiScene, xiCamera, lRenderer); mViews.Add(xiSurface, lView); }