public List <GR_Point_Base> ToSimplePointList(GR_Line line, int n) { List <GR_Point_Base> lst = new List <GR_Point_Base>(); GR_Point_Base p1 = GetPointByUid(line.point1, temp); GR_Point_Base p2 = GetPointByUid(line.point2, temp); float adX = (p2.X - p1.X) / n; float adY = (p2.Y - p1.Y) / n; float adZ = (p2.Z - p1.Z) / n; for (int i = 0; i < n; i++) { lst.Add(new GR_Point_Simple(p1.X + adX * i, p1.Y + adY * i, p1.Z + adZ * i, 1, line.width, line.color)); } return(lst); }
private double[,] CalculateTempRotationMatrix() { double A = Temp_Xrotate / 180 * Math.PI; double B = Temp_Yrotate / 180 * Math.PI; double C = Temp_Zrotate / 180 * Math.PI; GR_Point_Base P = GetPointsCenter(true); return(new double[, ] { { (Math.Cos(B) * Math.Cos(C)) * Temp_Xresize, -Math.Cos(B) * Math.Sin(C) * Temp_Yresize, Math.Sin(B) * Temp_Zresize, 0 }, { (Math.Sin(A) * Math.Sin(B) * Math.Cos(C) + Math.Cos(A) * Math.Sin(C)) * Temp_Xresize, (-Math.Sin(A) * Math.Sin(B) * Math.Sin(C) + Math.Cos(A) * Math.Cos(C)) * Temp_Yresize, -Math.Sin(A) * Math.Cos(B) * Temp_Zresize, 0 }, { (-Math.Cos(A) * Math.Sin(B) * Math.Cos(C) + Math.Sin(A) * Math.Sin(C)) * Temp_Xresize, (Math.Cos(A) * Math.Sin(B) * Math.Sin(C) + Math.Sin(A) * Math.Cos(C)) * Temp_Yresize, Math.Cos(A) * Math.Cos(B) * Temp_Zresize, 0 }, { (Math.Cos(C) * (-P.X * Math.Cos(B) - Math.Sin(B) * (-P.Z * Math.Cos(A) + P.Y * Math.Sin(A))) + Math.Sin(C) * (-P.Y * Math.Cos(A) - P.Z * Math.Sin(A))) * Temp_Xresize + P.X, (Math.Cos(C) * (-P.Y * Math.Cos(A) - P.Z * Math.Sin(A)) - Math.Sin(C) * (-P.X * Math.Cos(B) - Math.Sin(B) * (-P.Z * Math.Cos(A) + P.Y * Math.Sin(A)))) * Temp_Yresize + P.Y, (-P.X * Math.Sin(B) + Math.Cos(B) * (-P.Z * Math.Cos(A) + P.Y * Math.Sin(A))) * Temp_Zresize + P.Z, 1 } });; //(-P.X * Math.Cos(B) + P.Y * Math.Sin(A) * Math.Sin(B) - P.Z * Math.Sin(B)) * Math.Cos(C) - (P.Y * Math.Cos(A) + P.Z * Math.Sin(A)) * Math.Sin(C) + P.X, // (P.X * Math.Cos(B) - P.Y * Math.Sin(A) * Math.Sin(B) + P.Z * Math.Cos(A)) * Math.Sin(C) - (P.Y * Math.Cos(A) + P.Z * Math.Sin(A)) * Math.Cos(C) + P.Y, // -P.X * Math.Sin(B) + P.Y * Math.Sin(A) * Math.Cos(B) - P.Z * Math.Cos(A) + P.Z, // 1 }
override public int CompareTo(GR_Point_Base obj) { return(-Z.CompareTo(obj.Z)); }
override public int CompareTo(GR_Point_Base other) { return(-Z.CompareTo(other.Z)); }