<div dir="ltr">If you can phrase your data so that the direction is just another dimension, then sure.<br><br>Maybe instead of storing the angle, store the 3 components of the unit direction vector. Then you could search for points that have a direction within dist range of a target direction... and with the addition of the 3 components of the location, that can allow you to search on both nearby points with similar directions.<br>
<br>However i think the distance calc may need to be tweaked, as i think its just Euler distance... which means the distance will be inclusive of the "distance" between 2 directions.<br><br>Do you follow? I may be babbling, i'm pretty tired at the moment.<br>
<br><div class="gmail_quote">2008/10/20 Willi Richert <span dir="ltr"><<a href="mailto:w.richert@gmx.net">w.richert@gmx.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="font-size: 10pt; font-weight: 400; font-style: normal;">
<p style="margin: 0px; text-indent: 0px;">Hi,</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">is there a possibility to store directional data (e.g. angle of object) in libkdtree++? There are some side-issues with dir. data like 2*pi=0, etc. This should be handled somehow at the node level. I'm not sure whether this is generally feasible with KD-trees. </p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">Regards,</p>
<p style="margin: 0px; text-indent: 0px;">wr</p>
<p style="margin: 0px; text-indent: 0px;"></p></div><br>_______________________________________________<br>
libkdtree-devel mailing list<br>
<a href="mailto:libkdtree-devel@lists.alioth.debian.org">libkdtree-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel</a><br>
<br></blockquote></div><br></div>