コード例 #1
0
        public PatchWindow()
        {
            Viewport = new Viewport(this);

            InitializeComponent();
        }
コード例 #2
0
ファイル: SurfacePatch.cs プロジェクト: dtegunov/membranorama
        public void DetachFromViewport()
        {
            if (Viewport == null)
                return;

            Viewport.MouseClick -= Viewport_MouseClick;
            Viewport.MouseMove -= Viewport_MouseMove;
            Viewport.Paint -= Viewport_Paint;

            Viewport.GetControl().MakeCurrent();
            SurfaceMesh.FreeBuffers();
            foreach (var group in PointGroups)
                group.PointCloud.FreeBuffers();

            Viewport = null;
            LockTarget = null;
        }
コード例 #3
0
ファイル: Membrane.cs プロジェクト: dtegunov/membranorama
        public void AttachToViewport(Viewport viewport)
        {
            if (Viewport != null)
            {
                Viewport.MouseClick -= Viewport_MouseClick;
                Viewport.MouseMove -= Viewport_MouseMove;
                Viewport.MouseWheel -= Viewport_MouseWheel;
                Viewport.MouseDown -= Viewport_MouseDown;
                Viewport.MouseUp -= Viewport_MouseUp;
                Viewport.Paint -= Viewport_Paint;
            }

            Viewport = viewport;
            Viewport.MouseClick += Viewport_MouseClick;
            Viewport.MouseMove += Viewport_MouseMove;
            Viewport.MouseWheel += Viewport_MouseWheel;
            Viewport.MouseDown += Viewport_MouseDown;
            Viewport.MouseUp += Viewport_MouseUp;
            Viewport.Paint += Viewport_Paint;

            foreach (var item in PointGroups)
                item.PointCloud.GLContext = viewport.GetControl();

            SelectionTexture.UpdateBuffers();
        }
コード例 #4
0
ファイル: SurfacePatch.cs プロジェクト: dtegunov/membranorama
        public void AttachToViewport(Viewport viewport)
        {
            DetachFromViewport();

            Viewport = viewport;
            Viewport.MouseClick += Viewport_MouseClick;
            Viewport.MouseMove += Viewport_MouseMove;
            Viewport.Paint += Viewport_Paint;

            SurfaceMesh.GLContext = viewport.GetControl();
            SurfaceMesh.UpdateBuffers();
            foreach (var group in PointGroups)
                group.PointCloud.UpdateBuffers();
        }