Skip to content

Instantly share code, notes, and snippets.

@donkaban
Created July 5, 2016 14:27
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 donkaban/3fca9908932d60f211f73e41709ae618 to your computer and use it in GitHub Desktop.
Save donkaban/3fca9908932d60f211f73e41709ae618 to your computer and use it in GitHub Desktop.
#include "malevich.h"
using namespace malevich;
int main(int argc, char **argv)
{
auto cloud = pcloud::null();
... тут посчитал все
d->RecoveryDepthMapFromImages();
for(auto i = 0; i < d->getPointCloud().size(); ++i)
{
math::vec3 pos(d->getPointCloud()[i].x,
d->getPointCloud()[i].x,
d->getPointCloud()[i].z);
math::vec4 col(d->getPointCloudRGB()[i].val[0],
d->getPointCloudRGB()[i].val[1],
d->getPointCloudRGB()[i].val[2],
1.0);
cloud->push_back({pos, col});
}
cloud->save("test.vox");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment