[Liblas-devel] ARSF LiDAR Analysis GUI
Mateusz Loskot
mateusz at loskot.net
Thu Aug 23 06:45:27 PDT 2012
On 23 August 2012 14:39, Martin Isenburg <martin.isenburg at gmail.com> wrote:
>
> reader->inside_rectangle(fence.getXs()[0], fence.getYs()[0],
> fence.getXs()[1], fence.getYs()[1]);
Speaking of performance, replace
fence.getXs()[0], fence.getYs()[0], fence.getXs()[1], fence.getYs()[1]);
with
vector<double> const x = fence.getXs();
vector<double> const y = fence.getys();
x[0], y[0], x[1], y[1]);
and you are 50% of vector<double> copies less.
As SelectionBox is represented by 4 elements only, std::array would be cheaper.
"Every little helps."
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the Liblas-devel
mailing list