Go to the documentation of this file.
34 #include <boost/optional.hpp>
39 using std::unique_ptr;
40 using std::make_unique;
65 std::cout <<
options << std::endl;
66 cout <<
"LOAD" << endl;
68 cout <<
"MODEL" << endl;
69 cout << model << endl;
71 cout << meshBuffer << endl;
74 std::cout <<
lvr2::timestamp <<
"Computing face normals..." << std::endl;
80 const auto reductionRatio =
options.getEdgeCollapseReductionRatio();
83 if (reductionRatio > 0.0)
85 if (reductionRatio > 1.0)
87 throw "The reduction ratio needs to be between 0 and 1!";
92 const auto count =
static_cast<size_t>((
mesh.numFaces() / 2) * reductionRatio);
static void saveModel(ModelPtr m, std::string file)
A class to parse the program options for the reconstruction executable.
const kaboom::Options * options
size_t simpleMeshReduction(BaseMesh< BaseVecT > &mesh, const size_t count, FaceMap< Normal< typename BaseVecT::CoordType >> &faceNormals)
Like iterativeEdgeCollapse but with a fixed cost function.
int main(int argc, char **argv)
static Timestamp timestamp
A global time stamp object for program runtime measurement.
std::shared_ptr< Model > ModelPtr
std::shared_ptr< MeshBuffer > MeshBufferPtr
static ModelPtr readModel(std::string filename)
DenseFaceMap< Normal< typename BaseVecT::CoordType > > calcFaceNormals(const BaseMesh< BaseVecT > &mesh)
Calculates a normal for each face in the mesh.
MeshBufferPtr apply(const BaseMesh< BaseVecT > &mesh)
Half-edge data structure implementing the BaseMesh interface.
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24