76int main(
int argc,
char** argv )
88 std::string S = examplesPath +
"samples/spot.obj";
89 std::ifstream input( S.c_str() );
92 trace.
info() <<
"Read " << ( ok_read ?
"OK" :
"ERROR" )
93 <<
" mesh=" << smesh << std::endl;
99 auto torus_mesh = Helper::makeTorus
100 ( 2.5, 0.5,
RealPoint { 0.0, 0.0, 0.0 }, 40, 40, 0, Helper::NormalsType::NO_NORMALS );
106 std::vector< RealPoint > positions =
107 { { 0, 0, 5 }, { 1, 1, 3 }, { -1, 1, 3 }, { -1, -1, 3 }, { 1, -1, 3 } };
108 std::vector< Vertices > faces =
109 { { 0, 1, 2 }, { 0, 2, 3 }, { 0, 3, 4 }, { 0, 4, 1 }, { 4, 3, 2, 1 } };
110 auto pyramid_mesh =
SurfMesh( positions.cbegin(), positions.cend(),
111 faces.cbegin(), faces.cend() );
118 std::vector<double> distances( smesh.
nbVertices() );
119 double biggest_d = 0.0;
122 auto v = visitor.
current().first;
123 auto d = visitor.
current().second;
124 biggest_d = (double) d;
125 distances[ v ] = biggest_d;
136 std::vector<Color> face_colors( smesh.
nbFaces() );
138 face_colors[ j ] = cmap( face_distances[ j ] );
140 Writer::writeOBJ(
"spot-bft.obj", smesh, face_colors );
143 Writer::writeIsoLinesOBJ(
"spot-iso-0_25.obj", smesh,
144 face_distances, distances, distances.back() * 0.25, 0.2 );
145 Writer::writeIsoLinesOBJ(
"spot-iso-0_5.obj", smesh,
146 face_distances, distances, distances.back() * 0.5, 0.2 );
147 Writer::writeIsoLinesOBJ(
"spot-iso-0_75.obj", smesh,
148 face_distances, distances, distances.back() * 0.75, 0.2 );
159 QApplication application(argc,argv);
162 viewer << viewmesh << viewmesh2 << viewmesh3;
163 viewer << Viewer3D<>::updateDisplay;