public void Refresh(ControlPointsMode controlPointsMode, bool wireframeVisible) { Dispatcher.Invoke(() => { WarpControl1.UpdateWarpControl(controlPointsMode); WarpControl1.SetVisibility(controlPointsMode, wireframeVisible); }); }
public void SetVisibility(ControlPointsMode controlPointsMode, bool wireframeVisible) { foreach (var p in _projectors) { p.ProjectorControl.SetVisibility(controlPointsMode == ControlPointsMode.Calibration, wireframeVisible && controlPointsMode == ControlPointsMode.Calibration); p.BlacklevelControl.SetVisibility(controlPointsMode == ControlPointsMode.Blacklevel, wireframeVisible && controlPointsMode == ControlPointsMode.Blacklevel); p.Blacklevel2Control.SetVisibility(controlPointsMode == ControlPointsMode.Blacklevel2, wireframeVisible && controlPointsMode == ControlPointsMode.Blacklevel2); p.BlendRegionControl.SetVisibility(controlPointsMode == ControlPointsMode.Blendregion, wireframeVisible && controlPointsMode == ControlPointsMode.Blendregion); } }
public void UpdateWarpControl(ControlPointsMode controlPointsMode) { foreach (var p in _projectors) { p.ProjectorControl.Wireframe = p.Projector.TriangleStrip; p.ProjectorControl.ResetControlPoints(p.Projector.ControlPoints.Select(ConvertControlPoint).ToArray(), controlPointsMode == ControlPointsMode.Calibration); p.BlacklevelControl.Wireframe = p.Projector.BlacklevelIndexes; p.BlacklevelControl.ResetControlPoints(p.Projector.BlacklevelControlPoints.Select(ConvertControlPoint).ToArray(), controlPointsMode == ControlPointsMode.Blacklevel); p.Blacklevel2Control.Wireframe = p.Projector.Blacklevel2Indexes; p.Blacklevel2Control.ResetControlPoints(p.Projector.Blacklevel2ControlPoints.Select(ConvertControlPoint).ToArray(), controlPointsMode == ControlPointsMode.Blacklevel2); p.BlendRegionControl.Wireframe = p.Projector.BlendRegionIndexes; p.BlendRegionControl.ResetControlPoints(p.Projector.BlendRegionControlPoints.Select(ConvertControlPoint).ToArray(), controlPointsMode == ControlPointsMode.Blendregion); } }