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

Method get_cell_index

LASzip/src/lasquadtree.cpp:390–400  ·  view source on GitHub ↗

returns the index of the cell that x & y fall into at the specified level

Source from the content-addressed store, hash-verified

388
389// returns the index of the cell that x & y fall into at the specified level
390U32 LASquadtree::get_cell_index(const F64 x, const F64 y, U32 level) const
391{
392 if (sub_level)
393 {
394 return level_offset[sub_level+level] + (sub_level_index << (level*2)) + get_level_index(x, y, level);
395 }
396 else
397 {
398 return level_offset[level]+get_level_index(x, y, level);
399 }
400}
401
402// returns the index of the cell that x & y fall into
403U32 LASquadtree::get_cell_index(const F64 x, const F64 y) const

Callers 1

addMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected