public void DistanceFromPath_Path_Closed() { InternalPath shape = Create(new PointF(0, 0), new Size(10, 10), false); PointInfo info = shape.DistanceFromPath(new PointF(5, 5)); Assert.Equal(5, info.DistanceFromPath); Assert.Equal(5, info.DistanceAlongPath); }
public void DistanceFromPath_Path(TestPoint point, float expectedDistance, float alongPath) { InternalPath shape = Create(new PointF(0, 0), new Size(10, 10)); PointInfo info = shape.DistanceFromPath(point); Assert.Equal(expectedDistance, info.DistanceFromPath); Assert.Equal(alongPath, info.DistanceAlongPath); }
/// <summary> /// the distance of the point from the outline of the shape, if the value is negative it is inside the polygon bounds /// </summary> /// <param name="point">The point.</param> /// <returns> /// Returns the distance from the shape to the point /// </returns> public float Distance(Vector2 point) { bool insidePoly; PointInfo result = this.Distance(point, true, out insidePoly); // invert the distance from path when inside return(insidePoly ? -result.DistanceFromPath : result.DistanceFromPath); }
public void ShowYakuRank(PointInfo pointInfo) { SetYakuRank(pointInfo); var rect = GetComponent <RectTransform>(); rect.localScale = new Vector3(ScaleFactor, ScaleFactor, ScaleFactor); rect.DOScale(Vector3.one, AnimationDuration).SetEase(Ease.OutQuad); }
private void ClearPoint(PointInfo point) { point.FuzzyLabel = null; point.FuzzyTrend = null; point.DiagnosticTest = null; point.StatisticsByEntropy = null; point.StatisticsByFuzzy = null; }
public void DistanceFromPath_Path(TestPoint point, float expectecDistance, float alongPath) { IPath shape = new RectangularPolygon(0, 0, 10, 10); PointInfo info = shape.Distance(point); Assert.Equal(expectecDistance, info.DistanceFromPath); Assert.Equal(alongPath, info.DistanceAlongPath); }
//================================ Systems properties ================================= //================================ Public methods ================================= /// <inheritdoc /> public SplineContent(Vector3 p0, PointInfo info, int index, int parentId) { P0 = p0; Info = info; Index = index; ParentId = parentId; InternalHash = parentId + 1 + index; }
public void DistanceFromPath_Path(TestPoint point, float expectedDistance, float alongPath) { Path path = new Path(new LinearLineSegment(new PointF(0, 0), new PointF(10, 0), new PointF(10, 10), new PointF(0, 10))); PointInfo info = path.Distance(point); Assert.Equal(expectedDistance, info.DistanceFromPath); Assert.Equal(alongPath, info.DistanceAlongPath); }
private List <GameObject> GetYakuEntries(PointInfo pointInfo, bool richi, Transform holder) { var entries = new List <GameObject>(); foreach (var yakuValue in pointInfo.YakuList) { var entry = Instantiate(YakuItemPrefab, holder); entry.SetActive(false); entries.Add(entry); var yakuItem = entry.GetComponent <YakuItem>(); yakuItem.SetYakuItem(yakuValue, pointInfo.IsQTJ); } if (pointInfo.IsYakuman && !pointInfo.IsQTJ) { return(entries); } if (pointInfo.Dora > 0) { var entry = Instantiate(YakuItemPrefab, holder); entry.SetActive(false); entries.Add(entry); var yakuItem = entry.GetComponent <YakuItem>(); yakuItem.SetYakuItem(new YakuValue { Name = "宝牌", Value = pointInfo.Dora }, pointInfo.IsQTJ); } if (pointInfo.RedDora > 0) { var entry = Instantiate(YakuItemPrefab, holder); entry.SetActive(false); entries.Add(entry); var yakuItem = entry.GetComponent <YakuItem>(); yakuItem.SetYakuItem(new YakuValue { Name = "红宝牌", Value = pointInfo.RedDora }, pointInfo.IsQTJ); } if (pointInfo.BeiDora > 0) { var entry = Instantiate(YakuItemPrefab, holder); entry.SetActive(false); entries.Add(entry); var yakuItem = entry.GetComponent <YakuItem>(); yakuItem.SetYakuItem(new YakuValue { Name = "北宝牌", Value = pointInfo.BeiDora }, pointInfo.IsQTJ); } if (richi) { var entry = Instantiate(YakuItemPrefab, holder); entry.SetActive(false); entries.Add(entry); var yakuItem = entry.GetComponent <YakuItem>(); yakuItem.SetYakuItem(new YakuValue { Name = "里宝牌", Value = pointInfo.UraDora }, pointInfo.IsQTJ); } return(entries); }
public static async Task MatrEnd(PointInfo info) { var matrixA = await info.ParentPoint.GetAsync <Matrix>(); var matrixB = await info.ParentPoint.GetAsync <Matrix>(); matrixA.MultiplyBy(matrixB); await info.ParentPoint.SendAsync(matrixA); }
void SpawnFruit(PointInfo posIndex) { GameObject go = Instantiate(fruit, posIndex.pos, MathOperations.LookAt2D(posIndex.pos, transform.position, -90 + Random.Range(-30f, 30f))); go.transform.parent = transform; Food f = go.GetComponent <Food>(); f.Init(genes.fruitColor, posIndex.index, 0.1f, 0.4f); }
public VirtualStructureRectangle(VirtualStructureRectangle structure) { center = new Vector3(structure.center.x, structure.center.y, structure.center.z); vertices = new PointInfo[structure.vertices.Length]; for (int i = 0; i < vertices.Length; i++) { vertices[i] = new PointInfo(structure.vertices[i].pos, structure.vertices[i].vel, structure.vertices[i].orientation, structure.vertices[i].currentTime); } }
/// <summary> /// 获取某点与随机点集中点的最邻近距离 /// </summary> /// <param name="index">该点的位置</param> /// <param name="randPointList">输入的随机点集</param> /// <returns></returns> public double GetMinDistanceToRandPt(ref PointInfo pt, List <PointInfo> randPointList) { double[] curKey = new double[] { pt.x2one, pt.y2one }; Object resIndex = kdTree.nearest(curKey); pt.nearestPointInRandPonints = randPointList[(int)resIndex]; pt.nearestDistanceToRandPonints = Algorithm.P2PdistanceCompute2one(pt, pt.nearestPointInRandPonints); return(pt.nearestDistanceToRandPonints); }
private IEnumerator YakuListCoroutine(PointInfo point, int totalPoints, bool richi, UnityAction callback) { yield return(PointInfoManager.SetPointInfo(point, totalPoints, richi)); yield return(waiting); YakuRankManager.ShowYakuRank(point); ConfirmCountDownController.StartCountDown(MahjongConstants.SummaryPanelWaitingTime, callback); }
public static void Transform(PointInfo point) { if (point == null) { return; } point.X = (point.X + InitOffsetX) * Power; point.Y = (point.Y + InitOffsetY) * Power; }
private void ResetPropInfo() { for (int j = 0; j < PosInfoList.Count; ++j) { _updateInfo = PosInfoList[j]; _updateInfo.used = false; PosInfoList[j] = _updateInfo; } }
private async void SetContents (string deviceId, string pointId, string type) { _info = new PointInfo (); _info = await Mvx.Resolve<IApiService> ().GetInfo (deviceId, pointId, type); if (_marker != null && _marker.IsInfoWindowShown) { _marker.ShowInfoWindow (); } }
//смерть юнита игрока public override void UnitDead() { aid_timer = 0f; player_controller.CheckSelectedUnit(this); player_controller.PointIsBooked(null, point_transform); current_point.SetUnitInPoint(null); current_point = null; base.UnitDead(); }
/// <summary> /// click point lấy tiền /// </summary> /// <param name="point"></param> private void ClickGetMoney(GameObject point) { PointInfo pInf = point.GetComponent <Point>().pInfo; GameManager.instance.money += pInf.proClick; GameManager.instance.moneyText.text = "$: " + GameManager.instance.money; //point = EventSystem.current.currentSelectedGameObject; objTemp = point; }
public void Reset() { this.x = 0; this.y = 0; this.close = false; this.g = 0; this.h = 0; this.dir = 0; this.parant = null; }
public override void Execute(GameObject go, ProjectileInfo proj, PointInfo info) { var health = go.GetComponent <PlayerHealth>(); if (health == null) { return; } health.SetDamage(this.damage, proj.weapon.owner); }
public static async Task RecurciveMethod(PointInfo info) { var point = await info.CurrentControlSpace.CreatePointAsync(info.CurrentPoint.Channel.Name + ".1"); await point.RunAsync(new PointStartInfo(TestMethod)); int res = await point.GetAsync <int>(); await info.ParentPoint.SendAsync(res); }
/// <summary> /// 获取某点与点集中其他点的最邻近距离 /// </summary> /// <param name="index">该点的位置</param> /// <param name="pointList">输入的点集</param> /// <returns></returns> public double GetMinDistance(int index, ref List <PointInfo> pointList) { PointInfo curPt = pointList[index]; double[] curKey = new double[] { curPt.x2one, curPt.y2one }; Object[] resIndex = kdTree.nearest(curKey, 2); pointList[index].nearestPoint = pointList[(int)resIndex[1]]; pointList[index].nearestDistance = Algorithm.P2PdistanceCompute2one(curPt, pointList[index].nearestPoint); return(pointList[index].nearestDistance); }
private async void SetContents(string deviceId, string pointId, string type) { _info = new PointInfo(); _info = await Mvx.Resolve <IApiService> ().GetInfo(deviceId, pointId, type); if (_marker != null && _marker.IsInfoWindowShown) { _marker.ShowInfoWindow(); } }
private IEnumerator <float> YakuListCoroutine(PointInfo point, int totalPoints, bool richi, UnityAction callback) { yield return(Timing.WaitUntilDone( Timing.RunCoroutine(PointInfoManager.SetPointInfo(point, totalPoints, richi)))); yield return(Timing.WaitForSeconds(MahjongConstants.SummaryPanelDelayTime)); YakuRankManager.ShowYakuRank(point); ConfirmCountDownController.StartCountDown(MahjongConstants.SummaryPanelWaitingTime, callback); }
public PointInfo AddNewPoint(PointGroup currentGroup, Vector3 inNewPoint) { if (currentGroup != null) { PointInfo newPoint = new PointInfo(inNewPoint); currentGroup.mPoints.Add(newPoint); return(newPoint); } return(null); }
public bool Gestured(PointInfo ActionPoint) { // Extract default browser path from registery var defaultBrowserInfo = GetDefaultBrowserPath(); // If path is incorrect or empty and exception will be thrown, catch it and return false try { Process.Start(defaultBrowserInfo); } catch { return(false); } return(true); }
public static async Task MultStart(PointInfo info) { var matrixA = await info.ParentPoint.GetAsync <Matrix>(); //Matrix.Load(info.CurrentControlSpace.PointDirectory + "A.txt"); // var matrixB = await info.ParentPoint.GetAsync <Matrix>(); // Matrix.Load(info.CurrentControlSpace.PointDirectory + "B.txt"); // var points = new Point[8]; var cs = info.CurrentControlSpace; for (int i = 0; i < 8; i++) { points[i] = await cs.CreatePointAsync("1"); if (matrixA.Width / 2 > 40000000000) { await points[i].RunAsync(new PointStartInfo(MultStart)); } else { await points[i].RunAsync(new PointStartInfo(MatrEnd)); } } points[0].SendAsync(matrixA.SubMatrix(0, 0, matrixA.Width / 2, matrixA.Width / 2)); // A11 points[0].SendAsync(matrixB.SubMatrix(0, 0, matrixB.Width / 2, matrixB.Width / 2)); // B11 points[1].SendAsync(matrixA.SubMatrix(0, matrixA.Width / 2, matrixA.Width / 2, matrixA.Width / 2)); //A12 points[1].SendAsync(matrixB.SubMatrix(matrixB.Width / 2, 0, matrixB.Width / 2, matrixB.Width / 2)); //B21 points[2].SendAsync(matrixA.SubMatrix(0, 0, matrixA.Width / 2, matrixA.Width / 2)); points[2].SendAsync(matrixB.SubMatrix(0, matrixB.Width / 2, matrixB.Width / 2, matrixB.Width / 2)); points[3].SendAsync(matrixA.SubMatrix(0, matrixA.Width / 2, matrixA.Width / 2, matrixA.Width / 2)); points[3].SendAsync(matrixB.SubMatrix(matrixB.Width / 2, matrixB.Width / 2, matrixB.Width / 2, matrixB.Width / 2)); points[4].SendAsync(matrixA.SubMatrix(matrixA.Width / 2, 0, matrixA.Width / 2, matrixA.Width / 2)); points[4].SendAsync(matrixB.SubMatrix(0, 0, matrixB.Width / 2, matrixB.Width / 2)); points[5].SendAsync(matrixA.SubMatrix(matrixA.Width / 2, matrixA.Width / 2, matrixA.Width / 2, matrixA.Width / 2)); points[5].SendAsync(matrixB.SubMatrix(matrixB.Width / 2, 0, matrixB.Width / 2, matrixB.Width / 2)); points[6].SendAsync(matrixA.SubMatrix(matrixA.Width / 2, 0, matrixA.Width / 2, matrixA.Width / 2)); points[6].SendAsync(matrixB.SubMatrix(0, matrixB.Width / 2, matrixB.Width / 2, matrixB.Width / 2)); points[7].SendAsync(matrixA.SubMatrix(matrixA.Width / 2, matrixA.Width / 2, matrixA.Width / 2, matrixA.Width / 2)); points[7].SendAsync(matrixB.SubMatrix(matrixB.Width / 2, matrixB.Width / 2, matrixB.Width / 2, matrixB.Width / 2)); var resultMatrix = new Matrix(matrixA.Height, matrixA.Height); resultMatrix.SetSubmatrix(await SumMatrix(points[0], points[1]), 0, 0); resultMatrix.SetSubmatrix(await SumMatrix(points[2], points[3]), 0, matrixA.Width / 2); resultMatrix.SetSubmatrix(await SumMatrix(points[4], points[5]), matrixA.Width / 2, 0); resultMatrix.SetSubmatrix(await SumMatrix(points[6], points[7]), matrixA.Width / 2, matrixA.Width / 2); await info.ParentPoint.SendAsync(resultMatrix); }
public bool Gestured(PointInfo actionPoint) { if (actionPoint.WindowHandle.ToInt64() != ManagedWinapi.Windows.SystemWindow.ForegroundWindow.HWnd.ToInt64()) { ManagedWinapi.Windows.SystemWindow.ForegroundWindow = actionPoint.Window; } actionPoint.Window.TopMost = !actionPoint.Window.TopMost; return(true); }
public void Awake() { SkewImage = this.GetComponentInParent <UISkewImage>(); point1 = GameObject.Instantiate(Resources.Load <GameObject>("Point")); point2 = GameObject.Instantiate(Resources.Load <GameObject>("Point")); point3 = GameObject.Instantiate(Resources.Load <GameObject>("Point")); point4 = GameObject.Instantiate(Resources.Load <GameObject>("Point")); point1.transform.SetParent(this.transform); point2.transform.SetParent(this.transform); point3.transform.SetParent(this.transform); point4.transform.SetParent(this.transform); leftTopInfo = point1.GetComponent <PointInfo>(); rightTopInfo = point2.GetComponent <PointInfo>(); leftDownInfo = point3.GetComponent <PointInfo>(); rightDownInfo = point4.GetComponent <PointInfo>(); leftTopInfo.PointName = "leftTopInfo"; rightTopInfo.PointName = "rightTopInfo"; leftDownInfo.PointName = "leftDownInfo"; rightDownInfo.PointName = "rightDownInfo"; leftTopInfo.myEvent.AddListener(ChangeLeftTopPos); rightTopInfo.myEvent.AddListener(ChangeRightTopPos); leftDownInfo.myEvent.AddListener(ChangeLeftDownPos); rightDownInfo.myEvent.AddListener(ChangeRightDownPos); //初始位置 //Vector2 size = this.transform.ToRectTransform().rect.size; //leftTopInfo.transform.ToRectTransform().anchoredPosition = new Vector3(-(size.x / 2), size.y / 2, 0); //rightTopInfo.transform.ToRectTransform().anchoredPosition = new Vector3((size.x / 2), size.y / 2, 0); //leftDownInfo.transform.ToRectTransform().anchoredPosition = new Vector3(-(size.x / 2), -(size.y / 2), 0); //rightDownInfo.transform.ToRectTransform().anchoredPosition = new Vector3((size.x / 2), -(size.y / 2), 0); leftTopInfo.LoadPointPosition(DataManager.Instance.PointDatas.Points[0], DataManager.Instance.PointDatas.ChangeValues[0]); rightTopInfo.LoadPointPosition(DataManager.Instance.PointDatas.Points[1], DataManager.Instance.PointDatas.ChangeValues[1]); leftDownInfo.LoadPointPosition(DataManager.Instance.PointDatas.Points[2], DataManager.Instance.PointDatas.ChangeValues[2]); rightDownInfo.LoadPointPosition(DataManager.Instance.PointDatas.Points[3], DataManager.Instance.PointDatas.ChangeValues[3]); this.infos.Add(leftTopInfo); this.infos.Add(rightTopInfo); this.infos.Add(leftDownInfo); this.infos.Add(rightDownInfo); ChangeCurrentInfo(); point1.SetActive(isEditMode); point2.SetActive(isEditMode); point3.SetActive(isEditMode); point4.SetActive(isEditMode); }
public static void ShowPoints() { var p1 = Interaction.GetPoint("坐标1"); var p2 = Interaction.GetPoint("坐标2"); Interaction.WriteLine(string.Format("({0} {1})", p1, p2)); PointInfo pi1 = GetRoomsCommand.GetPointInfo(p1); PointInfo pi2 = GetRoomsCommand.GetPointInfo(p2); Interaction.WriteLine(string.Format("({0} {1})", pi1, pi2)); }
public static PointInfo SelectPointColor() { using (RectangleRegion surface = new RectangleRegion()) { surface.OneClickMode = true; surface.Prepare(); surface.ShowDialog(); if (surface.Result == SurfaceResult.Region) { PointInfo pointInfo = new PointInfo(); pointInfo.Position = CaptureHelpers.ClientToScreen(surface.CurrentPosition); pointInfo.Color = surface.CurrentColor; return pointInfo; } } return null; }
public static PointInfo SelectPointColor() { using (RectangleRegion surface = new RectangleRegion()) { surface.ScreenColorPickerMode = true; surface.Config.UseDimming = false; surface.Config.ShowInfo = true; surface.Config.ShowMagnifier = true; surface.Config.ShowTips = false; surface.Prepare(); surface.ShowDialog(); if (surface.Result == SurfaceResult.Region) { PointInfo pointInfo = new PointInfo(); pointInfo.Position = surface.CurrentPosition; pointInfo.Color = surface.CurrentColor; return pointInfo; } } return null; }
public void setValueByIndex(int i, PointInfo value) { switch (i) { case 0: { v000 = value; return; } case 1: { v001 = value; return; } case 2: { v002 = value; return; } case 3: { v003 = value; return; } case 4: { v004 = value; return; } case 5: { v005 = value; return; } case 6: { v006 = value; return; } case 7: { v007 = value; return; } case 8: { v008 = value; return; } case 9: { v009 = value; return; } case 10: { v010 = value; return; } case 11: { v011 = value; return; } case 12: { v012 = value; return; } case 13: { v013 = value; return; } case 14: { v014 = value; return; } case 15: { v015 = value; return; } case 16: { v016 = value; return; } case 17: { v017 = value; return; } case 18: { v018 = value; return; } case 19: { v019 = value; return; } case 20: { v020 = value; return; } case 21: { v021 = value; return; } case 22: { v022 = value; return; } case 23: { v023 = value; return; } case 24: { v024 = value; return; } case 25: { v025 = value; return; } case 26: { v026 = value; return; } case 27: { v027 = value; return; } case 28: { v028 = value; return; } case 29: { v029 = value; return; } case 30: { v030 = value; return; } case 31: { v031 = value; return; } case 32: { v032 = value; return; } case 33: { v033 = value; return; } case 34: { v034 = value; return; } case 35: { v035 = value; return; } case 36: { v036 = value; return; } case 37: { v037 = value; return; } case 38: { v038 = value; return; } case 39: { v039 = value; return; } case 40: { v040 = value; return; } case 41: { v041 = value; return; } case 42: { v042 = value; return; } case 43: { v043 = value; return; } case 44: { v044 = value; return; } case 45: { v045 = value; return; } case 46: { v046 = value; return; } case 47: { v047 = value; return; } case 48: { v048 = value; return; } case 49: { v049 = value; return; } case 50: { v050 = value; return; } case 51: { v051 = value; return; } case 52: { v052 = value; return; } case 53: { v053 = value; return; } case 54: { v054 = value; return; } case 55: { v055 = value; return; } case 56: { v056 = value; return; } case 57: { v057 = value; return; } case 58: { v058 = value; return; } case 59: { v059 = value; return; } case 60: { v060 = value; return; } case 61: { v061 = value; return; } case 62: { v062 = value; return; } case 63: { v063 = value; return; } case 64: { v064 = value; return; } case 65: { v065 = value; return; } case 66: { v066 = value; return; } case 67: { v067 = value; return; } case 68: { v068 = value; return; } case 69: { v069 = value; return; } case 70: { v070 = value; return; } case 71: { v071 = value; return; } case 72: { v072 = value; return; } case 73: { v073 = value; return; } case 74: { v074 = value; return; } case 75: { v075 = value; return; } case 76: { v076 = value; return; } case 77: { v077 = value; return; } case 78: { v078 = value; return; } case 79: { v079 = value; return; } case 80: { v080 = value; return; } case 81: { v081 = value; return; } case 82: { v082 = value; return; } case 83: { v083 = value; return; } case 84: { v084 = value; return; } case 85: { v085 = value; return; } case 86: { v086 = value; return; } case 87: { v087 = value; return; } case 88: { v088 = value; return; } case 89: { v089 = value; return; } case 90: { v090 = value; return; } case 91: { v091 = value; return; } case 92: { v092 = value; return; } case 93: { v093 = value; return; } case 94: { v094 = value; return; } case 95: { v095 = value; return; } case 96: { v096 = value; return; } case 97: { v097 = value; return; } case 98: { v098 = value; return; } case 99: { v099 = value; return; } case 100: { v100 = value; return; } case 101: { v101 = value; return; } case 102: { v102 = value; return; } case 103: { v103 = value; return; } case 104: { v104 = value; return; } case 105: { v105 = value; return; } case 106: { v106 = value; return; } case 107: { v107 = value; return; } case 108: { v108 = value; return; } case 109: { v109 = value; return; } case 110: { v110 = value; return; } case 111: { v111 = value; return; } case 112: { v112 = value; return; } case 113: { v113 = value; return; } case 114: { v114 = value; return; } case 115: { v115 = value; return; } case 116: { v116 = value; return; } case 117: { v117 = value; return; } case 118: { v118 = value; return; } case 119: { v119 = value; return; } case 120: { v120 = value; return; } case 121: { v121 = value; return; } case 122: { v122 = value; return; } case 123: { v123 = value; return; } case 124: { v124 = value; return; } case 125: { v125 = value; return; } case 126: { v126 = value; return; } case 127: { v127 = value; return; } case 128: { v128 = value; return; } case 129: { v129 = value; return; } case 130: { v130 = value; return; } case 131: { v131 = value; return; } case 132: { v132 = value; return; } case 133: { v133 = value; return; } case 134: { v134 = value; return; } case 135: { v135 = value; return; } case 136: { v136 = value; return; } case 137: { v137 = value; return; } case 138: { v138 = value; return; } case 139: { v139 = value; return; } case 140: { v140 = value; return; } case 141: { v141 = value; return; } case 142: { v142 = value; return; } case 143: { v143 = value; return; } case 144: { v144 = value; return; } case 145: { v145 = value; return; } case 146: { v146 = value; return; } case 147: { v147 = value; return; } case 148: { v148 = value; return; } case 149: { v149 = value; return; } case 150: { v150 = value; return; } case 151: { v151 = value; return; } case 152: { v152 = value; return; } case 153: { v153 = value; return; } case 154: { v154 = value; return; } case 155: { v155 = value; return; } case 156: { v156 = value; return; } case 157: { v157 = value; return; } case 158: { v158 = value; return; } case 159: { v159 = value; return; } case 160: { v160 = value; return; } case 161: { v161 = value; return; } case 162: { v162 = value; return; } case 163: { v163 = value; return; } case 164: { v164 = value; return; } case 165: { v165 = value; return; } case 166: { v166 = value; return; } case 167: { v167 = value; return; } case 168: { v168 = value; return; } case 169: { v169 = value; return; } case 170: { v170 = value; return; } case 171: { v171 = value; return; } case 172: { v172 = value; return; } case 173: { v173 = value; return; } case 174: { v174 = value; return; } case 175: { v175 = value; return; } case 176: { v176 = value; return; } case 177: { v177 = value; return; } case 178: { v178 = value; return; } case 179: { v179 = value; return; } case 180: { v180 = value; return; } case 181: { v181 = value; return; } case 182: { v182 = value; return; } case 183: { v183 = value; return; } case 184: { v184 = value; return; } case 185: { v185 = value; return; } case 186: { v186 = value; return; } case 187: { v187 = value; return; } case 188: { v188 = value; return; } case 189: { v189 = value; return; } case 190: { v190 = value; return; } case 191: { v191 = value; return; } case 192: { v192 = value; return; } case 193: { v193 = value; return; } case 194: { v194 = value; return; } case 195: { v195 = value; return; } case 196: { v196 = value; return; } case 197: { v197 = value; return; } case 198: { v198 = value; return; } case 199: { v199 = value; return; } case 200: { v200 = value; return; } case 201: { v201 = value; return; } case 202: { v202 = value; return; } case 203: { v203 = value; return; } case 204: { v204 = value; return; } case 205: { v205 = value; return; } case 206: { v206 = value; return; } case 207: { v207 = value; return; } case 208: { v208 = value; return; } case 209: { v209 = value; return; } case 210: { v210 = value; return; } case 211: { v211 = value; return; } case 212: { v212 = value; return; } case 213: { v213 = value; return; } case 214: { v214 = value; return; } case 215: { v215 = value; return; } case 216: { v216 = value; return; } case 217: { v217 = value; return; } case 218: { v218 = value; return; } case 219: { v219 = value; return; } case 220: { v220 = value; return; } case 221: { v221 = value; return; } case 222: { v222 = value; return; } case 223: { v223 = value; return; } case 224: { v224 = value; return; } case 225: { v225 = value; return; } case 226: { v226 = value; return; } case 227: { v227 = value; return; } case 228: { v228 = value; return; } case 229: { v229 = value; return; } case 230: { v230 = value; return; } case 231: { v231 = value; return; } case 232: { v232 = value; return; } case 233: { v233 = value; return; } case 234: { v234 = value; return; } case 235: { v235 = value; return; } case 236: { v236 = value; return; } case 237: { v237 = value; return; } case 238: { v238 = value; return; } case 239: { v239 = value; return; } case 240: { v240 = value; return; } case 241: { v241 = value; return; } case 242: { v242 = value; return; } case 243: { v243 = value; return; } case 244: { v244 = value; return; } case 245: { v245 = value; return; } case 246: { v246 = value; return; } case 247: { v247 = value; return; } case 248: { v248 = value; return; } case 249: { v249 = value; return; } case 250: { v250 = value; return; } case 251: { v251 = value; return; } case 252: { v252 = value; return; } case 253: { v253 = value; return; } case 254: { v254 = value; return; } case 255: { v255 = value; return; } } }
public override bool ContainsPoint(PointInfo Point) { return (Point.X >= 0 && Point.X <= 512 && Point.Y >= 0 && Point.Y <= 384); }
public CustomInfoWindowAdapter (LayoutInflater inflater) { _info = new PointInfo (); _layoutInflater = inflater; }
public PointInfo(PointInfo p) { btn = p.btn; CN = p.CN; PID = p.PID; Polygon = p.Polygon; Op = p.Op; Index = p.Index; OnBnd = p.OnBnd; X = p.X; Y = p.Y; Z = p.Z; ManAcc = p.ManAcc; UnAdjX = p.UnAdjX; UnAdjY = p.UnAdjY; UnAdjZ = p.UnAdjZ; AdjX = p.AdjX; AdjY = p.AdjY; AdjZ = p.AdjZ; FwdAz = p.FwdAz; BkAz = p.BkAz; SlpDist = p.SlpDist; HorzDist = p.HorzDist; QndmLink = p.QndmLink; Meta = p.Meta; Comment = p.Comment; }
PointInfo GetClosestPoint(Vector3 point, int iterations, int segmentIndex){ BezierSegment seg = Curve[segmentIndex]; PointInfo closestPoint = new PointInfo(); closestPoint.SegmentIndex = segmentIndex; closestPoint.Time = 0; float closestDistance = float.MaxValue; float time = 0; for (int i = 1; i <= iterations; i++){ Vector3 p2 = seg.SampleConstant(time); float dist = Vector3.Distance(point, p2); if (dist < closestDistance){ closestPoint.Point = p2; closestPoint.Time = time; closestDistance = dist; } time += 1f / iterations; } return closestPoint; }
void EnqueNode(PointInfo info, int i, LeftRight type) { PointInfo aux; aux = new PointInfo(); aux.leftRight = type; aux.angl = info.angl; aux.refPoint = info.refPoint; aux.orgSweep = info.orgSweep; if (type == LeftRight.LEFT) aux.sweep = info.sweep - 0.1; else aux.sweep = info.sweep + 0.1; if (aux.sweep > 2 * aux.orgSweep) aux.sweep -= 0.1; if (aux.sweep < 0) aux.sweep += 0.1; aux.point = CalcPoint(aux.refPoint, aux.angl, aux.sweep, r - 20); qp[i].Enqueue(aux); }
private void panel1_Paint(object sender, PaintEventArgs e) { List<Point> points = new List<Point>(); Graphics g = e.Graphics; g.Clear(this.BackColor); double angl = 0; r = Math.Min(panel1.Size.Height, panel1.Size.Width); r /= 2; r -= 5; Rectangle rec = new Rectangle(0, 0, r, r); Rectangle rec1 = new Rectangle(10, 10, r - 20, r - 20); GraphicsPath gPath; allRegions.Clear(); for (int i = 0; i < clusters.Count;i++ ) { double sweep = step * clusters[i].Count; gPath = PreparePath(r, r - 20, angl, sweep); qp[i].Clear(); if (gPath != null) { allRegions.Add(new Region(gPath), i); Pen p; Brush aBrush = (Brush)Brushes.Green; p = new Pen(Color.Black, 2); if (color == null) { if (activeCluster != i) aBrush = (Brush)Brushes.BlueViolet; else aBrush = (Brush)Brushes.Yellow; } else { aBrush = new SolidBrush(color[i]); } g.FillPath(aBrush, gPath); g.DrawPath(p, gPath); //foreach (var po in gPath.PathData.Points) Point mid = CalcPoint(gPath.PathPoints[0], angl, sweep, r - 20); g.FillRectangle(aBrush, mid.X, mid.Y, 4, 4); points.Add(mid); PointInfo aux = new PointInfo(); aux.leftRight = LeftRight.BOTH; aux.angl = angl; aux.sweep = sweep; aux.orgSweep = aux.sweep; aux.point = mid; aux.refPoint = gPath.PathPoints[0]; qp[i].Enqueue(aux); } angl += sweep; } Point point1; Point point2; foreach(var item in connection) { if (activeCluster != -1 ) { if (activeCluster == item.Key || activeCluster == item.Value) { point1 = GetQPoint(item.Key); point2 = GetQPoint(item.Value); DrawLines(g, point1, point2); } } else { point1 = GetQPoint(item.Key); point2 = GetQPoint(item.Value); DrawLines(g, point1, point2); } } }