public void Transform(Matrix3 m, Chart3D chart3d, Axes ax, ChartStyle cs, ChartLabels cl) { // Normalize the point: float x1 = (X - ax.XMin) / (ax.XMax - ax.XMin) - 0.5f; float y1 = (Y - ax.YMin) / (ax.YMax - ax.YMin) - 0.5f; float z1 = (Z - ax.ZMin) / (ax.ZMax - ax.ZMin) - 0.5f; // Perform transformation on the point using matrix m: float[] result = m.VectorMultiply(new float[4] { x1, y1, z1, W }); X = result[0]; Y = result[1]; // Coordinate transformation from World to Device system: float xShift = 1.05f; float xScale = 1; float yShift = 1.05f; float yScale = 0.9f; if (cl.Title == "No Title") { yShift = 0.95f; yScale = 1; } if (cs.IsColorBar) { xShift = 0.95f; xScale = 0.9f; } X = (xShift + xScale * X) * chart3d.Width / 2; Y = (yShift - yScale * Y) * chart3d.Height / 2; }
public ChartStyle2D(Chart3D ct3d) { chart3d = ct3d; chartArea = chart3d.ClientRectangle; plotArea = chartArea; chartBackColor = chart3d.BackColor; chartBorderColor = chart3d.BackColor; }
public ChartStyle(Chart3D ct3d) { chart3d = ct3d; }
public Axes(Chart3D ct3d) { chart3d = ct3d; axisStyle = new LineStyle(); }
public ChartLabels(Chart3D ct3d) { chart3d = ct3d; tickFont = ct3d.Font; }
public ViewAngle(Chart3D ct3d) { chart3d = ct3d; }
public Grid(Chart3D ct3d) { chart3d = ct3d; gridStyle = new LineStyle(); }
public DrawChart(Chart3D ct3d) { chart3d = ct3d; }