MCPcopy Create free account
hub / github.com/PDAL/PDAL / resetLevel

Method resetLevel

io/private/copcwriter/Grid.cpp:95–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void Grid::resetLevel(int level)
96{
97 // We have to have at least level 1 or things break when sampling.
98 m_maxLevel = (std::max)(level, 1);
99 m_gridSize = (int)std::pow(2, m_maxLevel);
100
101 if (m_cubic)
102 {
103 m_xsize = (m_cubicBounds.maxx - m_cubicBounds.minx) / m_gridSize;
104 m_ysize = m_xsize;
105 m_zsize = m_xsize;
106 }
107 else
108 {
109 m_xsize = (m_bounds.maxx - m_bounds.minx) / m_gridSize;
110 m_ysize = (m_bounds.maxy - m_bounds.miny) / m_gridSize;
111 m_zsize = (m_bounds.maxz - m_bounds.minz) / m_gridSize;
112 }
113}
114
115VoxelKey Grid::key(double x, double y, double z)
116{

Callers 1

ReprocessorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected