public Settings( Transform referenceTransform, ITransformFinder transformFinder, string name, string correspondenceFinder = "normalshooting", float errorThresholdScale = 0.0001f, int maxNumIterations = 500, float maxWithinCorrespondenceDistance = 0.8f ) { this.name = name; ReferenceTransform = referenceTransform; ErrorThresholdScale = errorThresholdScale; MaxWithinCorrespondenceDistance = maxWithinCorrespondenceDistance; MaxNumIterations = maxNumIterations; PointSampler = new AllPointsSampler( new AllPointsSampler.Configuration( referenceTransform, AllPointsSampler.Configuration.NormalProcessing.VertexNormals ) ); correspondenceFilters = new List <ICorrespondenceFilter>(); this.TransFormFinder = transformFinder; if (correspondenceFinder == "normalshooting") { CorrespondenceFinder = new NormalShootingCorrespondenceFinder(this); } else if (correspondenceFinder == "nearestneighbour") { CorrespondenceFinder = new NearstPointCorrespondenceFinder(PointSampler); } else { throw new Exception("Invalid Correspondence Finder name"); } }
public List <Point> Sample(SamplingInformation samplingInfo) { List <Point> points = new AllPointsSampler(this.config).Sample(samplingInfo); return(Sample(points)); }