private void AddNodeToCorrespondences(DistanceNode node) { Correspondences.Add(new Correspondence(node)); StaticPointsInACorrespondence.Add(node.StaticPoint); ModelPointsInACorrespondence.Add(node.ModelPoint); }
/// <summary> /// Find the point where for the specified staticPoints their normal, /// hits the model fragment. If no intersection is found for the normal /// shooting outward of the object the normal is reversed. /// </summary> /// <returns>A new correspondence collection.</returns> /// <param name="staticPoints">Static points.</param> /// <param name="modelSamplingInformation">Model sampling information.</param> public CorrespondenceCollection Find(ReadOnlyCollection <Point> staticPoints, SamplingInformation modelSamplingInformation) { Correspondence correspondence; CorrespondenceCollection correspondences = new CorrespondenceCollection(); foreach (Point staticPoint in staticPoints) { correspondence = FindCorrespondence(staticPoint, modelSamplingInformation); if (correspondence == null) { continue; } correspondences.Add(correspondence); } return(correspondences); }