40 #include <boost/filesystem.hpp> 67 if (!boost::filesystem::exists(
"area"))
69 boost::filesystem::create_directories(
"area");
83 boost::filesystem::path outputPath = boost::filesystem::absolute(options.
getOutputDir());
84 if (!boost::filesystem::is_directory(outputPath))
86 boost::filesystem::create_directories(outputPath);
95 boost::filesystem::path selectedFile(files[0]);
96 std::string extension = selectedFile.extension().string();
98 if (extension ==
".h5")
110 std::vector<lvr2::MeshBufferPtr> meshes;
111 std::vector<std::string> layers;
112 for(
size_t i = 0; i < files.size(); ++i)
115 layers.push_back(std::string(
"mesh") + std::to_string(i));
116 meshBuffer = model->m_mesh;
119 meshes.push_back(meshBuffer);
123 lvr2::ChunkManager chunker(meshes, size, maxChunkOverlap, outputPath.string(), layers);
float getChunkSize() const
Returns the side length of a chunk.
std::vector< std::string > getInputFile() const
Returns the input file.
bool printUsage() const
Prints a usage message to stdout.
float getXMax() const
Returns the x-max of the bounding box.
A class to parse the program options for the chunking executable.
const kaboom::Options * options
std::shared_ptr< MeshBuffer > MeshBufferPtr
string getChunkedMesh() const
Returns the chunked mesh file.
float getMaxChunkOverlap() const
Returns the maximum allowed chunk overlap.
int getCacheSize() const
Returns the cacheSize (maximum number of chunks in HashMap while loading)
float getZMin() const
Returns the z-min of the bounding box.
static ModelPtr readModel(std::string filename)
float getYMax() const
Returns the y-max of the bounding box.
A dynamic bounding box class.
float getXMin() const
Returns the x-min of the bounding box.
Manager Class for all Hdf5IO components located in hdf5 directory.
Hdf5IO Feature for handling MeshBuffer related IO.
bool getLoad() const
Returns the load-flag. set to true for loading an existing hdf5-file and to false for chunking and sa...
int main(int argc, char **argv)
Hdf5IO Feature for handling VariantChannel related IO.
std::shared_ptr< Model > ModelPtr
float getYMin() const
Returns the y-min of the bounding box.
MeshBufferPtr loadMesh(std::string name)
string getOutputDir() const
Returns the output directory.
float getZMax() const
Returns the z-max of the bounding box.
std::string getMeshGroup() const
Returns the mesh group in the HDF5.