DGtalTools  1.5.beta
mesh2heightfield

Converts a mesh file into a projected 2D image given from a normal direction N and from a starting point P.

The 3D mesh is discretized and scanned in the normal direction N, starting from P with a step 1.

Usage: mesh2heightfield [input] [output]

Allowed options are:

Positionals:
1 TEXT:FILE input heightfield file (2D image).
2 TEXT output image.
Options:
-h,--help Print this help message and exit
-i,--input TEXT:FILE input heightfield file (2D image).
-d,--domain UINT x 2 specify the domain (required when normal are imported and if --inout is not given).
-o,--output TEXT output image.
--importNormal TEXT import normals from file.
--orderedNormalsImport Use ordered normals.
--lightDir,--lDir,--ld FLOAT x 3 light source direction: lx ly lz.
--lightPos,--lPos,--lp FLOAT x 3 light source position: px py pz.
-s,--specularModel FLOAT x 3 use specular Nayar model with 3 param Kdiff, Kspec, sigma.
-r,--reflectanceMap TEXT:FILE specify a image as reflectance map.
--hsvShading use shading with HSV shading (given from the normal vector)
--normalMap generates normal map.
-v,--invertNormals invert normal orientations.
graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::vertex_descriptor source(typename graph_traits< DGtal::DigitalSurface< TDigitalSurfaceContainer > >::edge_descriptor edge, const DGtal::DigitalSurface< TDigitalSurfaceContainer > &digSurf)

Example:

$ mesh2heightfield -i ${DGtal}/examples/samples/tref.off heighfield.pgm

You will obtain such image:

Resulting heightfield.
See also
mesh2heightfield.cpp