Commit 92905277 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

removed itaHRTF buildsearchdatabase function and the warning to speed up search by using it

its not exactly stable and will give up at the poles if multiple points are defined
parent 38f245ee
......@@ -684,11 +684,7 @@ classdef itaHRTF < itaAudio
end
%HRTFout = this.direction(idxCoord);
end
function this = buildsearchdatabase(this)
this.dirCoord = this.dirCoord.build_search_database;
end
end
function obj = direction(this, idxCoord)
%return the HRTF (L&R) for a/multiple given direction indices
......
......@@ -27,9 +27,6 @@ if exist('KNNSearch','file') == 3 && ~isempty(this.mPtrtree) % Only if external
[ind,dist] = KNNSearch(this.cart,coords.cart,this.mPtrtree,num);
else
%% Old one, using Matlab code
if ita_preferences('verboseMode') && size(this.cart,1) > 10
disp('findnearest@itaCoordinates: You can speed this up by calling ''build_search_database'' prior to the search')
end
for idinput = 1:size(coords.cart,1)
dists = sqrt(sum((this.cart-repmat(coords.cart(idinput,:),size(this.cart,1),1)).^2,2));
for idx = 1:num
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment