Skip to content

Instantly share code, notes, and snippets.

@hobu
Created November 11, 2016 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hobu/b3472b136f42d4c2de1f57d53d10912c to your computer and use it in GitHub Desktop.
Save hobu/b3472b136f42d4c2de1f57d53d10912c to your computer and use it in GitHub Desktop.
void ZipPoint::ConstructItems()
{
// construct the object that will hold a laszip point
// compute the point size
m_lz_point_size = 0;
for (unsigned int i = 0; i < m_zip->num_items; i++)
m_lz_point_size += m_zip->items[i].size;
// create the point data
unsigned int point_offset = 0;
m_lz_point = new unsigned char*[m_zip->num_items];
m_lz_point_data.resize(m_lz_point_size);
for (unsigned i = 0; i < m_zip->num_items; i++)
{
m_lz_point[i] = &(m_lz_point_data[point_offset]);
point_offset += m_zip->items[i].size;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment