MCPcopy Create free account
hub / github.com/LAStools/LAStools / filter

Method filter

LASlib/src/lasfilter.cpp:154–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 inline I32 get_command(CHAR* string) const { return sprintf(string, "-%s %lf %lf %lf %lf %lf ", name(), x1, y1, x2, y2, w); };
153 inline U32 get_decompress_selective() const { return LASZIP_DECOMPRESS_SELECTIVE_CHANNEL_RETURNS_XY; };
154 inline BOOL filter(const LASpoint* point)
155 {
156 F64 x0 = point->get_x();
157 F64 y0 = point->get_y();
158
159 F64 rx = x1 - x0;
160 F64 ry = y1 - y0;
161
162 F64 divisor = ((-vy) * ry) - (rx * vx);
163
164 F64 d = divisor / divider;
165
166 if ((d < -wm) || (wm < d))
167 {
168 return TRUE;
169 }
170 else
171 {
172 F64 rxm = xm - x0;
173 F64 rym = ym - y0;
174
175 F64 divisorm = (-vx * rym) - (rxm * (-vy));
176 F64 dm = divisorm / divider;
177
178 if ((dm < -dividerm) || (dividerm < dm))
179 {
180 return TRUE;
181 }
182 else
183 {
184 return FALSE;
185 }
186 }
187 }
188
189 LAScriterionKeepProfile(F64 p1_x, F64 p1_y, F64 p2_x, F64 p2_y, F64 width)
190 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected