private void DrawProbeNormals(Graphics g, PointF[] probePoints, VectorF[] normals) { for (int i = 0; i < profile.Probes.Count; i++) { int index = profile.Probes[i].Index; PointF normalPoint = profile.Points[index] + normals[i]; DrawArrow(g, colors["normal_arrows"], probePoints[i], ToScreenCoords(normalPoint)); } }
private VectorF[] CalculateProbeNormals() { VectorF[] normals = new VectorF[profile.Probes.Count]; for (int i = 0; i < profile.Probes.Count; i++) { normals[i] = profile.Probes[i].NormalVector.Norm() * normalFactor; } return normals; }
private PointF[] CalculateValuePoints(PointF[] probePoints, VectorF[] normals, float[] data) { PointF[] valuePoints = new PointF[profile.Probes.Count]; for (int i = 0; i < profile.Probes.Count; i++) { float value = 0; if (data.Length > i) value = data[i] * valueFactor; if (value < 0) value *= -1; int index = profile.Probes[i].Index; valuePoints[i] = ToScreenCoords(profile.Points[index] + normals[i] * value); } return valuePoints; }
public Probe(int index, VectorF normalVector) { this.index = index; this.normalVector = normalVector; }