void SetColors(Plot3dAxis axes, WpfColor[] colors) { var nv = _3dChart.GetDataNo(); var offset = axes.Minimum; var norm = axes.Maximum - offset; for (var i = 0; i < nv; i++) { var vert = _3dChart[i]; var h = (vert.Z - offset) / norm; var index = Math.Max(Math.Min((Int32)Math.Floor(h * colors.Length), colors.Length - 1), 0); _3dChart[i].Color = colors[index].Convert(); } }
void SetView(Plot3dAxis xAxes, Plot3dAxis yAxes, Plot3dAxis zAxes) { _3dChart.SetDataRange((Single)xAxes.Minimum, (Single)xAxes.Maximum, (Single)yAxes.Minimum, (Single)yAxes.Maximum, (Single)zAxes.Minimum, (Single)zAxes.Maximum); }
void Project(Plot3dAxis xAxes, Plot3dAxis yAxes, Plot3dAxis zAxes) { _transformMatrix.CalculateProjectionMatrix(xAxes.Minimum, xAxes.Maximum, yAxes.Minimum, yAxes.Maximum, zAxes.Minimum, zAxes.Maximum, 0.5); }